hoq (empty) → 0.1.0.0
raw patch · 36 files changed
+4911/−0 lines, 36 filesdep +BNFCdep +arraydep +basebuild-type:Customsetup-changed
Dependencies added: BNFC, array, base, mtl, prelude-extras, pretty, readline
Files
- LICENSE +339/−0
- README.md +4/−0
- Setup.hs +24/−0
- data/hoq.vim +36/−0
- dist/build/hoq/hoq-tmp/Syntax/BNFC/LexGrammar.hs +388/−0
- dist/build/hoq/hoq-tmp/Syntax/BNFC/ParGrammar.hs +1277/−0
- examples/basics.hoq +122/−0
- examples/circle.hoq +152/−0
- examples/hlevel.hoq +77/−0
- examples/lem.hoq +37/−0
- hoq.cabal +55/−0
- src/File/Load.hs +35/−0
- src/Main.hs +12/−0
- src/Normalization.hs +104/−0
- src/REPL.hs +53/−0
- src/Syntax/BNFC/LexGrammar.x +209/−0
- src/Syntax/BNFC/ParGrammar.y +215/−0
- src/Syntax/ErrorDoc.hs +93/−0
- src/Syntax/Expr.hs +43/−0
- src/Syntax/Grammar.cf +81/−0
- src/Syntax/Pattern.hs +14/−0
- src/Syntax/PrettyPrinter.hs +97/−0
- src/Syntax/Scope.hs +105/−0
- src/Syntax/Term.hs +200/−0
- src/TypeChecking/Context.hs +42/−0
- src/TypeChecking/Definitions.hs +62/−0
- src/TypeChecking/Definitions/Conditions.hs +140/−0
- src/TypeChecking/Definitions/Coverage.hs +89/−0
- src/TypeChecking/Definitions/DataTypes.hs +115/−0
- src/TypeChecking/Definitions/Functions.hs +53/−0
- src/TypeChecking/Definitions/Patterns.hs +79/−0
- src/TypeChecking/Definitions/Termination.hs +87/−0
- src/TypeChecking/Expressions.hs +306/−0
- src/TypeChecking/Monad.hs +50/−0
- src/TypeChecking/Monad/Scope.hs +59/−0
- src/TypeChecking/Monad/Warn.hs +57/−0
+ LICENSE view
@@ -0,0 +1,339 @@+ GNU GENERAL PUBLIC LICENSE+ Version 2, June 1991++ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA+ Everyone is permitted to copy and distribute verbatim copies+ of this license document, but changing it is not allowed.++ Preamble++ The licenses for most software are designed to take away your+freedom to share and change it. By contrast, the GNU General Public+License is intended to guarantee your freedom to share and change free+software--to make sure the software is free for all its users. This+General Public License applies to most of the Free Software+Foundation's software and to any other program whose authors commit to+using it. (Some other Free Software Foundation software is covered by+the GNU Lesser General Public License instead.) You can apply it to+your programs, too.++ When we speak of free software, we are referring to freedom, not+price. Our General Public Licenses are designed to make sure that you+have the freedom to distribute copies of free software (and charge for+this service if you wish), that you receive source code or can get it+if you want it, that you can change the software or use pieces of it+in new free programs; and that you know you can do these things.++ To protect your rights, we need to make restrictions that forbid+anyone to deny you these rights or to ask you to surrender the rights.+These restrictions translate to certain responsibilities for you if you+distribute copies of the software, or if you modify it.++ For example, if you distribute copies of such a program, whether+gratis or for a fee, you must give the recipients all the rights that+you have. You must make sure that they, too, receive or can get the+source code. And you must show them these terms so they know their+rights.++ We protect your rights with two steps: (1) copyright the software, and+(2) offer you this license which gives you legal permission to copy,+distribute and/or modify the software.++ Also, for each author's protection and ours, we want to make certain+that everyone understands that there is no warranty for this free+software. If the software is modified by someone else and passed on, we+want its recipients to know that what they have is not the original, so+that any problems introduced by others will not reflect on the original+authors' reputations.++ Finally, any free program is threatened constantly by software+patents. We wish to avoid the danger that redistributors of a free+program will individually obtain patent licenses, in effect making the+program proprietary. To prevent this, we have made it clear that any+patent must be licensed for everyone's free use or not licensed at all.++ The precise terms and conditions for copying, distribution and+modification follow.++ GNU GENERAL PUBLIC LICENSE+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION++ 0. This License applies to any program or other work which contains+a notice placed by the copyright holder saying it may be distributed+under the terms of this General Public License. The "Program", below,+refers to any such program or work, and a "work based on the Program"+means either the Program or any derivative work under copyright law:+that is to say, a work containing the Program or a portion of it,+either verbatim or with modifications and/or translated into another+language. (Hereinafter, translation is included without limitation in+the term "modification".) Each licensee is addressed as "you".++Activities other than copying, distribution and modification are not+covered by this License; they are outside its scope. The act of+running the Program is not restricted, and the output from the Program+is covered only if its contents constitute a work based on the+Program (independent of having been made by running the Program).+Whether that is true depends on what the Program does.++ 1. You may copy and distribute verbatim copies of the Program's+source code as you receive it, in any medium, provided that you+conspicuously and appropriately publish on each copy an appropriate+copyright notice and disclaimer of warranty; keep intact all the+notices that refer to this License and to the absence of any warranty;+and give any other recipients of the Program a copy of this License+along with the Program.++You may charge a fee for the physical act of transferring a copy, and+you may at your option offer warranty protection in exchange for a fee.++ 2. You may modify your copy or copies of the Program or any portion+of it, thus forming a work based on the Program, and copy and+distribute such modifications or work under the terms of Section 1+above, provided that you also meet all of these conditions:++ a) You must cause the modified files to carry prominent notices+ stating that you changed the files and the date of any change.++ b) You must cause any work that you distribute or publish, that in+ whole or in part contains or is derived from the Program or any+ part thereof, to be licensed as a whole at no charge to all third+ parties under the terms of this License.++ c) If the modified program normally reads commands interactively+ when run, you must cause it, when started running for such+ interactive use in the most ordinary way, to print or display an+ announcement including an appropriate copyright notice and a+ notice that there is no warranty (or else, saying that you provide+ a warranty) and that users may redistribute the program under+ these conditions, and telling the user how to view a copy of this+ License. (Exception: if the Program itself is interactive but+ does not normally print such an announcement, your work based on+ the Program is not required to print an announcement.)++These requirements apply to the modified work as a whole. If+identifiable sections of that work are not derived from the Program,+and can be reasonably considered independent and separate works in+themselves, then this License, and its terms, do not apply to those+sections when you distribute them as separate works. But when you+distribute the same sections as part of a whole which is a work based+on the Program, the distribution of the whole must be on the terms of+this License, whose permissions for other licensees extend to the+entire whole, and thus to each and every part regardless of who wrote it.++Thus, it is not the intent of this section to claim rights or contest+your rights to work written entirely by you; rather, the intent is to+exercise the right to control the distribution of derivative or+collective works based on the Program.++In addition, mere aggregation of another work not based on the Program+with the Program (or with a work based on the Program) on a volume of+a storage or distribution medium does not bring the other work under+the scope of this License.++ 3. You may copy and distribute the Program (or a work based on it,+under Section 2) in object code or executable form under the terms of+Sections 1 and 2 above provided that you also do one of the following:++ a) Accompany it with the complete corresponding machine-readable+ source code, which must be distributed under the terms of Sections+ 1 and 2 above on a medium customarily used for software interchange; or,++ b) Accompany it with a written offer, valid for at least three+ years, to give any third party, for a charge no more than your+ cost of physically performing source distribution, a complete+ machine-readable copy of the corresponding source code, to be+ distributed under the terms of Sections 1 and 2 above on a medium+ customarily used for software interchange; or,++ c) Accompany it with the information you received as to the offer+ to distribute corresponding source code. (This alternative is+ allowed only for noncommercial distribution and only if you+ received the program in object code or executable form with such+ an offer, in accord with Subsection b above.)++The source code for a work means the preferred form of the work for+making modifications to it. For an executable work, complete source+code means all the source code for all modules it contains, plus any+associated interface definition files, plus the scripts used to+control compilation and installation of the executable. However, as a+special exception, the source code distributed need not include+anything that is normally distributed (in either source or binary+form) with the major components (compiler, kernel, and so on) of the+operating system on which the executable runs, unless that component+itself accompanies the executable.++If distribution of executable or object code is made by offering+access to copy from a designated place, then offering equivalent+access to copy the source code from the same place counts as+distribution of the source code, even though third parties are not+compelled to copy the source along with the object code.++ 4. You may not copy, modify, sublicense, or distribute the Program+except as expressly provided under this License. Any attempt+otherwise to copy, modify, sublicense or distribute the Program is+void, and will automatically terminate your rights under this License.+However, parties who have received copies, or rights, from you under+this License will not have their licenses terminated so long as such+parties remain in full compliance.++ 5. You are not required to accept this License, since you have not+signed it. However, nothing else grants you permission to modify or+distribute the Program or its derivative works. These actions are+prohibited by law if you do not accept this License. Therefore, by+modifying or distributing the Program (or any work based on the+Program), you indicate your acceptance of this License to do so, and+all its terms and conditions for copying, distributing or modifying+the Program or works based on it.++ 6. Each time you redistribute the Program (or any work based on the+Program), the recipient automatically receives a license from the+original licensor to copy, distribute or modify the Program subject to+these terms and conditions. You may not impose any further+restrictions on the recipients' exercise of the rights granted herein.+You are not responsible for enforcing compliance by third parties to+this License.++ 7. If, as a consequence of a court judgment or allegation of patent+infringement or for any other reason (not limited to patent issues),+conditions are imposed on you (whether by court order, agreement or+otherwise) that contradict the conditions of this License, they do not+excuse you from the conditions of this License. If you cannot+distribute so as to satisfy simultaneously your obligations under this+License and any other pertinent obligations, then as a consequence you+may not distribute the Program at all. For example, if a patent+license would not permit royalty-free redistribution of the Program by+all those who receive copies directly or indirectly through you, then+the only way you could satisfy both it and this License would be to+refrain entirely from distribution of the Program.++If any portion of this section is held invalid or unenforceable under+any particular circumstance, the balance of the section is intended to+apply and the section as a whole is intended to apply in other+circumstances.++It is not the purpose of this section to induce you to infringe any+patents or other property right claims or to contest validity of any+such claims; this section has the sole purpose of protecting the+integrity of the free software distribution system, which is+implemented by public license practices. Many people have made+generous contributions to the wide range of software distributed+through that system in reliance on consistent application of that+system; it is up to the author/donor to decide if he or she is willing+to distribute software through any other system and a licensee cannot+impose that choice.++This section is intended to make thoroughly clear what is believed to+be a consequence of the rest of this License.++ 8. If the distribution and/or use of the Program is restricted in+certain countries either by patents or by copyrighted interfaces, the+original copyright holder who places the Program under this License+may add an explicit geographical distribution limitation excluding+those countries, so that distribution is permitted only in or among+countries not thus excluded. In such case, this License incorporates+the limitation as if written in the body of this License.++ 9. The Free Software Foundation may publish revised and/or new versions+of the General Public License from time to time. Such new versions will+be similar in spirit to the present version, but may differ in detail to+address new problems or concerns.++Each version is given a distinguishing version number. If the Program+specifies a version number of this License which applies to it and "any+later version", you have the option of following the terms and conditions+either of that version or of any later version published by the Free+Software Foundation. If the Program does not specify a version number of+this License, you may choose any version ever published by the Free Software+Foundation.++ 10. If you wish to incorporate parts of the Program into other free+programs whose distribution conditions are different, write to the author+to ask for permission. For software which is copyrighted by the Free+Software Foundation, write to the Free Software Foundation; we sometimes+make exceptions for this. Our decision will be guided by the two goals+of preserving the free status of all derivatives of our free software and+of promoting the sharing and reuse of software generally.++ NO WARRANTY++ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,+REPAIR OR CORRECTION.++ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE+POSSIBILITY OF SUCH DAMAGES.++ END OF TERMS AND CONDITIONS++ How to Apply These Terms to Your New Programs++ If you develop a new program, and you want it to be of the greatest+possible use to the public, the best way to achieve this is to make it+free software which everyone can redistribute and change under these terms.++ To do so, attach the following notices to the program. It is safest+to attach them to the start of each source file to most effectively+convey the exclusion of warranty; and each file should have at least+the "copyright" line and a pointer to where the full notice is found.++ <one line to give the program's name and a brief idea of what it does.>+ Copyright (C) <year> <name of author>++ This program is free software; you can redistribute it and/or modify+ it under the terms of the GNU General Public License as published by+ the Free Software Foundation; either version 2 of the License, or+ (at your option) any later version.++ This program is distributed in the hope that it will be useful,+ but WITHOUT ANY WARRANTY; without even the implied warranty of+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+ GNU General Public License for more details.++ You should have received a copy of the GNU General Public License along+ with this program; if not, write to the Free Software Foundation, Inc.,+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.++Also add information on how to contact you by electronic and paper mail.++If the program is interactive, make it output a short notice like this+when it starts in an interactive mode:++ Gnomovision version 69, Copyright (C) year name of author+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.+ This is free software, and you are welcome to redistribute it+ under certain conditions; type `show c' for details.++The hypothetical commands `show w' and `show c' should show the appropriate+parts of the General Public License. Of course, the commands you use may+be called something other than `show w' and `show c'; they could even be+mouse-clicks or menu items--whatever suits your program.++You should also get your employer (if you work as a programmer) or your+school, if any, to sign a "copyright disclaimer" for the program, if+necessary. Here is a sample; alter the names:++ Yoyodyne, Inc., hereby disclaims all copyright interest in the program+ `Gnomovision' (which makes passes at compilers) written by James Hacker.++ <signature of Ty Coon>, 1 April 1989+ Ty Coon, President of Vice++This General Public License does not permit incorporating your program into+proprietary programs. If your program is a subroutine library, you may+consider it more useful to permit linking proprietary applications with the+library. If this is what you want to do, use the GNU Lesser General+Public License instead of this License.
+ README.md view
@@ -0,0 +1,4 @@+hoq+===++A language based on homotopy type theory with an interval
+ Setup.hs view
@@ -0,0 +1,24 @@+import Distribution.Simple+import Control.Monad+import System.Directory+import System.Process+import System.Exit++main :: IO ()+main = do+ b <- doesFileExist "src/Syntax/BNFC/AbsGrammar.hs"+ unless b bnfc+ t1 <- getModificationTime $ "src/" ++ grammar+ t2 <- getModificationTime "src/Syntax/BNFC"+ if t1 > t2 then bnfc else defaultMain+ where+ grammar = "Syntax/Grammar.cf"+ bnfc = do+ dir <- getCurrentDirectory+ setCurrentDirectory "src"+ status <- system $ "bnfc -p Syntax.BNFC " ++ grammar+ setCurrentDirectory dir+ case status of+ ExitSuccess -> defaultMain+ _ -> return ()+ exitWith status
+ data/hoq.vim view
@@ -0,0 +1,36 @@+if version < 600+ syn clear+elseif exists("b:current_syntax")+ finish+endif++syn keyword hoqConstructor left right path coe iso squeeze+syn keyword hoqType data I Path with+syn match hoqLineComment "---*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$"+syn region hoqBlockComment start="{-" end="-}" contains=hoqBlockComment+syn match hoqNumber "\<[0-9]\+\>"+syn match hoqType "\<Type[0-9]*\>"+" syn match hoqDelimiter "(\|)\|;\|_\|{\|}"+syn match hoqOperator "=\|:\|->\|\\\|@"++if version >= 508 || !exists("did_hoq_syntax_inits")+ if version < 508+ let did_hoq_syntax_inits = 1+ command -nargs=+ HiLink hi link <args>+ else+ command -nargs=+ HiLink hi def link <args>+ endif++ HiLink hoqConstructor Keyword+ HiLink hoqLineComment hoqComment+ HiLink hoqBlockComment hoqComment+ HiLink hoqComment Comment+ HiLink hoqNumber Number+ HiLink hoqType Type+ HiLink hoqDelimiter Delimiter+ HiLink hoqOperator Operator++ delcommand HiLink+endif++let b:current_syntax = "hoq"
+ dist/build/hoq/hoq-tmp/Syntax/BNFC/LexGrammar.hs view
@@ -0,0 +1,388 @@+{-# LANGUAGE CPP,MagicHash #-}+{-# LINE 3 "src/Syntax/BNFC/LexGrammar.x" #-}++{-# OPTIONS -fno-warn-incomplete-patterns #-}+{-# OPTIONS_GHC -w #-}+module Syntax.BNFC.LexGrammar where++++import qualified Data.Bits+import Data.Word (Word8)++#if __GLASGOW_HASKELL__ >= 603+#include "ghcconfig.h"+#elif defined(__GLASGOW_HASKELL__)+#include "config.h"+#endif+#if __GLASGOW_HASKELL__ >= 503+import Data.Array+import Data.Char (ord)+import Data.Array.Base (unsafeAt)+#else+import Array+import Char (ord)+#endif+#if __GLASGOW_HASKELL__ >= 503+import GHC.Exts+#else+import GlaExts+#endif+alex_base :: AlexAddr+alex_base = AlexA# "\xf8\xff\xff\xff\xd9\xff\xff\xff\x49\x00\x00\x00\x1c\x01\x00\x00\x9c\x01\x00\x00\x6f\x02\x00\x00\xef\x02\x00\x00\xef\x03\x00\x00\xb7\xff\xff\xff\x00\x00\x00\x00\xe0\x03\x00\x00\x00\x00\x00\x00\x8b\x00\x00\x00\x1d\x02\x00\x00\xe0\x04\x00\x00\xa0\x04\x00\x00\x00\x00\x00\x00\x96\x05\x00\x00\x69\x06\x00\x00\x00\x00\x00\x00\xfe\xff\xff\xff\xdf\xff\xff\xff\x00\x00\x00\x00\x42\x07\x00\x00\xa5\x07\x00\x00\x08\x08\x00\x00\x6b\x08\x00\x00\xce\x08\x00\x00\x31\x09\x00\x00\x94\x09\x00\x00\xf7\x09\x00\x00\x5a\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbd\x0a\x00\x00\x20\x0b\x00\x00\x83\x0b\x00\x00\xe6\x0b\x00\x00\x49\x0c\x00\x00\xac\x0c\x00\x00\x0f\x0d\x00\x00\x72\x0d\x00\x00\xd5\x0d\x00\x00\x38\x0e\x00\x00\x9b\x0e\x00\x00\xfe\x0e\x00\x00\x61\x0f\x00\x00\xc4\x0f\x00\x00\x27\x10\x00\x00\x8a\x10\x00\x00\xed\x10\x00\x00\x50\x11\x00\x00\xb3\x11\x00\x00\x16\x12\x00\x00\x79\x12\x00\x00\xdc\x12\x00\x00\x3f\x13\x00\x00\xa2\x13\x00\x00\x05\x14\x00\x00\x68\x14\x00\x00\xcb\x14\x00\x00"#++alex_table :: AlexAddr+alex_table = AlexA# "\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x11\x00\x14\x00\x14\x00\x14\x00\x14\x00\x14\x00\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x21\x00\x16\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\x16\x00\x16\x00\x00\x00\x16\x00\x00\x00\x00\x00\x16\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x18\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x2c\x00\x33\x00\x33\x00\x33\x00\x29\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x20\x00\x00\x00\x00\x00\x22\x00\x00\x00\x33\x00\x33\x00\x27\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x28\x00\x33\x00\x33\x00\x2a\x00\x33\x00\x33\x00\x33\x00\x2d\x00\x33\x00\x2f\x00\x32\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x15\x00\x16\x00\x16\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\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\x07\x00\x08\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x12\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\x07\x00\x08\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0e\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x02\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x07\x00\x08\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x04\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0e\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x10\x00\x0f\x00\x04\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0c\x00\x06\x00\x09\x00\x09\x00\x09\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\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x07\x00\x08\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x17\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x1d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x1e\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x1f\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x24\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x25\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x39\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x38\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x37\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x36\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x35\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x34\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x2b\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x2e\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x30\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x31\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x26\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x3a\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x3b\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x3c\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x3d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x23\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x1c\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x1b\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x1a\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x0d\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x19\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x2d\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3e\x00\x20\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x28\x00\x29\x00\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\x3a\x00\x3b\x00\xff\xff\x3d\x00\xff\xff\xff\xff\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\xff\xff\x5c\x00\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\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\x2d\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\xc3\x00\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\x2d\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\xff\xff\xff\xff\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\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\x2d\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\xff\xff\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\xff\xff\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\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\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\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\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\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\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\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\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\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xc3\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x05\x00\x05\x00\xff\xff\x05\x00\xff\xff\x05\x00\x05\x00\x0b\x00\x0b\x00\x10\x00\x10\x00\xff\xff\x11\x00\x11\x00\x11\x00\x11\x00\x05\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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,61) [AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccSkip,AlexAccSkip,AlexAccSkip,AlexAccSkip,AlexAcc (alex_action_3),AlexAcc (alex_action_3),AlexAcc (alex_action_4),AlexAcc (alex_action_5),AlexAcc (alex_action_6),AlexAcc (alex_action_7),AlexAcc (alex_action_8),AlexAcc (alex_action_9),AlexAcc (alex_action_10),AlexAcc (alex_action_11),AlexAcc (alex_action_12),AlexAcc (alex_action_13),AlexAcc (alex_action_14),AlexAcc (alex_action_15),AlexAcc (alex_action_16),AlexAcc (alex_action_16),AlexAcc (alex_action_16),AlexAcc (alex_action_16),AlexAcc (alex_action_16),AlexAcc (alex_action_16),AlexAcc (alex_action_16),AlexAcc (alex_action_16),AlexAcc (alex_action_16),AlexAcc (alex_action_16),AlexAcc (alex_action_16),AlexAcc (alex_action_16),AlexAcc (alex_action_16),AlexAcc (alex_action_16),AlexAcc (alex_action_16),AlexAcc (alex_action_16),AlexAcc (alex_action_16),AlexAcc (alex_action_16),AlexAcc (alex_action_16),AlexAcc (alex_action_16),AlexAcc (alex_action_16),AlexAcc (alex_action_16),AlexAcc (alex_action_16),AlexAcc (alex_action_16),AlexAcc (alex_action_16),AlexAcc (alex_action_16),AlexAcc (alex_action_16)]+{-# LINE 51 "src/Syntax/BNFC/LexGrammar.x" #-}+++tok f p s = f p s++share :: String -> String+share = id++data Tok =+ TS !String !Int -- reserved words and symbols+ | TL !String -- string literals+ | TI !String -- integer literals+ | TV !String -- identifiers+ | TD !String -- double precision float literals+ | TC !String -- character literals+ | T_U !String+ | T_I !String+ | T_PLeft !String+ | T_PRight !String+ | T_PPath !String+ | T_Ppath !String+ | T_PCoe !String+ | T_PIso !String+ | T_PSqueeze !String+ | T_PLam !String+ | T_PPar !String+ | T_Pus !String+ | T_PIdent !String++ deriving (Eq,Show,Ord)++data Token = + PT Posn Tok+ | Err Posn+ deriving (Eq,Show,Ord)++tokenPos (PT (Pn _ l _) _ :_) = "line " ++ show l+tokenPos (Err (Pn _ l _) :_) = "line " ++ show l+tokenPos _ = "end of file"++tokenPosn (PT p _) = p+tokenPosn (Err p) = p+tokenLineCol = posLineCol . tokenPosn+posLineCol (Pn _ l c) = (l,c)+mkPosToken t@(PT p _) = (posLineCol p, prToken t)++prToken t = case t of+ PT _ (TS s _) -> s+ PT _ (TL s) -> s+ PT _ (TI s) -> s+ PT _ (TV s) -> s+ PT _ (TD s) -> s+ PT _ (TC s) -> s+ PT _ (T_U s) -> s+ PT _ (T_I s) -> s+ PT _ (T_PLeft s) -> s+ PT _ (T_PRight s) -> s+ PT _ (T_PPath s) -> s+ PT _ (T_Ppath s) -> s+ PT _ (T_PCoe s) -> s+ PT _ (T_PIso s) -> s+ PT _ (T_PSqueeze s) -> s+ PT _ (T_PLam s) -> s+ PT _ (T_PPar s) -> s+ PT _ (T_Pus s) -> s+ PT _ (T_PIdent s) -> s+++data BTree = N | B String Tok BTree BTree deriving (Show)++eitherResIdent :: (String -> Tok) -> String -> Tok+eitherResIdent tv s = treeFind resWords+ where+ treeFind N = tv s+ treeFind (B a t left right) | s < a = treeFind left+ | s > a = treeFind right+ | s == a = t++resWords = b "@" 6 (b ":" 3 (b "->" 2 (b ")" 1 N N) N) (b "=" 5 (b ";" 4 N N) N)) (b "{" 9 (b "with" 8 (b "data" 7 N N) N) (b "}" 11 (b "|" 10 N N) N))+ where b s n = let bs = id s+ in B bs (TS bs n)++unescapeInitTail :: String -> String+unescapeInitTail = id . unesc . tail . id where+ unesc s = case s of+ '\\':c:cs | elem c ['\"', '\\', '\''] -> c : unesc cs+ '\\':'n':cs -> '\n' : unesc cs+ '\\':'t':cs -> '\t' : unesc cs+ '"':[] -> []+ c:cs -> c : unesc cs+ _ -> []++-------------------------------------------------------------------+-- Alex wrapper code.+-- A modified "posn" wrapper.+-------------------------------------------------------------------++data Posn = Pn !Int !Int !Int+ deriving (Eq, Show,Ord)++alexStartPos :: Posn+alexStartPos = Pn 0 1 1++alexMove :: Posn -> Char -> Posn+alexMove (Pn a l c) '\t' = Pn (a+1) l (((c+7) `div` 8)*8+1)+alexMove (Pn a l c) '\n' = Pn (a+1) (l+1) 1+alexMove (Pn a l c) _ = Pn (a+1) l (c+1)++type Byte = Word8++type AlexInput = (Posn, -- current position,+ Char, -- previous char+ [Byte], -- pending bytes on the current char+ String) -- current input string++tokens :: String -> [Token]+tokens str = go (alexStartPos, '\n', [], str)+ where+ go :: AlexInput -> [Token]+ go inp@(pos, _, _, str) =+ case alexScan inp 0 of+ AlexEOF -> []+ AlexError (pos, _, _, _) -> [Err pos]+ AlexSkip inp' len -> go inp'+ AlexToken inp' len act -> act pos (take len str) : (go inp')++alexGetByte :: AlexInput -> Maybe (Byte,AlexInput)+alexGetByte (p, c, (b:bs), s) = Just (b, (p, c, bs, s))+alexGetByte (p, _, [], s) =+ case s of+ [] -> Nothing+ (c:s) ->+ let p' = alexMove p c+ (b:bs) = utf8Encode c+ in p' `seq` Just (b, (p', c, bs, s))++alexInputPrevChar :: AlexInput -> Char+alexInputPrevChar (p, c, bs, s) = c++ -- | Encode a Haskell String to a list of Word8 values, in UTF8 format.+utf8Encode :: Char -> [Word8]+utf8Encode = map fromIntegral . go . ord+ where+ go oc+ | oc <= 0x7f = [oc]++ | oc <= 0x7ff = [ 0xc0 + (oc `Data.Bits.shiftR` 6)+ , 0x80 + oc Data.Bits..&. 0x3f+ ]++ | oc <= 0xffff = [ 0xe0 + (oc `Data.Bits.shiftR` 12)+ , 0x80 + ((oc `Data.Bits.shiftR` 6) Data.Bits..&. 0x3f)+ , 0x80 + oc Data.Bits..&. 0x3f+ ]+ | otherwise = [ 0xf0 + (oc `Data.Bits.shiftR` 18)+ , 0x80 + ((oc `Data.Bits.shiftR` 12) Data.Bits..&. 0x3f)+ , 0x80 + ((oc `Data.Bits.shiftR` 6) Data.Bits..&. 0x3f)+ , 0x80 + oc Data.Bits..&. 0x3f+ ]++alex_action_3 = tok (\p s -> PT p (eitherResIdent (TV . share) s)) +alex_action_4 = tok (\p s -> PT p (eitherResIdent (T_U . share) s)) +alex_action_5 = tok (\p s -> PT p (eitherResIdent (T_I . share) s)) +alex_action_6 = tok (\p s -> PT p (eitherResIdent (T_PLeft . share) s)) +alex_action_7 = tok (\p s -> PT p (eitherResIdent (T_PRight . share) s)) +alex_action_8 = tok (\p s -> PT p (eitherResIdent (T_PPath . share) s)) +alex_action_9 = tok (\p s -> PT p (eitherResIdent (T_Ppath . share) s)) +alex_action_10 = tok (\p s -> PT p (eitherResIdent (T_PCoe . share) s)) +alex_action_11 = tok (\p s -> PT p (eitherResIdent (T_PIso . share) s)) +alex_action_12 = tok (\p s -> PT p (eitherResIdent (T_PSqueeze . share) s)) +alex_action_13 = tok (\p s -> PT p (eitherResIdent (T_PLam . share) s)) +alex_action_14 = tok (\p s -> PT p (eitherResIdent (T_PPar . share) s)) +alex_action_15 = tok (\p s -> PT p (eitherResIdent (T_Pus . share) s)) +alex_action_16 = tok (\p s -> PT p (eitherResIdent (T_PIdent . share) s)) +alex_action_17 = tok (\p s -> PT p (eitherResIdent (TV . share) s)) +{-# LINE 1 "templates/GenericTemplate.hs" #-}+{-# LINE 1 "templates/GenericTemplate.hs" #-}+{-# LINE 1 "<command-line>" #-}+{-# 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++{-# LINE 35 "templates/GenericTemplate.hs" #-}++{-# LINE 45 "templates/GenericTemplate.hs" #-}+++data AlexAddr = AlexA# Addr#++#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 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 (offset >=# 0#) && (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))+{-# LINE 191 "templates/GenericTemplate.hs" #-}++data AlexLastAcc a+ = AlexNone+ | AlexLastAcc a !AlexInput !Int+ | AlexLastSkip !AlexInput !Int++instance Functor AlexLastAcc where+ fmap f AlexNone = AlexNone+ fmap f (AlexLastAcc x y z) = AlexLastAcc (f x) y z+ fmap f (AlexLastSkip x y) = AlexLastSkip x y++data AlexAcc a user+ = AlexAccNone+ | AlexAcc a+ | AlexAccSkip+{-# LINE 235 "templates/GenericTemplate.hs" #-}++-- used by wrappers+iUnbox (I# (i)) = i
+ dist/build/hoq/hoq-tmp/Syntax/BNFC/ParGrammar.hs view
@@ -0,0 +1,1277 @@+{-# OPTIONS_GHC -w #-}+{-# OPTIONS -fglasgow-exts -cpp #-}+{-# OPTIONS_GHC -fno-warn-incomplete-patterns -fno-warn-overlapping-patterns #-}+module Syntax.BNFC.ParGrammar where+import Syntax.BNFC.AbsGrammar+import Syntax.BNFC.LexGrammar+import Syntax.BNFC.ErrM+import qualified Data.Array as Happy_Data_Array+import qualified GHC.Exts as Happy_GHC_Exts++-- parser produced by Happy Version 1.18.10++newtype HappyAbsSyn = HappyAbsSyn HappyAny+#if __GLASGOW_HASKELL__ >= 607+type HappyAny = Happy_GHC_Exts.Any+#else+type HappyAny = forall a . a+#endif+happyIn5 :: (U) -> (HappyAbsSyn )+happyIn5 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn5 #-}+happyOut5 :: (HappyAbsSyn ) -> (U)+happyOut5 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut5 #-}+happyIn6 :: (I) -> (HappyAbsSyn )+happyIn6 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn6 #-}+happyOut6 :: (HappyAbsSyn ) -> (I)+happyOut6 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut6 #-}+happyIn7 :: (PLeft) -> (HappyAbsSyn )+happyIn7 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn7 #-}+happyOut7 :: (HappyAbsSyn ) -> (PLeft)+happyOut7 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut7 #-}+happyIn8 :: (PRight) -> (HappyAbsSyn )+happyIn8 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn8 #-}+happyOut8 :: (HappyAbsSyn ) -> (PRight)+happyOut8 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut8 #-}+happyIn9 :: (PPath) -> (HappyAbsSyn )+happyIn9 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn9 #-}+happyOut9 :: (HappyAbsSyn ) -> (PPath)+happyOut9 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut9 #-}+happyIn10 :: (Ppath) -> (HappyAbsSyn )+happyIn10 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn10 #-}+happyOut10 :: (HappyAbsSyn ) -> (Ppath)+happyOut10 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut10 #-}+happyIn11 :: (PCoe) -> (HappyAbsSyn )+happyIn11 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn11 #-}+happyOut11 :: (HappyAbsSyn ) -> (PCoe)+happyOut11 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut11 #-}+happyIn12 :: (PIso) -> (HappyAbsSyn )+happyIn12 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn12 #-}+happyOut12 :: (HappyAbsSyn ) -> (PIso)+happyOut12 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut12 #-}+happyIn13 :: (PSqueeze) -> (HappyAbsSyn )+happyIn13 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn13 #-}+happyOut13 :: (HappyAbsSyn ) -> (PSqueeze)+happyOut13 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut13 #-}+happyIn14 :: (PLam) -> (HappyAbsSyn )+happyIn14 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn14 #-}+happyOut14 :: (HappyAbsSyn ) -> (PLam)+happyOut14 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut14 #-}+happyIn15 :: (PPar) -> (HappyAbsSyn )+happyIn15 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn15 #-}+happyOut15 :: (HappyAbsSyn ) -> (PPar)+happyOut15 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut15 #-}+happyIn16 :: (Pus) -> (HappyAbsSyn )+happyIn16 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn16 #-}+happyOut16 :: (HappyAbsSyn ) -> (Pus)+happyOut16 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut16 #-}+happyIn17 :: (PIdent) -> (HappyAbsSyn )+happyIn17 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn17 #-}+happyOut17 :: (HappyAbsSyn ) -> (PIdent)+happyOut17 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut17 #-}+happyIn18 :: (Defs) -> (HappyAbsSyn )+happyIn18 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn18 #-}+happyOut18 :: (HappyAbsSyn ) -> (Defs)+happyOut18 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut18 #-}+happyIn19 :: (Def) -> (HappyAbsSyn )+happyIn19 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn19 #-}+happyOut19 :: (HappyAbsSyn ) -> (Def)+happyOut19 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut19 #-}+happyIn20 :: ([Def]) -> (HappyAbsSyn )+happyIn20 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn20 #-}+happyOut20 :: (HappyAbsSyn ) -> ([Def])+happyOut20 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut20 #-}+happyIn21 :: (FunCase) -> (HappyAbsSyn )+happyIn21 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn21 #-}+happyOut21 :: (HappyAbsSyn ) -> (FunCase)+happyOut21 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut21 #-}+happyIn22 :: ([FunCase]) -> (HappyAbsSyn )+happyIn22 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn22 #-}+happyOut22 :: (HappyAbsSyn ) -> ([FunCase])+happyOut22 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut22 #-}+happyIn23 :: (Pattern) -> (HappyAbsSyn )+happyIn23 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn23 #-}+happyOut23 :: (HappyAbsSyn ) -> (Pattern)+happyOut23 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut23 #-}+happyIn24 :: (ParPat) -> (HappyAbsSyn )+happyIn24 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn24 #-}+happyOut24 :: (HappyAbsSyn ) -> (ParPat)+happyOut24 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut24 #-}+happyIn25 :: ([ParPat]) -> (HappyAbsSyn )+happyIn25 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn25 #-}+happyOut25 :: (HappyAbsSyn ) -> ([ParPat])+happyOut25 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut25 #-}+happyIn26 :: (Con) -> (HappyAbsSyn )+happyIn26 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn26 #-}+happyOut26 :: (HappyAbsSyn ) -> (Con)+happyOut26 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut26 #-}+happyIn27 :: ([Con]) -> (HappyAbsSyn )+happyIn27 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn27 #-}+happyOut27 :: (HappyAbsSyn ) -> ([Con])+happyOut27 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut27 #-}+happyIn28 :: (ConTele) -> (HappyAbsSyn )+happyIn28 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn28 #-}+happyOut28 :: (HappyAbsSyn ) -> (ConTele)+happyOut28 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut28 #-}+happyIn29 :: ([ConTele]) -> (HappyAbsSyn )+happyIn29 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn29 #-}+happyOut29 :: (HappyAbsSyn ) -> ([ConTele])+happyOut29 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut29 #-}+happyIn30 :: (DataTele) -> (HappyAbsSyn )+happyIn30 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn30 #-}+happyOut30 :: (HappyAbsSyn ) -> (DataTele)+happyOut30 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut30 #-}+happyIn31 :: ([DataTele]) -> (HappyAbsSyn )+happyIn31 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn31 #-}+happyOut31 :: (HappyAbsSyn ) -> ([DataTele])+happyOut31 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut31 #-}+happyIn32 :: (PiTele) -> (HappyAbsSyn )+happyIn32 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn32 #-}+happyOut32 :: (HappyAbsSyn ) -> (PiTele)+happyOut32 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut32 #-}+happyIn33 :: ([PiTele]) -> (HappyAbsSyn )+happyIn33 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn33 #-}+happyOut33 :: (HappyAbsSyn ) -> ([PiTele])+happyOut33 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut33 #-}+happyIn34 :: (Expr) -> (HappyAbsSyn )+happyIn34 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn34 #-}+happyOut34 :: (HappyAbsSyn ) -> (Expr)+happyOut34 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut34 #-}+happyIn35 :: (Expr) -> (HappyAbsSyn )+happyIn35 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn35 #-}+happyOut35 :: (HappyAbsSyn ) -> (Expr)+happyOut35 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut35 #-}+happyIn36 :: (Expr) -> (HappyAbsSyn )+happyIn36 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn36 #-}+happyOut36 :: (HappyAbsSyn ) -> (Expr)+happyOut36 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut36 #-}+happyIn37 :: (Expr) -> (HappyAbsSyn )+happyIn37 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn37 #-}+happyOut37 :: (HappyAbsSyn ) -> (Expr)+happyOut37 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut37 #-}+happyIn38 :: (Expr) -> (HappyAbsSyn )+happyIn38 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn38 #-}+happyOut38 :: (HappyAbsSyn ) -> (Expr)+happyOut38 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut38 #-}+happyIn39 :: (Expr) -> (HappyAbsSyn )+happyIn39 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn39 #-}+happyOut39 :: (HappyAbsSyn ) -> (Expr)+happyOut39 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut39 #-}+happyIn40 :: (Arg) -> (HappyAbsSyn )+happyIn40 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn40 #-}+happyOut40 :: (HappyAbsSyn ) -> (Arg)+happyOut40 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut40 #-}+happyIn41 :: ([Arg]) -> (HappyAbsSyn )+happyIn41 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn41 #-}+happyOut41 :: (HappyAbsSyn ) -> ([Arg])+happyOut41 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut41 #-}+happyInTok :: (Token) -> (HappyAbsSyn )+happyInTok x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyInTok #-}+happyOutTok :: (HappyAbsSyn ) -> (Token)+happyOutTok x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOutTok #-}+++happyActOffsets :: HappyAddr+happyActOffsets = HappyA# "\x36\x01\xbb\x01\xab\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x72\x00\xbb\x01\x00\x00\x00\x00\x9f\x01\xb2\x01\x85\x01\x00\x00\xaf\x01\x82\x00\xc8\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\xad\x01\x78\x01\x82\x01\x00\x00\x00\x00\x7d\x01\x6c\x01\x00\x00\xbb\x01\x36\x01\x67\x01\xbb\x01\xbb\x01\x00\x00\xc8\x01\xc8\x01\xc8\x01\xc8\x01\xbb\x01\x00\x00\x25\x00\x40\x00\x4b\x01\xbb\x01\x00\x00\x00\x00\xbb\x01\x49\x01\x00\x00\x00\x00\xc8\x01\x3e\x01\x1c\x01\x00\x00\x00\x00\x00\x00\x6d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x01\xbb\x01\x00\x00\x04\x01\x00\x00\x1a\x01\x00\x00\x19\x01\x00\x00\x00\x00\x00\x00\x00\x00\x06\x01\xe4\x00\xe8\x00\xbb\x01\xe1\x00\xd1\x00\xc8\x01\xbb\x01\x00\x00\x00\x00\x00\x00\xd1\x00\xde\x00\x00\x00\xb7\x00\xaf\x00\xb4\x00\x24\x00\xbb\x01\x00\x00\xa0\x00\x00\x00\xad\x00\x00\x00\x00\x00"#++happyGotoOffsets :: HappyAddr+happyGotoOffsets = HappyA# "\xd5\x01\x03\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x01\xf6\x00\x00\x00\x00\x00\x57\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\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\x69\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x3c\x00\xd2\x00\xda\x01\xa3\x01\xc5\x00\xa1\x00\x00\x00\x58\x01\x89\x01\x34\x01\x27\x01\x94\x00\x00\x00\x00\x00\x98\x01\x00\x00\x70\x00\x00\x00\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x96\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x01\x00\x00\x00\x00\x00\x00\x00\x00\x6a\x01\x3f\x00\x00\x00\x9d\x01\x38\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x32\x00\x00\x00\x6b\x01\x65\x01\x0e\x00\x00\x00\x00\x00\x00\x00\xdf\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\xb1\x01\x00\x00\x00\x00\x00\x00\x00\x00"#++happyDefActions :: HappyAddr+happyDefActions = HappyA# "\xe9\xff\x00\x00\x00\x00\xfd\xff\xc1\xff\xc0\xff\xbf\xff\xbe\xff\xbd\xff\xbc\xff\xbb\xff\xba\xff\xb9\xff\x00\x00\x00\x00\xb6\xff\xb7\xff\xcf\xff\x00\x00\x00\x00\xcc\xff\xc9\xff\xc7\xff\xc5\xff\xc3\xff\xc2\xff\xfc\xff\xfb\xff\xfa\xff\xf9\xff\xf8\xff\xf7\xff\xf6\xff\xf5\xff\xf4\xff\xf3\xff\xf2\xff\xf1\xff\xdc\xff\x00\x00\xe8\xff\xf0\xff\xee\xff\xed\xff\x00\x00\xd2\xff\x00\x00\xe9\xff\xe2\xff\x00\x00\x00\x00\xc4\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xce\xff\x00\x00\xb5\xff\x00\x00\x00\x00\xb4\xff\xb8\xff\x00\x00\x00\x00\xca\xff\xcb\xff\xc6\xff\xc8\xff\x00\x00\xef\xff\xe0\xff\xdf\xff\x00\x00\xdb\xff\xe1\xff\xe7\xff\xe6\xff\xea\xff\x00\x00\xd1\xff\x00\x00\xdc\xff\x00\x00\xde\xff\x00\x00\xcd\xff\xd0\xff\xdd\xff\xd5\xff\xd9\xff\xec\xff\x00\x00\x00\x00\x00\x00\x00\x00\xda\xff\x00\x00\xd4\xff\xd6\xff\xd8\xff\xe5\xff\x00\x00\xd3\xff\xe4\xff\x00\x00\x00\x00\x00\x00\x00\x00\xeb\xff\xe5\xff\xe3\xff\x00\x00\xd7\xff"#++happyCheck :: HappyAddr+happyCheck = HappyA# "\xff\xff\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\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\x18\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x01\x00\x01\x00\x03\x00\x03\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\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\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\x14\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x1a\x00\x17\x00\x18\x00\x0c\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\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\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\x14\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x05\x00\x06\x00\x17\x00\x18\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\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\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\x01\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x18\x00\x05\x00\x0b\x00\x04\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\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\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\x01\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x18\x00\x09\x00\x03\x00\x08\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\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\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\x0a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x01\x00\x01\x00\x18\x00\x01\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x05\x00\x0a\x00\x0b\x00\x0c\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x07\x00\x0a\x00\x0b\x00\x0c\x00\x16\x00\x1b\x00\x1c\x00\x06\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x0c\x00\x03\x00\x02\x00\x18\x00\x1b\x00\x1c\x00\x12\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x0a\x00\x0a\x00\x0b\x00\x0c\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x01\x00\x0a\x00\x0b\x00\x0c\x00\x1b\x00\x1c\x00\x0a\x00\x0e\x00\x0f\x00\x0c\x00\x20\x00\x21\x00\x22\x00\x23\x00\x17\x00\x16\x00\x17\x00\x18\x00\x15\x00\x16\x00\x05\x00\x19\x00\x18\x00\x18\x00\x04\x00\x22\x00\x23\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x1a\x00\x0a\x00\x0b\x00\x0c\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x1a\x00\x0a\x00\x0b\x00\x0c\x00\x0b\x00\x0c\x00\x02\x00\x03\x00\x0b\x00\x0c\x00\x0c\x00\x21\x00\x22\x00\x23\x00\x0a\x00\x0b\x00\x0c\x00\x03\x00\x02\x00\x15\x00\x16\x00\x02\x00\x16\x00\x13\x00\x0c\x00\x22\x00\x23\x00\xff\xff\x23\x00\x24\x00\x0c\x00\xff\xff\x23\x00\x24\x00\x10\x00\x11\x00\x12\x00\xff\xff\xff\xff\x23\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\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\x18\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x0c\x00\x12\x00\x0e\x00\x0f\x00\x10\x00\x0c\x00\x12\x00\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\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\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\x61\x00\x11\x00\x12\x00\x71\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x40\x00\x40\x00\x6e\x00\x41\x00\x11\x00\x12\x00\x6c\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\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\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\x30\x00\x11\x00\x12\x00\x67\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x4f\x00\x25\x00\x26\x00\x2d\x00\x11\x00\x12\x00\x5d\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\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\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\x30\x00\x11\x00\x12\x00\x56\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x35\x00\x36\x00\x25\x00\x26\x00\x11\x00\x12\x00\x57\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\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\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\x73\x00\x11\x00\x12\x00\x41\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x26\x00\x2f\x00\x6f\x00\x70\x00\x11\x00\x12\x00\x46\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\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\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\x69\x00\x11\x00\x12\x00\x47\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x26\x00\x67\x00\x5f\x00\x60\x00\x11\x00\x12\x00\x4e\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\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\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\x61\x00\x11\x00\x12\x00\x3a\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x59\x00\x5a\x00\x26\x00\x40\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x53\x00\x0e\x00\x0f\x00\x10\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x2d\x00\x0e\x00\x0f\x00\x10\x00\x24\x00\x11\x00\x12\x00\x36\x00\x42\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x53\x00\x41\x00\x3e\x00\x26\x00\x11\x00\x12\x00\x54\x00\x43\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x38\x00\x32\x00\x0f\x00\x10\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x56\x00\x62\x00\x0f\x00\x10\x00\x11\x00\x39\x00\x50\x00\x1c\x00\x1d\x00\x5a\x00\x45\x00\x17\x00\x18\x00\x19\x00\x63\x00\x24\x00\x25\x00\x26\x00\x5b\x00\x65\x00\x2f\x00\x51\x00\x26\x00\x26\x00\x30\x00\x64\x00\x19\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\xff\xff\x32\x00\x0f\x00\x10\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\xff\xff\x32\x00\x0f\x00\x10\x00\x0f\x00\x10\x00\x48\x00\x49\x00\x0f\x00\x10\x00\x5a\x00\x44\x00\x18\x00\x19\x00\x4a\x00\x0f\x00\x10\x00\x32\x00\x37\x00\x5b\x00\x5c\x00\x38\x00\x24\x00\x4b\x00\x04\x00\x33\x00\x19\x00\x00\x00\x3b\x00\x3e\x00\x53\x00\x00\x00\x3b\x00\x3c\x00\x69\x00\x70\x00\x6b\x00\x00\x00\x00\x00\x4c\x00\x04\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\x04\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x24\x00\x25\x00\x26\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x26\x00\x2b\x00\x28\x00\x4d\x00\x2a\x00\x53\x00\x2b\x00\x00\x00\x00\x00\x69\x00\x6a\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"#++happyReduceArr = Happy_Data_Array.array (2, 75) [+ (2 , happyReduce_2),+ (3 , happyReduce_3),+ (4 , happyReduce_4),+ (5 , happyReduce_5),+ (6 , happyReduce_6),+ (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)+ ]++happy_n_terms = 27 :: Int+happy_n_nonterms = 37 :: Int++happyReduce_2 = happySpecReduce_1 0# happyReduction_2+happyReduction_2 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn5+ (U (mkPosToken happy_var_1)+ )}++happyReduce_3 = happySpecReduce_1 1# happyReduction_3+happyReduction_3 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn6+ (I (mkPosToken happy_var_1)+ )}++happyReduce_4 = happySpecReduce_1 2# happyReduction_4+happyReduction_4 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn7+ (PLeft (mkPosToken happy_var_1)+ )}++happyReduce_5 = happySpecReduce_1 3# happyReduction_5+happyReduction_5 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn8+ (PRight (mkPosToken happy_var_1)+ )}++happyReduce_6 = happySpecReduce_1 4# happyReduction_6+happyReduction_6 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn9+ (PPath (mkPosToken happy_var_1)+ )}++happyReduce_7 = happySpecReduce_1 5# happyReduction_7+happyReduction_7 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn10+ (Ppath (mkPosToken happy_var_1)+ )}++happyReduce_8 = happySpecReduce_1 6# happyReduction_8+happyReduction_8 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn11+ (PCoe (mkPosToken happy_var_1)+ )}++happyReduce_9 = happySpecReduce_1 7# happyReduction_9+happyReduction_9 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn12+ (PIso (mkPosToken happy_var_1)+ )}++happyReduce_10 = happySpecReduce_1 8# happyReduction_10+happyReduction_10 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn13+ (PSqueeze (mkPosToken happy_var_1)+ )}++happyReduce_11 = happySpecReduce_1 9# happyReduction_11+happyReduction_11 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn14+ (PLam (mkPosToken happy_var_1)+ )}++happyReduce_12 = happySpecReduce_1 10# happyReduction_12+happyReduction_12 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn15+ (PPar (mkPosToken happy_var_1)+ )}++happyReduce_13 = happySpecReduce_1 11# happyReduction_13+happyReduction_13 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn16+ (Pus (mkPosToken happy_var_1)+ )}++happyReduce_14 = happySpecReduce_1 12# happyReduction_14+happyReduction_14 happy_x_1+ = case happyOutTok happy_x_1 of { happy_var_1 -> + happyIn17+ (PIdent (mkPosToken happy_var_1)+ )}++happyReduce_15 = happySpecReduce_1 13# happyReduction_15+happyReduction_15 happy_x_1+ = case happyOut20 happy_x_1 of { happy_var_1 -> + happyIn18+ (Defs happy_var_1+ )}++happyReduce_16 = happySpecReduce_3 14# happyReduction_16+happyReduction_16 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut17 happy_x_1 of { happy_var_1 -> + case happyOut34 happy_x_3 of { happy_var_3 -> + happyIn19+ (DefType happy_var_1 happy_var_3+ )}}++happyReduce_17 = happySpecReduce_1 14# happyReduction_17+happyReduction_17 happy_x_1+ = case happyOut21 happy_x_1 of { happy_var_1 -> + happyIn19+ (DefFun happy_var_1+ )}++happyReduce_18 = happySpecReduce_1 14# happyReduction_18+happyReduction_18 happy_x_1+ = case happyOut23 happy_x_1 of { happy_var_1 -> + happyIn19+ (DefFunEmpty happy_var_1+ )}++happyReduce_19 = happyReduce 5# 14# happyReduction_19+happyReduction_19 (happy_x_5 `HappyStk`+ happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest)+ = case happyOut17 happy_x_2 of { happy_var_2 -> + case happyOut31 happy_x_3 of { happy_var_3 -> + case happyOut27 happy_x_5 of { happy_var_5 -> + happyIn19+ (DefData happy_var_2 (reverse happy_var_3) happy_var_5+ ) `HappyStk` happyRest}}}++happyReduce_20 = happyReduce 9# 14# happyReduction_20+happyReduction_20 (happy_x_9 `HappyStk`+ happy_x_8 `HappyStk`+ 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 happyOut17 happy_x_2 of { happy_var_2 -> + case happyOut31 happy_x_3 of { happy_var_3 -> + case happyOut27 happy_x_5 of { happy_var_5 -> + case happyOut22 happy_x_8 of { happy_var_8 -> + happyIn19+ (DefDataWith happy_var_2 (reverse happy_var_3) happy_var_5 happy_var_8+ ) `HappyStk` happyRest}}}}++happyReduce_21 = happySpecReduce_3 14# happyReduction_21+happyReduction_21 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut17 happy_x_2 of { happy_var_2 -> + case happyOut31 happy_x_3 of { happy_var_3 -> + happyIn19+ (DefDataEmpty happy_var_2 (reverse happy_var_3)+ )}}++happyReduce_22 = happySpecReduce_0 15# happyReduction_22+happyReduction_22 = happyIn20+ ([]+ )++happyReduce_23 = happySpecReduce_1 15# happyReduction_23+happyReduction_23 happy_x_1+ = case happyOut19 happy_x_1 of { happy_var_1 -> + happyIn20+ ((:[]) happy_var_1+ )}++happyReduce_24 = happySpecReduce_3 15# happyReduction_24+happyReduction_24 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut19 happy_x_1 of { happy_var_1 -> + case happyOut20 happy_x_3 of { happy_var_3 -> + happyIn20+ ((:) happy_var_1 happy_var_3+ )}}++happyReduce_25 = happySpecReduce_3 16# happyReduction_25+happyReduction_25 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut23 happy_x_1 of { happy_var_1 -> + case happyOut34 happy_x_3 of { happy_var_3 -> + happyIn21+ (FunCase happy_var_1 happy_var_3+ )}}++happyReduce_26 = happySpecReduce_0 17# happyReduction_26+happyReduction_26 = happyIn22+ ([]+ )++happyReduce_27 = happySpecReduce_1 17# happyReduction_27+happyReduction_27 happy_x_1+ = case happyOut21 happy_x_1 of { happy_var_1 -> + happyIn22+ ((:[]) happy_var_1+ )}++happyReduce_28 = happySpecReduce_3 17# happyReduction_28+happyReduction_28 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut21 happy_x_1 of { happy_var_1 -> + case happyOut22 happy_x_3 of { happy_var_3 -> + happyIn22+ ((:) happy_var_1 happy_var_3+ )}}++happyReduce_29 = happySpecReduce_2 18# happyReduction_29+happyReduction_29 happy_x_2+ happy_x_1+ = case happyOut17 happy_x_1 of { happy_var_1 -> + case happyOut25 happy_x_2 of { happy_var_2 -> + happyIn23+ (Pattern happy_var_1 (reverse happy_var_2)+ )}}++happyReduce_30 = happySpecReduce_1 19# happyReduction_30+happyReduction_30 happy_x_1+ = case happyOut40 happy_x_1 of { happy_var_1 -> + happyIn24+ (ParVar happy_var_1+ )}++happyReduce_31 = happySpecReduce_1 19# happyReduction_31+happyReduction_31 happy_x_1+ = case happyOut7 happy_x_1 of { happy_var_1 -> + happyIn24+ (ParLeft happy_var_1+ )}++happyReduce_32 = happySpecReduce_1 19# happyReduction_32+happyReduction_32 happy_x_1+ = case happyOut8 happy_x_1 of { happy_var_1 -> + happyIn24+ (ParRight happy_var_1+ )}++happyReduce_33 = happySpecReduce_2 19# happyReduction_33+happyReduction_33 happy_x_2+ happy_x_1+ = case happyOut15 happy_x_1 of { happy_var_1 -> + happyIn24+ (ParEmpty happy_var_1+ )}++happyReduce_34 = happySpecReduce_3 19# happyReduction_34+happyReduction_34 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut15 happy_x_1 of { happy_var_1 -> + case happyOut23 happy_x_2 of { happy_var_2 -> + happyIn24+ (ParPat happy_var_1 happy_var_2+ )}}++happyReduce_35 = happySpecReduce_0 20# happyReduction_35+happyReduction_35 = happyIn25+ ([]+ )++happyReduce_36 = happySpecReduce_2 20# happyReduction_36+happyReduction_36 happy_x_2+ happy_x_1+ = case happyOut25 happy_x_1 of { happy_var_1 -> + case happyOut24 happy_x_2 of { happy_var_2 -> + happyIn25+ (flip (:) happy_var_1 happy_var_2+ )}}++happyReduce_37 = happySpecReduce_2 21# happyReduction_37+happyReduction_37 happy_x_2+ happy_x_1+ = case happyOut17 happy_x_1 of { happy_var_1 -> + case happyOut29 happy_x_2 of { happy_var_2 -> + happyIn26+ (Con happy_var_1 (reverse happy_var_2)+ )}}++happyReduce_38 = happySpecReduce_1 22# happyReduction_38+happyReduction_38 happy_x_1+ = case happyOut26 happy_x_1 of { happy_var_1 -> + happyIn27+ ((:[]) happy_var_1+ )}++happyReduce_39 = happySpecReduce_3 22# happyReduction_39+happyReduction_39 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut26 happy_x_1 of { happy_var_1 -> + case happyOut27 happy_x_3 of { happy_var_3 -> + happyIn27+ ((:) happy_var_1 happy_var_3+ )}}++happyReduce_40 = happyReduce 5# 23# happyReduction_40+happyReduction_40 (happy_x_5 `HappyStk`+ happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest)+ = case happyOut15 happy_x_1 of { happy_var_1 -> + case happyOut34 happy_x_2 of { happy_var_2 -> + case happyOut34 happy_x_4 of { happy_var_4 -> + happyIn28+ (VarTele happy_var_1 happy_var_2 happy_var_4+ ) `HappyStk` happyRest}}}++happyReduce_41 = happySpecReduce_1 23# happyReduction_41+happyReduction_41 happy_x_1+ = case happyOut39 happy_x_1 of { happy_var_1 -> + happyIn28+ (TypeTele happy_var_1+ )}++happyReduce_42 = happySpecReduce_0 24# happyReduction_42+happyReduction_42 = happyIn29+ ([]+ )++happyReduce_43 = happySpecReduce_2 24# happyReduction_43+happyReduction_43 happy_x_2+ happy_x_1+ = case happyOut29 happy_x_1 of { happy_var_1 -> + case happyOut28 happy_x_2 of { happy_var_2 -> + happyIn29+ (flip (:) happy_var_1 happy_var_2+ )}}++happyReduce_44 = happyReduce 5# 25# happyReduction_44+happyReduction_44 (happy_x_5 `HappyStk`+ happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest)+ = case happyOut15 happy_x_1 of { happy_var_1 -> + case happyOut34 happy_x_2 of { happy_var_2 -> + case happyOut34 happy_x_4 of { happy_var_4 -> + happyIn30+ (DataTele happy_var_1 happy_var_2 happy_var_4+ ) `HappyStk` happyRest}}}++happyReduce_45 = happySpecReduce_0 26# happyReduction_45+happyReduction_45 = happyIn31+ ([]+ )++happyReduce_46 = happySpecReduce_2 26# happyReduction_46+happyReduction_46 happy_x_2+ happy_x_1+ = case happyOut31 happy_x_1 of { happy_var_1 -> + case happyOut30 happy_x_2 of { happy_var_2 -> + happyIn31+ (flip (:) happy_var_1 happy_var_2+ )}}++happyReduce_47 = happyReduce 5# 27# happyReduction_47+happyReduction_47 (happy_x_5 `HappyStk`+ happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest)+ = case happyOut15 happy_x_1 of { happy_var_1 -> + case happyOut34 happy_x_2 of { happy_var_2 -> + case happyOut34 happy_x_4 of { happy_var_4 -> + happyIn32+ (PiTele happy_var_1 happy_var_2 happy_var_4+ ) `HappyStk` happyRest}}}++happyReduce_48 = happySpecReduce_1 28# happyReduction_48+happyReduction_48 happy_x_1+ = case happyOut32 happy_x_1 of { happy_var_1 -> + happyIn33+ ((:[]) happy_var_1+ )}++happyReduce_49 = happySpecReduce_2 28# happyReduction_49+happyReduction_49 happy_x_2+ happy_x_1+ = case happyOut32 happy_x_1 of { happy_var_1 -> + case happyOut33 happy_x_2 of { happy_var_2 -> + happyIn33+ ((:) happy_var_1 happy_var_2+ )}}++happyReduce_50 = happyReduce 4# 29# happyReduction_50+happyReduction_50 (happy_x_4 `HappyStk`+ happy_x_3 `HappyStk`+ happy_x_2 `HappyStk`+ happy_x_1 `HappyStk`+ happyRest)+ = case happyOut14 happy_x_1 of { happy_var_1 -> + case happyOut41 happy_x_2 of { happy_var_2 -> + case happyOut34 happy_x_4 of { happy_var_4 -> + happyIn34+ (Lam happy_var_1 happy_var_2 happy_var_4+ ) `HappyStk` happyRest}}}++happyReduce_51 = happySpecReduce_1 29# happyReduction_51+happyReduction_51 happy_x_1+ = case happyOut35 happy_x_1 of { happy_var_1 -> + happyIn34+ (happy_var_1+ )}++happyReduce_52 = happySpecReduce_3 30# happyReduction_52+happyReduction_52 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut36 happy_x_1 of { happy_var_1 -> + case happyOut35 happy_x_3 of { happy_var_3 -> + happyIn35+ (Arr happy_var_1 happy_var_3+ )}}++happyReduce_53 = happySpecReduce_3 30# happyReduction_53+happyReduction_53 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut33 happy_x_1 of { happy_var_1 -> + case happyOut35 happy_x_3 of { happy_var_3 -> + happyIn35+ (Pi happy_var_1 happy_var_3+ )}}++happyReduce_54 = happySpecReduce_1 30# happyReduction_54+happyReduction_54 happy_x_1+ = case happyOut36 happy_x_1 of { happy_var_1 -> + happyIn35+ (happy_var_1+ )}++happyReduce_55 = happySpecReduce_3 31# happyReduction_55+happyReduction_55 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut37 happy_x_1 of { happy_var_1 -> + case happyOut37 happy_x_3 of { happy_var_3 -> + happyIn36+ (PathImp happy_var_1 happy_var_3+ )}}++happyReduce_56 = happySpecReduce_1 31# happyReduction_56+happyReduction_56 happy_x_1+ = case happyOut37 happy_x_1 of { happy_var_1 -> + happyIn36+ (happy_var_1+ )}++happyReduce_57 = happySpecReduce_3 32# happyReduction_57+happyReduction_57 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut37 happy_x_1 of { happy_var_1 -> + case happyOut38 happy_x_3 of { happy_var_3 -> + happyIn37+ (At happy_var_1 happy_var_3+ )}}++happyReduce_58 = happySpecReduce_1 32# happyReduction_58+happyReduction_58 happy_x_1+ = case happyOut38 happy_x_1 of { happy_var_1 -> + happyIn37+ (happy_var_1+ )}++happyReduce_59 = happySpecReduce_2 33# happyReduction_59+happyReduction_59 happy_x_2+ happy_x_1+ = case happyOut38 happy_x_1 of { happy_var_1 -> + case happyOut39 happy_x_2 of { happy_var_2 -> + happyIn38+ (App happy_var_1 happy_var_2+ )}}++happyReduce_60 = happySpecReduce_1 33# happyReduction_60+happyReduction_60 happy_x_1+ = case happyOut39 happy_x_1 of { happy_var_1 -> + happyIn38+ (happy_var_1+ )}++happyReduce_61 = happySpecReduce_1 34# happyReduction_61+happyReduction_61 happy_x_1+ = case happyOut40 happy_x_1 of { happy_var_1 -> + happyIn39+ (Var happy_var_1+ )}++happyReduce_62 = happySpecReduce_1 34# happyReduction_62+happyReduction_62 happy_x_1+ = case happyOut5 happy_x_1 of { happy_var_1 -> + happyIn39+ (Universe happy_var_1+ )}++happyReduce_63 = happySpecReduce_1 34# happyReduction_63+happyReduction_63 happy_x_1+ = case happyOut6 happy_x_1 of { happy_var_1 -> + happyIn39+ (Interval happy_var_1+ )}++happyReduce_64 = happySpecReduce_1 34# happyReduction_64+happyReduction_64 happy_x_1+ = case happyOut7 happy_x_1 of { happy_var_1 -> + happyIn39+ (ELeft happy_var_1+ )}++happyReduce_65 = happySpecReduce_1 34# happyReduction_65+happyReduction_65 happy_x_1+ = case happyOut8 happy_x_1 of { happy_var_1 -> + happyIn39+ (ERight happy_var_1+ )}++happyReduce_66 = happySpecReduce_1 34# happyReduction_66+happyReduction_66 happy_x_1+ = case happyOut9 happy_x_1 of { happy_var_1 -> + happyIn39+ (Path happy_var_1+ )}++happyReduce_67 = happySpecReduce_1 34# happyReduction_67+happyReduction_67 happy_x_1+ = case happyOut10 happy_x_1 of { happy_var_1 -> + happyIn39+ (PathCon happy_var_1+ )}++happyReduce_68 = happySpecReduce_1 34# happyReduction_68+happyReduction_68 happy_x_1+ = case happyOut11 happy_x_1 of { happy_var_1 -> + happyIn39+ (Coe happy_var_1+ )}++happyReduce_69 = happySpecReduce_1 34# happyReduction_69+happyReduction_69 happy_x_1+ = case happyOut12 happy_x_1 of { happy_var_1 -> + happyIn39+ (Iso happy_var_1+ )}++happyReduce_70 = happySpecReduce_1 34# happyReduction_70+happyReduction_70 happy_x_1+ = case happyOut13 happy_x_1 of { happy_var_1 -> + happyIn39+ (Squeeze happy_var_1+ )}++happyReduce_71 = happySpecReduce_3 34# happyReduction_71+happyReduction_71 happy_x_3+ happy_x_2+ happy_x_1+ = case happyOut15 happy_x_1 of { happy_var_1 -> + case happyOut34 happy_x_2 of { happy_var_2 -> + happyIn39+ (Paren happy_var_1 happy_var_2+ )}}++happyReduce_72 = happySpecReduce_1 35# happyReduction_72+happyReduction_72 happy_x_1+ = case happyOut17 happy_x_1 of { happy_var_1 -> + happyIn40+ (Arg happy_var_1+ )}++happyReduce_73 = happySpecReduce_1 35# happyReduction_73+happyReduction_73 happy_x_1+ = case happyOut16 happy_x_1 of { happy_var_1 -> + happyIn40+ (NoArg happy_var_1+ )}++happyReduce_74 = happySpecReduce_1 36# happyReduction_74+happyReduction_74 happy_x_1+ = case happyOut40 happy_x_1 of { happy_var_1 -> + happyIn41+ ((:[]) happy_var_1+ )}++happyReduce_75 = happySpecReduce_2 36# happyReduction_75+happyReduction_75 happy_x_2+ happy_x_1+ = case happyOut40 happy_x_1 of { happy_var_1 -> + case happyOut41 happy_x_2 of { happy_var_2 -> + happyIn41+ ((:) happy_var_1 happy_var_2+ )}}++happyNewToken action sts stk [] =+ happyDoAction 26# notHappyAtAll action sts stk []++happyNewToken action sts stk (tk:tks) =+ let cont i = happyDoAction i tk action sts stk tks in+ case tk of {+ PT _ (TS _ 1) -> cont 1#;+ PT _ (TS _ 2) -> cont 2#;+ PT _ (TS _ 3) -> cont 3#;+ PT _ (TS _ 4) -> cont 4#;+ PT _ (TS _ 5) -> cont 5#;+ PT _ (TS _ 6) -> cont 6#;+ PT _ (TS _ 7) -> cont 7#;+ PT _ (TS _ 8) -> cont 8#;+ PT _ (TS _ 9) -> cont 9#;+ PT _ (TS _ 10) -> cont 10#;+ PT _ (TS _ 11) -> cont 11#;+ PT _ (T_U _) -> cont 12#;+ PT _ (T_I _) -> cont 13#;+ PT _ (T_PLeft _) -> cont 14#;+ PT _ (T_PRight _) -> cont 15#;+ PT _ (T_PPath _) -> cont 16#;+ PT _ (T_Ppath _) -> cont 17#;+ PT _ (T_PCoe _) -> cont 18#;+ PT _ (T_PIso _) -> cont 19#;+ PT _ (T_PSqueeze _) -> cont 20#;+ PT _ (T_PLam _) -> cont 21#;+ PT _ (T_PPar _) -> cont 22#;+ PT _ (T_Pus _) -> cont 23#;+ PT _ (T_PIdent _) -> cont 24#;+ _ -> cont 25#;+ _ -> happyError' (tk:tks)+ }++happyError_ 26# tk tks = happyError' tks+happyError_ _ tk tks = happyError' (tk:tks)++happyThen :: () => Err a -> (a -> Err b) -> Err b+happyThen = (thenM)+happyReturn :: () => a -> Err a+happyReturn = (returnM)+happyThen1 m k tks = (thenM) m (\a -> k a tks)+happyReturn1 :: () => a -> b -> Err a+happyReturn1 = \a tks -> (returnM) a+happyError' :: () => [(Token)] -> Err a+happyError' = happyError++pDefs tks = happySomeParser where+ happySomeParser = happyThen (happyParse 0# tks) (\x -> happyReturn (happyOut18 x))++pExpr tks = happySomeParser where+ happySomeParser = happyThen (happyParse 1# tks) (\x -> happyReturn (happyOut34 x))++happySeq = happyDontSeq+++returnM :: a -> Err a+returnM = return++thenM :: Err a -> (a -> Err b) -> Err b+thenM = (>>=)++happyError :: [Token] -> Err a+happyError ts =+ Bad $ "syntax error at " ++ tokenPos ts ++ + case ts of+ [] -> []+ [Err _] -> " due to lexer error"+ _ -> " before " ++ unwords (map (id . prToken) (take 4 ts))++myLexer = tokens+{-# LINE 1 "templates/GenericTemplate.hs" #-}+{-# LINE 1 "templates/GenericTemplate.hs" #-}+{-# LINE 1 "<command-line>" #-}+{-# LINE 1 "templates/GenericTemplate.hs" #-}+-- Id: GenericTemplate.hs,v 1.26 2005/01/14 14:47:22 simonmar Exp ++{-# LINE 30 "templates/GenericTemplate.hs" #-}+++data Happy_IntList = HappyCons Happy_GHC_Exts.Int# Happy_IntList++++++{-# LINE 51 "templates/GenericTemplate.hs" #-}++{-# LINE 61 "templates/GenericTemplate.hs" #-}++{-# LINE 70 "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 i tk st+ -1# -> {- nothing -}+ happyAccept i tk st+ n | (n Happy_GHC_Exts.<# (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) = indexShortOffAddr happyActOffsets st+ (off_i) = (off Happy_GHC_Exts.+# i)+ check = if (off_i Happy_GHC_Exts.>=# (0# :: Happy_GHC_Exts.Int#))+ then (indexShortOffAddr happyCheck off_i Happy_GHC_Exts.==# i)+ else False+ (action)+ | check = indexShortOffAddr happyTable off_i+ | otherwise = indexShortOffAddr happyDefActions st++{-# LINE 130 "templates/GenericTemplate.hs" #-}+++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#++++++data HappyAddr = HappyA# Happy_GHC_Exts.Addr#+++++-----------------------------------------------------------------------------+-- HappyState data type (not arrays)++{-# LINE 163 "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 =+ happyThen1 (fn stk tk) (\r -> happyGoto nt j tk st1 sts1 (r `HappyStk` drop_stk))+ where (sts1@((HappyCons (st1@(action)) (_)))) = happyDrop k (HappyCons (st) (sts))+ drop_stk = happyDropStk k 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 =+ happyThen1 (fn stk tk) (\r -> happyNewToken new_state sts1 (r `HappyStk` drop_stk))+ where (sts1@((HappyCons (st1@(action)) (_)))) = happyDrop k (HappyCons (st) (sts))+ drop_stk = happyDropStk k stk++ (off) = indexShortOffAddr happyGotoOffsets st1+ (off_i) = (off Happy_GHC_Exts.+# nt)+ (new_state) = indexShortOffAddr happyTable off_i+++++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) = 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 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_ 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 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.
+ examples/basics.hoq view
@@ -0,0 +1,122 @@+-- Pi types+id : (A : Type) -> A -> A+id A a = a++-- Universes+-- Type and Type0 are synonyms+universes : (f : Type1 -> Type0) -> f Type0 -> f Type0+universes f = id (f Type0)++-- Universes are cumulative+cumulative : Type3 -> Type8+cumulative A = A++-- Lambdas+compose : (A B C : Type) -> (B -> C) -> (A -> B) -> A -> C+compose A B C = \g f a -> g (f a)++-- Data types+data Bool = false | true++data Nat = zero | suc Nat++data List (A : Type) = nil | cons A (List A)++-- Pattern matching+not : Bool -> Bool+not true = false+not false = true++and : Bool -> Bool -> Bool+and true true = true+and _ _ = false++-- Recursive functions+plus : Nat -> Nat -> Nat+plus zero y = y+plus (suc x) y = suc (plus x y)++ack : Nat -> Nat -> Nat+ack zero n = suc n+ack (suc m) zero = ack m (suc zero)+ack (suc m) (suc n) = ack m (ack (suc m) n)++-- Interval type+-- I is a type with constructors left : I and right : I+-- coe and squeeze are primitive operators which satisfy the following rules:+-- +-- coe : (A : I -> Type) (i : I) -> A i -> (j : I) -> A j+-- coe A i a i = a+-- coe (\_ -> A) i a j = a+-- +-- squeeze : I -> I -> I+-- squeeze left _ = left+-- squeeze right j = j+-- squeeze _ left = left+-- squeeze i right = i++-- Path types+-- Path A a a' is a type with constructor path : (f : (i : I) -> A i) -> Path A (f left) (f right)+-- a = a' is a synonym for Path (\_ -> A) a a'+-- @ is an eliminator for Path, it has type Path A a a' -> (i : I) -> A i+-- path f @ i = f i++idp : (A : Type) (a : A) -> a = a+idp A a = path (\_ -> a)++transport : (A : Type) (B : A -> Type) (a a' : A) -> a = a' -> B a -> B a'+transport A B _ _ p x = coe (\i -> B (p @ i)) left x right++J : (A : Type) (B : (a a' : A) -> a = a' -> Type) -> ((a : A) -> B a a (idp A a)) -> (a a' : A) (p : a = a') -> B a a' p+J A B d a a' p = coe (\i -> B a (p @ i) (path (\j -> p @ squeeze i j))) left (d a) right++ext : (A : Type) (B : A -> Type) (f g : (a : A) -> B a) -> ((a : A) -> f a = g a) -> f = g+ext A B f g p = path (\i a -> p a @ i)++-- Univalence+not-not : (x : Bool) -> not (not x) = x+not-not true = idp Bool true+not-not false = idp Bool false++biso : Bool = Bool+biso = path (iso Bool Bool not not not-not not-not)++-- coe satisfies the following rules:+-- coe (iso A B f g p q) left a right = f a+-- coe (iso A B f g p q) right b left = g b+biso-not : coe (\i -> biso @ i) left true right = false+biso-not = idp Bool false++biso-not-not : coe (\i -> biso @ i) right (coe (\i -> biso @ i) left true right) left = true+biso-not-not = idp Bool true++-- Data types with conditions+data Z = positive Nat | negative Nat with+ negative zero = positive zero++-- Now, this works,+succ : Z -> Z+succ (positive x) = positive (suc x)+succ (negative zero) = positive (suc zero)+succ (negative (suc x)) = negative x++-- but this don't+succ' : Z -> Z+succ' (positive x) = positive (suc x)+succ' (negative zero) = positive zero+succ' (negative (suc x)) = negative x++-- We can define higher inductive types using data types with conditions and the interval object+data Circle = base | loop I with+ loop left = base+ loop right = base++Circle-elim : (P : Circle -> Type) (b : P base) -> Path (\i -> P (loop i)) b b -> (x : Circle) -> P x+Circle-elim P b t base = b+Circle-elim P b t (loop i) = t @ i++Circle-elim' : (P : Circle -> Type) (b : P base) -> transport Circle P base base (path loop) b = b -> (x : Circle) -> P x+Circle-elim' P b t base = b+Circle-elim' P b t (loop i) = + coe (\j -> Path (\k -> P (loop k)) b (t @ j)) left+ (path (\j -> coe (\k -> P (loop k)) left b j)) right @ i
+ examples/circle.hoq view
@@ -0,0 +1,152 @@+data Nat = zero | suc Nat++data Z = positive Nat | negative Nat with+ negative zero = positive zero++Z-isSet : (x y : Z) (p q : x = y) -> p = q+Z-isSet = NotImplemented++succ : Z -> Z+succ (positive x) = positive (suc x)+succ (negative zero) = positive (suc zero)+succ (negative (suc x)) = negative x++pred : Z -> Z+pred (positive zero) = negative (suc zero)+pred (positive (suc x)) = positive x+pred (negative x) = negative (suc x)++data Circle = base | loop I with+ loop left = base+ loop right = base++idp : (A : Type) (a : A) -> a = a+idp A a = path (\_ -> a)++transport : (A : Type) (B : A -> Type) (a a' : A) -> a = a' -> B a -> B a'+transport A B _ _ p x = coe (\i -> B (p @ i)) left x right++psqueeze : (A : Type) (a a' : A) (p : a = a') (i : I) -> a = p @ i+psqueeze A a a' p i = path (\j -> p @ squeeze i j)++J : (A : Type) (a : A) (B : (a' : A) -> a = a' -> Type) -> B a (idp A a) -> (a' : A) (p : a = a') -> B a' p+J A a B b a' p = coe (\i -> B (p @ i) (psqueeze A a a' p i)) left b right++inv : (A : Type) (a a' : A) -> a = a' -> a' = a+inv A a a' p = transport A (\x -> x = a) a a' p (idp A a)++comp : (A : Type) (a a' a'' : A) -> a = a' -> a' = a'' -> a = a''+comp A a a' a'' p q = transport A (\x -> a = x) a' a'' q p++comp' : base = base -> base = base -> base = base+comp' = comp Circle base base base++inv' : base = base -> base = base+inv' = inv Circle base base++wind : Z -> base = base+wind (positive zero) = idp Circle base+wind (positive (suc x)) = comp' (wind (positive x)) (path loop)+wind (negative (suc x)) = comp' (wind (negative x)) (inv' (path loop))++pred-succ : (x : Z) -> pred (succ x) = x+pred-succ (positive x) = idp Z (positive x)+pred-succ (negative (suc x)) = idp Z (negative (suc x))++succ-pred : (x : Z) -> succ (pred x) = x+succ-pred (positive zero) = idp Z (positive zero)+succ-pred (positive (suc x)) = idp Z (positive (suc x))+succ-pred (negative x) = idp Z (negative x)++iter : I -> Type+iter i = iso Z Z succ pred pred-succ succ-pred i++code : Circle -> Type+code base = Z+code (loop i) = iter i++encode : (x : Circle) -> base = x -> code x+encode _ p = coe (\i -> code (p @ i)) left (positive zero) right++assoc : (p q r : base = base) -> comp' (comp' p q) r = comp' p (comp' q r)+assoc p q = J Circle base+ (\x s -> comp Circle base base x (comp' p q) s = comp Circle base base x p (comp Circle base base x q s))+ (idp (base = base) (comp' p q)) base++map : (A B : Type) (f : A -> B) -> (a a' : A) -> a = a' -> f a = f a'+map A B f a a' p = transport A (\x -> f a = f x) a a' p (idp B (f a))++inv-idp : (p : base = base) -> comp' (inv' p) p = idp Circle base+inv-idp = J Circle base (\x q -> comp Circle x base x (inv Circle base x q) q = idp Circle x)+ (idp (base = base) (idp Circle base)) base++wind-succ-loop-neg : (x : Nat) -> comp' (wind (pred (negative x))) (path loop) = wind (negative x)+wind-succ-loop-neg x =+ comp (base = base) (comp' (comp' (wind (negative x)) (inv' (path loop))) (path loop))+ (comp' (wind (negative x)) (comp' (inv' (path loop)) (path loop)))+ (wind (negative x))+ (assoc (wind (negative x)) (inv' (path loop)) (path loop))+ (map (base = base) (base = base) (comp' (wind (negative x)))+ (comp' (inv' (path loop)) (path loop)) (idp Circle base) (inv-idp (path loop)))++wind-succ-loop : (x : Z) -> comp' (wind (pred x)) (path loop) = wind x+wind-succ-loop (positive zero) = wind-succ-loop-neg zero+wind-succ-loop (positive (suc x)) = idp (base = base) (wind (positive (suc x)))+wind-succ-loop (negative x) = wind-succ-loop-neg x++decode : (x : Circle) -> code x -> base = x+decode base = wind+decode (loop i) =+ coe (\j -> Path (\k -> iter k -> base = loop k) wind (\y -> wind-succ-loop y @ j)) left+ (path (\k y -> comp Circle base base (loop k) (wind (coe iter k y left)) (psqueeze Circle base base (path loop) k)))+ right @ i++encode-decode : (x : Circle) (p : base = x) -> decode x (encode x p) = p+encode-decode = J Circle base (\x p -> decode x (encode x p) = p) (idp (base = base) (idp Circle base))++coe-comp : (p q : base = base) (z : Z) ->+ coe (\i -> code (comp' p q @ i)) left z right =+ coe (\i -> code (q @ i)) left (coe (\i -> code (p @ i)) left z right) right+coe-comp p q z = J Circle base (\x s -> coe (\i -> code (comp Circle base base x p s @ i)) left z right =+ coe (\i -> code (s @ i)) left (coe (\i -> code (p @ i)) left z right) right)+ (idp Z (coe (\i -> code (p @ i)) left z right)) base q++coe-inv : (p : base = base) (z : Z) -> coe (\i -> code (inv' p @ i)) left z right = coe (\i -> code (p @ i)) right z left+coe-inv = J Circle base (\x s -> (y : code x) ->+ coe (\i -> code (inv Circle base x s @ i)) left y right = coe (\i -> code (s @ i)) right y left) (idp Z) base++decode-encode-base : (z : Z) -> encode base (wind z) = z+decode-encode-base (positive zero) = idp Z (positive zero)+decode-encode-base (positive (suc x)) =+ comp Z (coe (\i -> code (comp' (wind (positive x)) (path loop) @ i)) left (positive zero) right)+ (succ (coe (\i -> code (wind (positive x) @ i)) left (positive zero) right))+ (positive (suc x))+ (coe-comp (wind (positive x)) (path loop) (positive zero))+ (map Z Z succ (coe (\i -> code (wind (positive x) @ i)) left (positive zero) right) (positive x)+ (decode-encode-base (positive x)))+decode-encode-base (negative (suc x)) =+ comp Z (coe (\i -> code (comp' (wind (negative x)) (inv' (path loop)) @ i)) left (positive zero) right)+ (coe (\i -> code (inv' (path loop) @ i)) left (coe (\i -> code (wind (negative x) @ i)) left (positive zero) right) right)+ (negative (suc x))+ (coe-comp (wind (negative x)) (inv' (path loop)) (positive zero))+ (comp Z (coe (\i -> code (inv' (path loop) @ i)) left (coe (\i -> code (wind (negative x) @ i)) left (positive zero) right) right)+ (pred (coe (\i -> code (wind (negative x) @ i)) left (positive zero) right))+ (negative (suc x))+ (coe-inv (path loop) (coe (\i -> code (wind (negative x) @ i)) left (positive zero) right))+ (map Z Z pred (coe (\i -> code (wind (negative x) @ i)) left (positive zero) right) (negative x) (decode-encode-base (negative x)))+ )++Circle-elim' : (P : Circle -> Type) (b : P base) -> transport Circle P base base (path loop) b = b -> (x : Circle) -> P x+Circle-elim' P b t base = b+Circle-elim' P b t (loop i) = + coe (\j -> Path (\k -> P (loop k)) b (t @ j)) left+ (path (\j -> coe (\k -> P (loop k)) left b j)) right @ i++decode-encode : (x : Circle) (z : code x) -> encode x (decode x z) = z+decode-encode = Circle-elim' (\x -> (z : code x) -> encode x (decode x z) = z) decode-encode-base+ (path (\i z -> Z-isSet (coe (\i -> code (wind z @ i)) left (positive zero) right) z+ (transport Circle (\x -> (z : code x) -> encode x (decode x z) = z) base base (path loop) decode-encode-base z)+ (decode-encode-base z) @ i))++Circle-loop-space-is-Z : (base = base) = Z+Circle-loop-space-is-Z = path (iso (base = base) Z (encode base) (decode base) (encode-decode base) (decode-encode base))
+ examples/hlevel.hoq view
@@ -0,0 +1,77 @@+data Nat = zero | suc Nat++data Sigma (A : Type) (B : A -> Type) = pair (a : A) (B a)++proj1 : (A : Type) (B : A -> Type) -> Sigma A B -> A+proj1 _ _ (pair a _) = a++proj2 : (A : Type) (B : A -> Type) (x : Sigma A B) -> B (proj1 A B x)+proj2 _ _ (pair _ b) = b++isContr : Type -> Type+isContr A = Sigma A (\a -> (a' : A) -> a = a')++I-isContr : isContr I+I-isContr = pair left (\i -> path (\j -> squeeze i j))++isProp : Type -> Type+isProp A = (a a' : A) -> a = a'++isSet : Type -> Type+isSet A = (a a' : A) -> isProp (a = a')++of-hlevel : Nat -> Type -> Type+of-hlevel zero A = isContr A+of-hlevel (suc n) A = (a a' : A) -> of-hlevel n (a = a')++h1-prop : (A : Type) -> of-hlevel (suc zero) A -> isProp A+h1-prop A f a a' = proj1 (a = a') (\p -> (p' : a = a') -> p = p') (f a a')++idp : (A : Type) (a : A) -> a = a+idp A a = path (\_ -> a)++transport : (A : Type) (B : A -> Type) (a a' : A) -> a = a' -> B a -> B a'+transport A B _ _ p x = coe (\i -> B (p @ i)) left x right++psqueeze : (A : Type) (a a' : A) (p : a = a') (i : I) -> a = p @ i+psqueeze A a a' p i = path (\j -> p @ squeeze i j)++J : (A : Type) (a : A) (B : (a' : A) -> a = a' -> Type) -> B a (idp A a) -> (a' : A) (p : a = a') -> B a' p+J A a B b a' p = coe (\i -> B (p @ i) (psqueeze A a a' p i)) left b right++inv : (A : Type) (a a' : A) -> a = a' -> a' = a+inv A a a' p = transport A (\x -> x = a) a a' p (idp A a)++comp : (A : Type) (a a' a'' : A) -> a = a' -> a' = a'' -> a = a''+comp A a a' a'' p q = transport A (\x -> a = x) a' a'' q p++inv-comp : (A : Type) (a a' : A) (p : a = a') -> comp A a' a a' (inv A a a' p) p = idp A a'+inv-comp A a a' p = J A a (\x q -> comp A x a x (inv A a x q) q = idp A x) (idp (a = a) (idp A a)) a' p++contr-prop : (A : Type) -> isContr A -> isProp A+contr-prop A (pair c f) a a' = comp A a c a' (inv A c a (f a)) (f a')++prop-h1 : (A : Type) -> isProp A -> of-hlevel (suc zero) A+prop-h1 A f a a' = pair (comp A a a a' (inv A a a (f a a)) (f a a'))+ (J A a (\x q -> comp A a a x (inv A a a (f a a)) (f a x) = q) (inv-comp A a a (f a a)) a')++prop-set : (A : Type) -> isProp A -> isSet A+prop-set A p a a' = contr-prop (a = a') (prop-h1 A p a a')++isProp-isProp : (A : Type) -> isProp (isProp A)+isProp-isProp A f g = path (\i a a' -> prop-set A f a a' (f a a') (g a a') @ i)++Sigma-eq : (A : Type) (B : A -> Type) (a a' : A) (b : B a) (b' : B a') (p : a = a')+ -> transport A B a a' p b = b' -> Path (\_ -> Sigma A B) (pair a b) (pair a' b')+Sigma-eq A B a a' b b' p = J A a+ (\a' p -> (b' : B a') -> transport A B a a' p b = b' -> Path (\_ -> Sigma A B) (pair a b) (pair a' b'))+ (\b' q -> path (\i -> pair a (q @ i))) a' p b'++isContr-isProp : (A : Type) -> isProp (isContr A)+isContr-isProp A (pair a1 f1) (pair a2 f2) = Sigma-eq A (\a -> (a' : A) -> a = a') a1 a2 f1 f2 (f1 a2)+ (path (\i a' -> prop-set A (contr-prop A (pair a1 f1)) a2 a'+ (transport A (\a -> (a' : A) -> a = a') a1 a2 (f1 a2) f1 a') (f2 a') @ i))++of-hlevel-isProp : (n : Nat) (A : Type) -> isProp (of-hlevel n A)+of-hlevel-isProp zero A = isContr-isProp A+of-hlevel-isProp (suc n) A f g = path (\i a a' -> of-hlevel-isProp n (a = a') (f a a') (g a a') @ i)
+ examples/lem.hoq view
@@ -0,0 +1,37 @@+data E+data S = s+data B = true | false++E-elim : (A : Type) -> E -> A+E-elim A ()++T : B -> Type+T true = S+T false = E++not : B -> B+not true = false+not false = true++not-not : (x : B) -> not (not x) = x+not-not true = path (\_ -> true)+not-not false = path (\_ -> false)++biso : I -> Type+biso i = iso B B not not not-not not-not i++not-eq : (b : B) -> not b = b -> E+not-eq true p = coe (\i -> T (p @ i)) right s left+not-eq false p = coe (\i -> T (p @ i)) left s right++transport : (A : Type) (B : A -> Type) (a a' : A) -> a = a' -> B a -> B a'+transport A B _ _ p x = coe (\i -> B (p @ i)) left x right++comp : (A : Type) (a a' a'' : A) -> a = a' -> a' = a'' -> a = a''+comp A a a' a'' p q = transport A (\x -> a = x) a' a'' q p++not-lem : ((A : Type) -> ((A -> E) -> E) -> A) -> E+not-lem f = not-eq (f B (\g -> g true))+ (comp B (not (f B (\g -> g true))) (f B (\g -> g false)) (f B (\g -> g true))+ (path (\i -> coe biso i (f (biso i) (\g -> g (coe biso left true i))) right))+ (path (\i -> f B (\g -> g (E-elim (false = true) (g true) @ i)))))
+ hoq.cabal view
@@ -0,0 +1,55 @@+name: hoq+version: 0.1.0.0+synopsis: A language based on homotopy type theory with an interval object+-- description: +tested-with: GHC == 7.6.3+homepage: http://github.com/valis/hoq+license: GPL-2+license-file: LICENSE+author: isaev+maintainer: valery.isaev@gmail.com+category: Dependent Types+build-type: Custom+cabal-version: >=1.10+data-dir: data+data-files: hoq.vim+extra-source-files: README.md,+ src/Syntax/Grammar.cf,+ examples/basics.hoq,+ examples/hlevel.hoq,+ examples/circle.hoq,+ examples/lem.hoq++source-repository head+ type: git+ location: git://github.com/valis/hoq.git++executable hoq+ main-is: Main.hs+ other-modules: REPL,+ Normalization, + File.Load,+ Syntax.BNFC.ParGrammar,+ Syntax.BNFC.LexGrammar,+ Syntax.Term, Syntax.Scope,+ Syntax.Expr, Syntax.PrettyPrinter,+ Syntax.ErrorDoc, Syntax.Pattern,+ TypeChecking.Definitions.Patterns,+ TypeChecking.Definitions.Coverage,+ TypeChecking.Definitions.DataTypes,+ TypeChecking.Definitions.Functions,+ TypeChecking.Definitions.Conditions,+ TypeChecking.Definitions.Termination,+ TypeChecking.Definitions,+ TypeChecking.Expressions,+ TypeChecking.Monad.Scope,+ TypeChecking.Monad.Warn,+ TypeChecking.Monad,+ TypeChecking.Context+ build-depends: base >=4.6 && <4.7, mtl >=2.1,+ BNFC >= 2.5, array >= 0.4, pretty >=1.1,+ prelude-extras >=0.4, readline >=1.0+ build-tools: happy >= 1.15 && < 2,+ alex >= 2.3.1 && < 3.1+ hs-source-dirs: src+ default-language: Haskell2010
+ src/File/Load.hs view
@@ -0,0 +1,35 @@+module File.Load+ ( loadFile+ ) where++import System.IO+import Control.Monad.Fix+import Control.Monad.Trans+import Control.Exception++import Syntax.BNFC.ErrM+import Syntax.BNFC.ParGrammar+import Syntax.BNFC.LayoutGrammar+import Syntax.ErrorDoc+import Syntax.PrettyPrinter()+import Syntax.Expr+import TypeChecking.Definitions+import TypeChecking.Monad++loadFile :: (MonadIO m, MonadFix m) => String -> ScopeM m ()+loadFile filename = do+ (errs, _) <- runWarnT $ do+ mcnt <- liftIO $ fmap Right (readFile filename)+ `catch` \e -> return $ Left $ show (e :: SomeException)+ case mcnt of+ Right cnt -> parseDefs cnt+ Left err -> warn [emsg err enull]+ liftIO $ mapM_ (hPutStrLn stderr . erenderWithFilename filename) errs++parseDefs :: MonadFix m => String -> TCM m ()+parseDefs s = case parser s of+ Ok (Defs defs) -> typeCheckDefs defs+ Bad err -> warn [emsg err enull]+ where+ parser :: String -> Err Defs+ parser = pDefs . resolveLayout True . myLexer
+ src/Main.hs view
@@ -0,0 +1,12 @@+module Main where++import System.Environment++import File.Load+import TypeChecking.Monad.Scope+import REPL++main :: IO ()+main = do+ args <- getArgs+ runScopeT $ mapM_ loadFile args >> repl
+ src/Normalization.hs view
@@ -0,0 +1,104 @@+module Normalization+ ( NF(..), nf+ , nfType, nfScope+ ) where++import Control.Monad+import Data.Traversable++import Syntax.Term++data NF = NF | HNF | WHNF deriving Eq++nf :: Eq a => NF -> Term a -> Term a+nf mode e = go e []+ where+ go (App a b) ts = go a (b:ts)+ go e@Var{} ts = apps e (nfs mode ts)+ go e@Universe{} _ = e+ go (Pi a b lvl) _ | mode == NF = Pi (nfType NF a) (nfScope b) lvl+ go e@Pi{} _ = e+ go e@Interval _ = e+ go e@(ICon _) _ = e+ go (PCon Nothing) [] = PCon Nothing+ go (PCon Nothing) (e:_) = PCon $ Just $ if mode == NF then nf NF e else e+ go (PCon (Just e)) _ = PCon $ Just $ if mode == NF then nf NF e else e+ go (Con c lc n [] es) [] = Con c lc n [] $ nfs mode es+ go (Con c lc n [] es) ts = Con c lc n [] $ nfs mode (es ++ ts)+ go (DataType d e es) [] = DataType d e $ nfs mode es+ go (DataType d e es) ts = DataType d e $ nfs mode (es ++ ts)+ go (Path h ma es) [] = Path h (if mode == NF then fmap (nf NF) ma else ma) $ nfs mode es+ go (Path h ma es) ts = Path h (if mode == NF then fmap (nf NF) ma else ma) $ nfs mode (es ++ ts)+ go (Lam (Scope1 v t)) [] = Lam $ Scope1 v $ if mode == WHNF then t else nf mode t+ go (Lam (Scope1 _ s)) (t:ts) = go (instantiate1 t s) ts+ go (FunSyn _ term) ts = go term ts+ go (Con c lc n conds es) ts =+ let es' = if null ts then es else es ++ ts in+ case instantiateCases conds es' of+ Just (r,ts') -> go r ts'+ Nothing -> Con c lc n conds (if mode == NF then map (nf NF) es' else es')+ go fc@(FunCall _ _ []) ts = apps fc (nfs mode ts)+ go fc@(FunCall _ _ clauses) ts = case instantiateCases clauses ts of+ Just (r,ts') -> go r ts'+ Nothing -> apps fc (nfs mode ts)+ go (At a b e1 e2) ts = case (nf WHNF e1, nf WHNF e2) of+ (_, ICon ILeft) -> go a ts+ (_, ICon IRight) -> go b ts+ (PCon (Just t1), t2) -> go t1 (t2:ts)+ (t1, t2) -> apps (At (go a []) (go b []) (go t1 []) (go t2 [])) (nfs mode ts)+ go (Coe es) ts = case es ++ ts of+ es'@(e1:e2:e3:e4:es'') ->+ let e1' = nf WHNF e1+ e2' = nf NF e2+ e4' = nf NF e4+ in case (e2' == e4' || isStationary e1', e2' == ICon ILeft && e4' == ICon IRight,+ e2' == ICon IRight && e4' == ICon ILeft, e1') of+ (True, _, _, _) -> go e3 es''+ (_, b1, b2, Iso [t1,t2,t3,t4,t5,t6]) | b1 || b2 -> go (App (if b1 then t3 else t4) e3) es''+ (_, b1, b2, _) | b1 || b2 -> case nf NF $ App (fmap Free e1') (Var Bound) of+ Iso [t1,t2,t3,t4,t5,t6, Var Bound] -> case sequenceA $ Iso [t1,t2,t3,t4,t5,t6] of+ Free (Iso [t1',t2',t3',t4',t5',t6']) -> go (App (if b1 then t3' else t4') e3) es''+ _ -> Coe (nfs mode es')+ _ -> Coe (nfs mode es')+ _ -> Coe (nfs mode es')+ es' -> Coe (nfs mode es')+ go (Iso es) ts = case map (nf WHNF) (es ++ ts) of+ t1:t2:t3:t4:t5:t6: ICon ILeft : _ -> go t1 []+ t1:t2:t3:t4:t5:t6: ICon IRight : _ -> go t2 []+ _ -> Iso $ nfs mode (es ++ ts)+ go (Squeeze es) ts = case map (nf WHNF) (es ++ ts) of+ ICon ILeft : _ : _ -> ICon ILeft+ ICon IRight : j : _ -> if mode == WHNF then j else nf mode j+ _ : ICon ILeft : _ -> ICon ILeft+ i : ICon IRight : _ -> if mode == WHNF then i else nf mode i+ es' -> Squeeze $ nfs mode (es ++ ts)++nfType :: Eq a => NF -> Type a -> Type a+nfType mode (Type t lvl) = Type (nf mode t) lvl++nfScope :: Eq a => Scope s Term a -> Scope s Term a+nfScope (ScopeTerm t) = ScopeTerm (nf NF t)+nfScope (Scope v s) = Scope v (nfScope s)++isStationary :: Eq a => Term a -> Bool+isStationary t = case sequenceA (nf NF $ App (fmap Free t) $ Var Bound) of+ Free _ -> True+ Bound -> False++nfs :: Eq a => NF -> [Term a] -> [Term a]+nfs NF terms = map (nf NF) terms+nfs _ terms = terms++instantiatePat :: Eq a => [Pattern c] -> Scope b Term a -> [Term a] -> Maybe (Term a, [Term a])+instantiatePat [] (ScopeTerm term) terms = Just (term, terms)+instantiatePat (PatternVar _ : pats) (Scope _ scope) (term:terms) = instantiatePat pats (instantiateScope term scope) terms+instantiatePat (PatternI con : pats) scope (term:terms) = case nf WHNF term of+ ICon i | i == con -> instantiatePat pats scope terms+ _ -> Nothing+instantiatePat (Pattern (PatternCon con _ _ _) pats1 : pats) scope (term:terms) = case nf WHNF term of+ Con i _ n _ terms1 | i == con -> instantiatePat (pats1 ++ pats) scope (terms1 ++ terms)+ _ -> Nothing+instantiatePat _ _ _ = Nothing++instantiateCases :: Eq a => [([Pattern c], Closed (Scope b Term))] -> [Term a] -> Maybe (Term a, [Term a])+instantiateCases clauses terms = msum $ map (\(pats, Closed scope) -> instantiatePat pats scope terms) clauses
+ src/REPL.hs view
@@ -0,0 +1,53 @@+module REPL+ ( repl+ ) where++import System.Console.Readline+import System.Exit+import System.IO+import Control.Monad+import Control.Monad.Trans+import Text.PrettyPrint++import Syntax.BNFC.ParGrammar+import Syntax.BNFC.ErrM+import Syntax.Term+import Syntax.PrettyPrinter+import Syntax.ErrorDoc+import TypeChecking.Monad+import TypeChecking.Expressions+import Normalization++parseExpr :: Monad m => String -> TCM m (Term String)+parseExpr s = case pExpr (myLexer s) of+ Bad err -> throwError [emsg err enull]+ Ok expr -> liftM fst (typeCheck expr Nothing)++ep :: NF -> String -> ScopeM IO ()+ep mode str = do+ mres <- runWarnT (parseExpr str)+ liftIO $ case mres of+ ([], Nothing) -> return ()+ ([], Just term) -> putStrLn $ render $ ppTerm (nf mode term)+ (errs, _) -> mapM_ (hPutStrLn stderr . erender) errs++processCmd :: String -> String -> ScopeM IO ()+processCmd "quit" _ = liftIO exitSuccess+processCmd "nf" str = ep NF str+processCmd "hnf" str = ep HNF str+processCmd "whnf" str = ep WHNF str+processCmd cmd _ = liftIO $ hPutStrLn stderr $ "Unknown command " ++ cmd++repl :: ScopeM IO ()+repl = go ""+ where+ go last = do+ mline <- liftIO $ readline "> "+ case mline of+ Nothing -> liftIO $ putStrLn ""+ Just line -> case break (== ' ') line of+ ("",_) -> go last+ (c:cmd,line') -> do+ when (line /= last) $ liftIO (addHistory line)+ if c == ':' then processCmd cmd line' else ep NF line+ go line
+ src/Syntax/BNFC/LexGrammar.x view
@@ -0,0 +1,209 @@+-- -*- haskell -*-+-- This Alex file was machine-generated by the BNF converter+{+{-# OPTIONS -fno-warn-incomplete-patterns #-}+{-# OPTIONS_GHC -w #-}+module Syntax.BNFC.LexGrammar where++++import qualified Data.Bits+import Data.Word (Word8)+}+++$l = [a-zA-Z\192 - \255] # [\215 \247] -- isolatin1 letter FIXME+$c = [A-Z\192-\221] # [\215] -- capital isolatin1 letter FIXME+$s = [a-z\222-\255] # [\247] -- small isolatin1 letter FIXME+$d = [0-9] -- digit+$i = [$l $d _ '] -- identifier character+$u = [\0-\255] -- universal: any character++@rsyms = -- symbols and non-identifier-like reserved words+ \: | \= | \{ | \} | \; | \) | \| | \- \> | \@++:-+"--" [.]* ; -- Toss single line comments+"{-" ([$u # \-] | \- [$u # \}])* ("-")+ "}" ; ++$white+ ;+@rsyms { tok (\p s -> PT p (eitherResIdent (TV . share) s)) }+T y p e $d * { tok (\p s -> PT p (eitherResIdent (T_U . share) s)) }+I { tok (\p s -> PT p (eitherResIdent (T_I . share) s)) }+l e f t { tok (\p s -> PT p (eitherResIdent (T_PLeft . share) s)) }+r i g h t { tok (\p s -> PT p (eitherResIdent (T_PRight . share) s)) }+P a t h { tok (\p s -> PT p (eitherResIdent (T_PPath . share) s)) }+p a t h { tok (\p s -> PT p (eitherResIdent (T_Ppath . share) s)) }+c o e { tok (\p s -> PT p (eitherResIdent (T_PCoe . share) s)) }+i s o { tok (\p s -> PT p (eitherResIdent (T_PIso . share) s)) }+s q u e e z e { tok (\p s -> PT p (eitherResIdent (T_PSqueeze . share) s)) }+\\ { tok (\p s -> PT p (eitherResIdent (T_PLam . share) s)) }+\( { tok (\p s -> PT p (eitherResIdent (T_PPar . share) s)) }+\_ { tok (\p s -> PT p (eitherResIdent (T_Pus . share) s)) }+$l ($l | $d | \' | \_ | \-)* { tok (\p s -> PT p (eitherResIdent (T_PIdent . share) s)) }++$l $i* { tok (\p s -> PT p (eitherResIdent (TV . share) s)) }++++++{++tok f p s = f p s++share :: String -> String+share = id++data Tok =+ TS !String !Int -- reserved words and symbols+ | TL !String -- string literals+ | TI !String -- integer literals+ | TV !String -- identifiers+ | TD !String -- double precision float literals+ | TC !String -- character literals+ | T_U !String+ | T_I !String+ | T_PLeft !String+ | T_PRight !String+ | T_PPath !String+ | T_Ppath !String+ | T_PCoe !String+ | T_PIso !String+ | T_PSqueeze !String+ | T_PLam !String+ | T_PPar !String+ | T_Pus !String+ | T_PIdent !String++ deriving (Eq,Show,Ord)++data Token = + PT Posn Tok+ | Err Posn+ deriving (Eq,Show,Ord)++tokenPos (PT (Pn _ l _) _ :_) = "line " ++ show l+tokenPos (Err (Pn _ l _) :_) = "line " ++ show l+tokenPos _ = "end of file"++tokenPosn (PT p _) = p+tokenPosn (Err p) = p+tokenLineCol = posLineCol . tokenPosn+posLineCol (Pn _ l c) = (l,c)+mkPosToken t@(PT p _) = (posLineCol p, prToken t)++prToken t = case t of+ PT _ (TS s _) -> s+ PT _ (TL s) -> s+ PT _ (TI s) -> s+ PT _ (TV s) -> s+ PT _ (TD s) -> s+ PT _ (TC s) -> s+ PT _ (T_U s) -> s+ PT _ (T_I s) -> s+ PT _ (T_PLeft s) -> s+ PT _ (T_PRight s) -> s+ PT _ (T_PPath s) -> s+ PT _ (T_Ppath s) -> s+ PT _ (T_PCoe s) -> s+ PT _ (T_PIso s) -> s+ PT _ (T_PSqueeze s) -> s+ PT _ (T_PLam s) -> s+ PT _ (T_PPar s) -> s+ PT _ (T_Pus s) -> s+ PT _ (T_PIdent s) -> s+++data BTree = N | B String Tok BTree BTree deriving (Show)++eitherResIdent :: (String -> Tok) -> String -> Tok+eitherResIdent tv s = treeFind resWords+ where+ treeFind N = tv s+ treeFind (B a t left right) | s < a = treeFind left+ | s > a = treeFind right+ | s == a = t++resWords = b "@" 6 (b ":" 3 (b "->" 2 (b ")" 1 N N) N) (b "=" 5 (b ";" 4 N N) N)) (b "{" 9 (b "with" 8 (b "data" 7 N N) N) (b "}" 11 (b "|" 10 N N) N))+ where b s n = let bs = id s+ in B bs (TS bs n)++unescapeInitTail :: String -> String+unescapeInitTail = id . unesc . tail . id where+ unesc s = case s of+ '\\':c:cs | elem c ['\"', '\\', '\''] -> c : unesc cs+ '\\':'n':cs -> '\n' : unesc cs+ '\\':'t':cs -> '\t' : unesc cs+ '"':[] -> []+ c:cs -> c : unesc cs+ _ -> []++-------------------------------------------------------------------+-- Alex wrapper code.+-- A modified "posn" wrapper.+-------------------------------------------------------------------++data Posn = Pn !Int !Int !Int+ deriving (Eq, Show,Ord)++alexStartPos :: Posn+alexStartPos = Pn 0 1 1++alexMove :: Posn -> Char -> Posn+alexMove (Pn a l c) '\t' = Pn (a+1) l (((c+7) `div` 8)*8+1)+alexMove (Pn a l c) '\n' = Pn (a+1) (l+1) 1+alexMove (Pn a l c) _ = Pn (a+1) l (c+1)++type Byte = Word8++type AlexInput = (Posn, -- current position,+ Char, -- previous char+ [Byte], -- pending bytes on the current char+ String) -- current input string++tokens :: String -> [Token]+tokens str = go (alexStartPos, '\n', [], str)+ where+ go :: AlexInput -> [Token]+ go inp@(pos, _, _, str) =+ case alexScan inp 0 of+ AlexEOF -> []+ AlexError (pos, _, _, _) -> [Err pos]+ AlexSkip inp' len -> go inp'+ AlexToken inp' len act -> act pos (take len str) : (go inp')++alexGetByte :: AlexInput -> Maybe (Byte,AlexInput)+alexGetByte (p, c, (b:bs), s) = Just (b, (p, c, bs, s))+alexGetByte (p, _, [], s) =+ case s of+ [] -> Nothing+ (c:s) ->+ let p' = alexMove p c+ (b:bs) = utf8Encode c+ in p' `seq` Just (b, (p', c, bs, s))++alexInputPrevChar :: AlexInput -> Char+alexInputPrevChar (p, c, bs, s) = c++ -- | Encode a Haskell String to a list of Word8 values, in UTF8 format.+utf8Encode :: Char -> [Word8]+utf8Encode = map fromIntegral . go . ord+ where+ go oc+ | oc <= 0x7f = [oc]++ | oc <= 0x7ff = [ 0xc0 + (oc `Data.Bits.shiftR` 6)+ , 0x80 + oc Data.Bits..&. 0x3f+ ]++ | oc <= 0xffff = [ 0xe0 + (oc `Data.Bits.shiftR` 12)+ , 0x80 + ((oc `Data.Bits.shiftR` 6) Data.Bits..&. 0x3f)+ , 0x80 + oc Data.Bits..&. 0x3f+ ]+ | otherwise = [ 0xf0 + (oc `Data.Bits.shiftR` 18)+ , 0x80 + ((oc `Data.Bits.shiftR` 12) Data.Bits..&. 0x3f)+ , 0x80 + ((oc `Data.Bits.shiftR` 6) Data.Bits..&. 0x3f)+ , 0x80 + oc Data.Bits..&. 0x3f+ ]+}
+ src/Syntax/BNFC/ParGrammar.y view
@@ -0,0 +1,215 @@+-- This Happy file was machine-generated by the BNF converter+{+{-# OPTIONS_GHC -fno-warn-incomplete-patterns -fno-warn-overlapping-patterns #-}+module Syntax.BNFC.ParGrammar where+import Syntax.BNFC.AbsGrammar+import Syntax.BNFC.LexGrammar+import Syntax.BNFC.ErrM++}++%name pDefs Defs+%name pExpr Expr++-- no lexer declaration+%monad { Err } { thenM } { returnM }+%tokentype { Token }++%token + ')' { PT _ (TS _ 1) }+ '->' { PT _ (TS _ 2) }+ ':' { PT _ (TS _ 3) }+ ';' { PT _ (TS _ 4) }+ '=' { PT _ (TS _ 5) }+ '@' { PT _ (TS _ 6) }+ 'data' { PT _ (TS _ 7) }+ 'with' { PT _ (TS _ 8) }+ '{' { PT _ (TS _ 9) }+ '|' { PT _ (TS _ 10) }+ '}' { PT _ (TS _ 11) }++L_U { PT _ (T_U _) }+L_I { PT _ (T_I _) }+L_PLeft { PT _ (T_PLeft _) }+L_PRight { PT _ (T_PRight _) }+L_PPath { PT _ (T_PPath _) }+L_Ppath { PT _ (T_Ppath _) }+L_PCoe { PT _ (T_PCoe _) }+L_PIso { PT _ (T_PIso _) }+L_PSqueeze { PT _ (T_PSqueeze _) }+L_PLam { PT _ (T_PLam _) }+L_PPar { PT _ (T_PPar _) }+L_Pus { PT _ (T_Pus _) }+L_PIdent { PT _ (T_PIdent _) }+L_err { _ }+++%%++U :: { U} : L_U { U (mkPosToken $1)}+I :: { I} : L_I { I (mkPosToken $1)}+PLeft :: { PLeft} : L_PLeft { PLeft (mkPosToken $1)}+PRight :: { PRight} : L_PRight { PRight (mkPosToken $1)}+PPath :: { PPath} : L_PPath { PPath (mkPosToken $1)}+Ppath :: { Ppath} : L_Ppath { Ppath (mkPosToken $1)}+PCoe :: { PCoe} : L_PCoe { PCoe (mkPosToken $1)}+PIso :: { PIso} : L_PIso { PIso (mkPosToken $1)}+PSqueeze :: { PSqueeze} : L_PSqueeze { PSqueeze (mkPosToken $1)}+PLam :: { PLam} : L_PLam { PLam (mkPosToken $1)}+PPar :: { PPar} : L_PPar { PPar (mkPosToken $1)}+Pus :: { Pus} : L_Pus { Pus (mkPosToken $1)}+PIdent :: { PIdent} : L_PIdent { PIdent (mkPosToken $1)}++Defs :: { Defs }+Defs : ListDef { Defs $1 } +++Def :: { Def }+Def : PIdent ':' Expr { DefType $1 $3 } + | FunCase { DefFun $1 }+ | Pattern { DefFunEmpty $1 }+ | 'data' PIdent ListDataTele '=' ListCon { DefData $2 (reverse $3) $5 }+ | 'data' PIdent ListDataTele '=' ListCon 'with' '{' ListFunCase '}' { DefDataWith $2 (reverse $3) $5 $8 }+ | 'data' PIdent ListDataTele { DefDataEmpty $2 (reverse $3) }+++ListDef :: { [Def] }+ListDef : {- empty -} { [] } + | Def { (:[]) $1 }+ | Def ';' ListDef { (:) $1 $3 }+++FunCase :: { FunCase }+FunCase : Pattern '=' Expr { FunCase $1 $3 } +++ListFunCase :: { [FunCase] }+ListFunCase : {- empty -} { [] } + | FunCase { (:[]) $1 }+ | FunCase ';' ListFunCase { (:) $1 $3 }+++Pattern :: { Pattern }+Pattern : PIdent ListParPat { Pattern $1 (reverse $2) } +++ParPat :: { ParPat }+ParPat : Arg { ParVar $1 } + | PLeft { ParLeft $1 }+ | PRight { ParRight $1 }+ | PPar ')' { ParEmpty $1 }+ | PPar Pattern ')' { ParPat $1 $2 }+++ListParPat :: { [ParPat] }+ListParPat : {- empty -} { [] } + | ListParPat ParPat { flip (:) $1 $2 }+++Con :: { Con }+Con : PIdent ListConTele { Con $1 (reverse $2) } +++ListCon :: { [Con] }+ListCon : Con { (:[]) $1 } + | Con '|' ListCon { (:) $1 $3 }+++ConTele :: { ConTele }+ConTele : PPar Expr ':' Expr ')' { VarTele $1 $2 $4 } + | Expr5 { TypeTele $1 }+++ListConTele :: { [ConTele] }+ListConTele : {- empty -} { [] } + | ListConTele ConTele { flip (:) $1 $2 }+++DataTele :: { DataTele }+DataTele : PPar Expr ':' Expr ')' { DataTele $1 $2 $4 } +++ListDataTele :: { [DataTele] }+ListDataTele : {- empty -} { [] } + | ListDataTele DataTele { flip (:) $1 $2 }+++PiTele :: { PiTele }+PiTele : PPar Expr ':' Expr ')' { PiTele $1 $2 $4 } +++ListPiTele :: { [PiTele] }+ListPiTele : PiTele { (:[]) $1 } + | PiTele ListPiTele { (:) $1 $2 }+++Expr :: { Expr }+Expr : PLam ListArg '->' Expr { Lam $1 $2 $4 } + | Expr1 { $1 }+++Expr1 :: { Expr }+Expr1 : Expr2 '->' Expr1 { Arr $1 $3 } + | ListPiTele '->' Expr1 { Pi $1 $3 }+ | Expr2 { $1 }+++Expr2 :: { Expr }+Expr2 : Expr3 '=' Expr3 { PathImp $1 $3 } + | Expr3 { $1 }+++Expr3 :: { Expr }+Expr3 : Expr3 '@' Expr4 { At $1 $3 } + | Expr4 { $1 }+++Expr4 :: { Expr }+Expr4 : Expr4 Expr5 { App $1 $2 } + | Expr5 { $1 }+++Expr5 :: { Expr }+Expr5 : Arg { Var $1 } + | U { Universe $1 }+ | I { Interval $1 }+ | PLeft { ELeft $1 }+ | PRight { ERight $1 }+ | PPath { Path $1 }+ | Ppath { PathCon $1 }+ | PCoe { Coe $1 }+ | PIso { Iso $1 }+ | PSqueeze { Squeeze $1 }+ | PPar Expr ')' { Paren $1 $2 }+++Arg :: { Arg }+Arg : PIdent { Arg $1 } + | Pus { NoArg $1 }+++ListArg :: { [Arg] }+ListArg : Arg { (:[]) $1 } + | Arg ListArg { (:) $1 $2 }++++{++returnM :: a -> Err a+returnM = return++thenM :: Err a -> (a -> Err b) -> Err b+thenM = (>>=)++happyError :: [Token] -> Err a+happyError ts =+ Bad $ "syntax error at " ++ tokenPos ts ++ + case ts of+ [] -> []+ [Err _] -> " due to lexer error"+ _ -> " before " ++ unwords (map (id . prToken) (take 4 ts))++myLexer = tokens+}+
+ src/Syntax/ErrorDoc.hs view
@@ -0,0 +1,93 @@+{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-}++module Syntax.ErrorDoc+ ( EMsg, EDoc+ , Pretty(..), Pretty1(..), epretty+ , enull, (<>), (<+>), ($$)+ , emsg, emsgL, emsgLC+ , erender, erenderWithFilename+ ) where++import qualified Text.PrettyPrint as P++data EMsg f = EMsg (Maybe Int) (Maybe Int) String (EDoc f)+data EDoc f = EDoc P.Doc | ENull | ETerm (f (EDoc f)) | EAbove (EDoc f) (EDoc f) | EBeside (EDoc f) Bool (EDoc f)++class Functor f => Pretty1 f where+ pretty1 :: f P.Doc -> P.Doc++instance Pretty1 f => Show (EDoc f) where+ show = P.render . edocToDoc++class Pretty a f where+ pretty :: a -> EDoc f++instance Pretty P.Doc f where+ pretty = EDoc++instance Pretty String f where+ pretty = etext++instance (Pretty a f, Pretty b f) => Pretty (Either a b) f where+ pretty (Left a) = pretty a+ pretty (Right b) = pretty b++etext :: String -> EDoc f+etext "" = enull+etext s = EDoc (P.text s)++epretty :: f (EDoc f) -> EDoc f+epretty = ETerm++eprettyDoc :: Functor f => f P.Doc -> EDoc f+eprettyDoc = ETerm . fmap EDoc++eprettyStr :: Functor f => f String -> EDoc f+eprettyStr = ETerm . fmap etext++enull :: EDoc f+enull = ENull++infixl 6 <>, <+>+infixl 5 $$+(<>) :: EDoc f -> EDoc f -> EDoc f+d1 <> d2 = EBeside d1 False d2++(<+>) :: EDoc f -> EDoc f -> EDoc f+d1 <+> d2 = EBeside d1 True d2++($$) :: EDoc f -> EDoc f -> EDoc f+($$) = EAbove++emsg :: String -> EDoc f -> EMsg f+emsg = EMsg Nothing Nothing++emsgL :: Int -> String -> EDoc f -> EMsg f+emsgL l = EMsg (Just l) Nothing++emsgLC :: (Int,Int) -> String -> EDoc f -> EMsg f+emsgLC (l,c) = EMsg (Just l) (Just c)++erender :: Pretty1 f => EMsg f -> String+erender (EMsg l c s d) = P.render (msgToDoc Nothing l c s d)++erenderWithFilename :: Pretty1 f => String -> EMsg f -> String+erenderWithFilename fn (EMsg l c s d) = P.render (msgToDoc (Just fn) l c s d)++msgToDoc :: Pretty1 f => Maybe String -> Maybe Int -> Maybe Int -> String -> EDoc f -> P.Doc+msgToDoc Nothing l c "" d =+ maybe P.empty (\ln -> P.text $ show ln ++ ":") l P.<>+ maybe P.empty (\cn -> P.text $ show cn ++ ":") c P.<+>+ edocToDoc d+msgToDoc fn l c s d = P.hang (+ maybe P.empty (\s -> P.text $ s ++ ":") fn P.<>+ maybe P.empty (\ln -> P.text $ show ln ++ ":") l P.<>+ maybe P.empty (\cn -> P.text $ show cn ++ ":") c P.<+> P.text s) 4 (edocToDoc d)++edocToDoc :: Pretty1 f => EDoc f -> P.Doc+edocToDoc ENull = P.empty+edocToDoc (EDoc d) = d+edocToDoc (EBeside d1 False d2) = edocToDoc d1 P.<> edocToDoc d2+edocToDoc (EBeside d1 True d2) = edocToDoc d1 P.<+> edocToDoc d2+edocToDoc (EAbove d1 d2) = edocToDoc d1 P.$+$ edocToDoc d2+edocToDoc (ETerm e) = pretty1 (fmap edocToDoc e)
+ src/Syntax/Expr.hs view
@@ -0,0 +1,43 @@+module Syntax.Expr+ ( module Syntax.BNFC.AbsGrammar+ , getPos, argGetPos, parPatGetPos+ , unArg+ ) where++import Syntax.BNFC.AbsGrammar++getPos :: Expr -> (Int,Int)+getPos (Lam (PLam (p,_)) _ _) = p+getPos (Arr e _) = getPos e+getPos (Pi [] e) = getPos e+getPos (Pi (PiTele (PPar (p,_)) _ _ : _) _) = p+getPos (App e _) = getPos e+getPos (Var (Arg (PIdent (p,_)))) = p+getPos (Var (NoArg (Pus (p,_)))) = p+getPos (Universe (U (p,_))) = p+getPos (Paren (PPar (p,_)) _) = p+getPos (PathImp e _) = getPos e+getPos (Interval (I (p,_))) = p+getPos (ELeft (PLeft (p,_))) = p+getPos (ERight (PRight (p,_))) = p+getPos (Path (PPath (p,_))) = p+getPos (PathCon (Ppath (p,_))) = p+getPos (At e _) = getPos e+getPos (Coe (PCoe (p,_))) = p+getPos (Iso (PIso (p,_))) = p+getPos (Squeeze (PSqueeze (p,_))) = p++argGetPos :: Arg -> (Int,Int)+argGetPos (Arg (PIdent (p,_))) = p+argGetPos (NoArg (Pus (p,_))) = p++parPatGetPos :: ParPat -> (Int,Int)+parPatGetPos (ParVar arg) = argGetPos arg+parPatGetPos (ParEmpty (PPar (p,_))) = p+parPatGetPos (ParPat (PPar (p,_)) _) = p+parPatGetPos (ParLeft (PLeft (p,_))) = p+parPatGetPos (ParRight (PRight (p,_))) = p++unArg :: Arg -> String+unArg NoArg{} = "_"+unArg (Arg (PIdent (_,s))) = s
+ src/Syntax/Grammar.cf view
@@ -0,0 +1,81 @@+entrypoints Defs, Expr;++comment "--";+comment "{-" "-}";++layout "with";+layout toplevel;++Defs. Defs ::= [Def];+DefType. Def ::= PIdent ":" Expr;+DefFun. Def ::= FunCase;+DefFunEmpty. Def ::= Pattern;+DefData. Def ::= "data" PIdent [DataTele] "=" [Con];+DefDataWith. Def ::= "data" PIdent [DataTele] "=" [Con] "with" "{" [FunCase] "}";+DefDataEmpty. Def ::= "data" PIdent [DataTele];+separator Def ";";++FunCase. FunCase ::= Pattern "=" Expr;+separator FunCase ";";++Pattern. Pattern ::= PIdent [ParPat];+ParVar. ParPat ::= Arg;+ParLeft. ParPat ::= PLeft;+ParRight. ParPat ::= PRight;+ParEmpty. ParPat ::= PPar ")";+ParPat. ParPat ::= PPar Pattern ")";+terminator ParPat "";++Con. Con ::= PIdent [ConTele];+separator nonempty Con "|";++VarTele. ConTele ::= PPar Expr ":" Expr ")";+TypeTele. ConTele ::= Expr5;+terminator ConTele "";++DataTele. DataTele ::= PPar Expr ":" Expr ")";+terminator DataTele "";++PiTele. PiTele ::= PPar Expr ":" Expr ")";+terminator nonempty PiTele "";++Lam. Expr ::= PLam [Arg] "->" Expr;+Arr. Expr1 ::= Expr2 "->" Expr1;+Pi. Expr1 ::= [PiTele] "->" Expr1;+PathImp. Expr2 ::= Expr3 "=" Expr3;+At. Expr3 ::= Expr3 "@" Expr4;+App. Expr4 ::= Expr4 Expr5;+Var. Expr5 ::= Arg;+Universe. Expr5 ::= U;+Interval. Expr5 ::= I;+ELeft. Expr5 ::= PLeft;+ERight. Expr5 ::= PRight;+Path. Expr5 ::= PPath;+PathCon. Expr5 ::= Ppath;+Coe. Expr5 ::= PCoe;+Iso. Expr5 ::= PIso;+Squeeze. Expr5 ::= PSqueeze;+_. Expr ::= Expr1;+_. Expr1 ::= Expr2;+_. Expr2 ::= Expr3;+_. Expr3 ::= Expr4;+_. Expr4 ::= Expr5;+Paren. Expr5 ::= PPar Expr ")";++Arg. Arg ::= PIdent;+NoArg. Arg ::= Pus;+separator nonempty Arg "";++position token U ('T' 'y' 'p' 'e' digit*);+position token I 'I';+position token PLeft 'l' 'e' 'f' 't';+position token PRight 'r' 'i' 'g' 'h' 't';+position token PPath 'P' 'a' 't' 'h';+position token Ppath 'p' 'a' 't' 'h';+position token PCoe 'c' 'o' 'e';+position token PIso 'i' 's' 'o';+position token PSqueeze 's' 'q' 'u' 'e' 'e' 'z' 'e';+position token PLam '\\';+position token PPar '(';+position token Pus '_';+position token PIdent (letter(letter|digit|'\''|'_'|'-')*);
+ src/Syntax/Pattern.hs view
@@ -0,0 +1,14 @@+module Syntax.Pattern where++data ICon = ILeft | IRight deriving Eq+data PatternCon c = PatternCon Int Int String [([Pattern c], c)]+data Pattern c = Pattern (PatternCon c) [Pattern c] | PatternVar String | PatternI ICon++instance Eq (PatternCon c) where+ PatternCon i _ _ _ == PatternCon i' _ _ _ = i == i'++instance Eq (Pattern c) where+ PatternI c == PatternI c' = c == c'+ PatternVar _ == PatternVar _ = True+ Pattern c _ == Pattern c' _ = c == c'+ _ == _ = False
+ src/Syntax/PrettyPrinter.hs view
@@ -0,0 +1,97 @@+module Syntax.PrettyPrinter+ ( ppTerm+ , scopeToTerm+ ) where++import Text.PrettyPrint+import Data.Foldable++import Syntax.Term+import qualified Syntax.ErrorDoc as E++instance E.Pretty1 Term where+ pretty1 t = ppTermCtx (toList $ fmap render t) t++ppTerm :: Term String -> Doc+ppTerm t = ppTermCtx (toList t) (fmap text t)++ppTermCtx :: [String] -> Term Doc -> Doc+ppTermCtx _ (Var d) = d+ppTermCtx _ (Universe NoLevel) = text "Type"+ppTermCtx _ (Universe l) = text $ "Type" ++ show l+ppTermCtx ctx t@(App e1 e2) = ppTermPrec (prec t) ctx e1 <+> ppTermPrec (prec t + 1) ctx e2+ppTermCtx ctx t@(Pi (Type a _) b _) =+ let (vs, b') = ppScopePrec (prec t) ctx b+ in (if null vs then ppTermPrec (prec t + 1) ctx a else parens $ hsep vs <+> colon <+> ppTermCtx ctx a) <+> b'+ppTermCtx ctx t@Lam{} = go ctx [] t+ where+ go ctx vars (Lam (Scope1 n s)) =+ let (ctx', n') = renameName n ctx+ in go ctx' (text n' : vars) $ instantiate1 (Var $ text n') s+ go ctx vars t' = text "\\" <> hsep (reverse vars) <+> arrow <+> ppTermPrec (prec t) ctx t'+ppTermCtx ctx t@(Con _ _ n _ as) = text n <+> ppList ctx t as+ppTermCtx _ (FunSyn n _) = text n+ppTermCtx _ (FunCall _ n _) = text n+ppTermCtx ctx t@(DataType d _ as) = text d <+> ppList ctx t as+ppTermCtx _ Interval = text "I"+ppTermCtx _ (ICon ILeft) = text "left"+ppTermCtx _ (ICon IRight) = text "right"+ppTermCtx ctx t@(Path Implicit _ [e2,e3]) = ppTermPrec (prec t + 1) ctx e2 <+> equals <+> ppTermPrec (prec t + 1) ctx e3+ppTermCtx ctx t@(Path _ me es) = text "Path" <+> ppList ctx t (maybe (Var $ text "_") id me : es)+ppTermCtx ctx t@(PCon me) = text "path" <+> maybe empty (ppTermPrec (prec t + 1) ctx) me+ppTermCtx ctx t@(At _ _ e1 e2) = ppTermPrec (prec t) ctx e1 <+> text "@" <+> ppTermPrec (prec t + 1) ctx e2+ppTermCtx ctx t@(Coe es) = text "coe" <+> ppList ctx t es+ppTermCtx ctx t@(Iso es) = text "iso" <+> ppList ctx t es+ppTermCtx ctx t@(Squeeze es) = text "squeeze" <+> ppList ctx t es++ppList :: [String] -> Term Doc -> [Term Doc] -> Doc+ppList ctx t ts = hsep $ map (ppTermPrec (prec t + 1) ctx) ts++ppScopePrec :: Int -> [String] -> Scope String Term Doc -> ([Doc], Doc)+ppScopePrec p ctx t =+ let (vars, b, ctx', t') = scopeToTerm ctx text t+ in (map text vars, (if null vars || b then arrow else empty) <+> ppTermPrec p ctx' t')++scopeToTerm :: [String] -> (String -> a) -> Scope String Term a -> ([String], Bool, [String], Term a)+scopeToTerm ctx f (ScopeTerm t@(Pi _ ScopeTerm{} _)) = ([], False, ctx, t)+scopeToTerm ctx f (ScopeTerm t) = ([], True, ctx, t)+scopeToTerm ctx f (Scope v s) =+ let (ctx', v') = renameName v ctx+ (vs, b, ctx'', d) = scopeToTerm ctx' f $ instantiateScope (Var $ f v') s+ in (v' : vs, b, ctx'', d)++ppTermPrec :: Int -> [String] -> Term Doc -> Doc+ppTermPrec p ctx t = if p > prec t then parens (ppTermCtx ctx t) else ppTermCtx ctx t++arrow :: Doc+arrow = text "->"++renameName :: String -> [String] -> ([String], String)+renameName var ctx = if var `Prelude.elem` ctx then renameName (var ++ "'") ctx else (var:ctx,var)++prec :: Term a -> Int+prec Var{} = 10+prec Universe{} = 10+prec FunSyn{} = 10+prec FunCall{} = 10+prec (Con _ _ _ _ []) = 10+prec (DataType _ _ []) = 10+prec (Path Explicit Nothing []) = 10+prec (PCon Nothing) = 10+prec Interval = 10+prec ICon{} = 10+prec (Coe []) = 10+prec (Iso []) = 10+prec (Squeeze []) = 10+prec App{} = 9+prec Con{} = 9+prec DataType{} = 9+prec (Path Explicit _ _) = 9+prec PCon{} = 9+prec Coe{} = 9+prec Iso{} = 9+prec Squeeze{} = 9+prec At{} = 8+prec (Path Implicit _ _) = 7+prec Pi{} = 6+prec Lam{} = 5
+ src/Syntax/Scope.hs view
@@ -0,0 +1,105 @@+{-# LANGUAGE RankNTypes #-}++module Syntax.Scope where++import Prelude.Extras+import Control.Monad+import Control.Applicative+import Data.Maybe+import Data.Monoid+import Data.Foldable+import Data.Traversable++newtype Closed f = Closed (forall a. f a)++data Scoped a = Free a | Bound deriving Eq++instance Functor Scoped where+ fmap _ Bound = Bound+ fmap f (Free a) = Free (f a)++instance Foldable Scoped where+ foldMap _ Bound = mempty+ foldMap f (Free a) = f a++instance Traversable Scoped where+ traverse _ Bound = pure Bound+ traverse f (Free a) = Free <$> f a++instance Applicative Scoped where+ pure = Free+ Bound <*> _ = Bound+ _ <*> Bound = Bound+ Free f <*> Free a = Free (f a)++class MonadF t where+ (>>>=) :: Monad f => t f a -> (a -> f b) -> t f b++data Scope1 s f a = Scope1 s (f (Scoped a))++unScope1 :: Scope1 s f a -> f (Scoped a)+unScope1 (Scope1 _ t) = t++instance (Eq1 f, Eq a) => Eq (Scope1 s f a) where+ Scope1 _ t1 == Scope1 _ t2 = t1 ==# t2++instance Functor f => Functor (Scope1 s f) where+ fmap f (Scope1 s t) = Scope1 s $ fmap (fmap f) t++instance Foldable f => Foldable (Scope1 s f) where+ foldMap f (Scope1 _ t) = foldMap (foldMap f) t++instance Traversable f => Traversable (Scope1 s f) where+ traverse f (Scope1 s t) = Scope1 s <$> traverse (traverse f) t++instance MonadF (Scope1 s) where+ Scope1 s t >>>= k = Scope1 s $ t >>= \v -> case v of+ Bound -> return Bound+ Free a -> liftM Free (k a)++instantiate1 :: Monad f => f a -> f (Scoped a) -> f a+instantiate1 s t = t >>= \v -> case v of+ Bound -> s+ Free a -> return a++data Scope s f a = ScopeTerm (f a) | Scope s (Scope s f (Scoped a))++instance (Eq1 f, Eq a) => Eq (Scope s f a) where+ ScopeTerm t1 == ScopeTerm t2 = t1 ==# t2+ Scope _ t1 == Scope _ t2 = t1 == t2+ _ == _ = False++instance Functor f => Functor (Scope s f) where+ fmap f (ScopeTerm t) = ScopeTerm (fmap f t)+ fmap f (Scope s t) = Scope s $ fmap (fmap f) t++instance Foldable f => Foldable (Scope s f) where+ foldMap f (ScopeTerm t) = foldMap f t+ foldMap f (Scope _ t) = foldMap (foldMap f) t++instance Traversable f => Traversable (Scope s f) where+ traverse f (ScopeTerm t) = ScopeTerm <$> traverse f t+ traverse f (Scope s t) = Scope s <$> traverse (traverse f) t++instance MonadF (Scope s) where+ ScopeTerm t >>>= k = ScopeTerm (t >>= k)+ Scope s t >>>= k = Scope s $ t >>>= \v -> case v of+ Bound -> return Bound+ Free a -> liftM Free (k a)++instantiateScope :: Monad f => f a -> Scope s f (Scoped a) -> Scope s f a+instantiateScope t s = s >>>= \v -> case v of+ Bound -> t+ Free a -> return a++instantiate :: Monad f => [f a] -> Scope s f a -> f a+instantiate t (ScopeTerm s) = s+instantiate [] _ = error "instantiate"+instantiate (t:ts) (Scope _ s) = instantiate ts (instantiateScope t s)++closed :: Traversable f => f a -> Closed f+closed t = Closed $ fromJust $ traverse (const Nothing) t++mapScope :: (s -> t) -> Scope s f a -> Scope t f a+mapScope _ (ScopeTerm t) = ScopeTerm t+mapScope f (Scope s t) = Scope (f s) (mapScope f t)
+ src/Syntax/Term.hs view
@@ -0,0 +1,200 @@+module Syntax.Term+ ( Term(..), Type(..)+ , Level(..), level+ , Explicit(..), PatternC+ , module Syntax.Scope, module Syntax.Pattern+ , POrd(..), lessOrEqual+ , apps, collect, dropOnePi+ ) where++import Prelude.Extras+import Data.Function+import Data.Traversable hiding (mapM)+import Data.Foldable hiding (msum)+import Control.Applicative+import Control.Monad++import Syntax.Scope+import Syntax.Pattern++data Level = Level Int | NoLevel++instance Eq Level where+ (==) = (==) `on` level++instance Ord Level where+ compare = compare `on` level++instance Show Level where+ show = show . level++instance Enum Level where+ toEnum 0 = NoLevel+ toEnum n = Level n+ fromEnum = level++level :: Level -> Int+level (Level l) = l+level NoLevel = 0++data Term a+ = Var a+ | App (Term a) (Term a)+ | Lam (Scope1 String Term a)+ | Pi (Type a) (Scope String Term a) Level+ | Con Int (Int,Int) String [([PatternC], Closed (Scope String Term))] [Term a]+ | FunCall (Int,Int) String [([PatternC], Closed (Scope String Term))]+ | FunSyn String (Term a)+ | Universe Level+ | DataType String Int [Term a]+ | Interval+ | ICon ICon+ | Path Explicit (Maybe (Term a)) [Term a]+ | PCon (Maybe (Term a))+ | At (Term a) (Term a) (Term a) (Term a)+ | Coe [Term a]+ | Iso [Term a]+ | Squeeze [Term a]+data Type a = Type (Term a) Level+data Explicit = Explicit | Implicit+type PatternC = Pattern (Closed (Scope String Term))++instance Eq a => Eq (Term a) where+ e1 == e2 = go e1 [] e2 []+ where+ go :: Eq a => Term a -> [Term a] -> Term a -> [Term a] -> Bool+ go (Var a) es (Var a') es' = a == a' && es == es'+ go (App a b) es e2 es' = go a (b:es) e2 es'+ go e1 es (App a b) es' = go e1 es a (b:es')+ go (Lam s) es (Lam s') es' = s == s' && es == es'+ go (Lam (Scope1 _ s)) es t es' =+ let (l1,l2) = splitAt (length es' - length es) es'+ in l2 == es && go s [] (fmap Free t) (map (fmap Free) l1 ++ [Var Bound])+ go t es t'@Lam{} es' = go t' es' t es+ go e1@Pi{} es e2@Pi{} es' = pcompare e1 e2 == Just EQ && es == es'+ go (Con c _ _ _ as) es (Con c' _ _ _ as') es' = c == c' && as ++ es == as' ++ es'+ go (FunCall _ n _) es (FunCall _ n' _) es' = n == n' && es == es'+ go (FunSyn n _) es (FunSyn n' _) es' = n == n' && es == es'+ go (Universe u) es (Universe u') es' = u == u' && es == es'+ go (DataType d _ as) es (DataType d' _ as') es' = d == d' && as ++ es == as' ++ es'+ go Interval es Interval es' = es == es'+ go (ICon c) es (ICon c') es' = c == c' && es == es'+ go (Path Explicit a as) es (Path Explicit a' as') es' = a == a' && as ++ es == as' ++ es'+ go (Path _ _ as) es (Path _ _ as') es' = as ++ es == as' ++ es'+ go (PCon f) es (PCon f') es' = maybe [] return f ++ es == maybe [] return f' ++ es'+ go (PCon e) es e' es' = case maybe [] return e ++ es of+ e1:es1 -> e1 == Lam (Scope1 "" $ At (error "") (error "") (fmap Free e') $ Var Bound) && es1 == es'+ _ -> False+ go e es e'@PCon{} es' = go e' es' e es+ go (At _ _ a b) es (At _ _ a' b') es' = a == a' && b == b' && es == es'+ go (Coe as) es (Coe as') es' = as ++ es == as' ++ es'+ go (Iso as) es (Iso as') es' = as ++ es == as' ++ es'+ go (Squeeze as) es (Squeeze as') es' = as ++ es == as' ++ es'+ go _ _ _ _ = False++instance Eq a => Eq (Type a) where+ Type t _ == Type t' _ = t == t'++instance Eq1 Term where (==#) = (==)++class POrd a where+ pcompare :: a -> a -> Maybe Ordering++instance Eq a => POrd (Term a) where+ pcompare (Pi a (ScopeTerm b) _) (Pi a' b'@Scope{} lvl') =+ contraCovariant (pcompare a a') $ pcompare (fmap Free b) (unScope1 $ dropOnePi a' b' lvl')+ pcompare (Pi a b@Scope{} lvl) (Pi a' (ScopeTerm b') _) =+ contraCovariant (pcompare a a') $ pcompare (unScope1 $ dropOnePi a b lvl) (fmap Free b')+ pcompare (Pi a b lvl) (Pi a' b' lvl') = contraCovariant (pcompare a a') $ pcompareScopes a b lvl a' b' lvl'+ where+ pcompareScopes :: Eq a => Type a -> Scope String Term a -> Level -> Type a -> Scope String Term a -> Level -> Maybe Ordering+ pcompareScopes _ (ScopeTerm b) _ _ (ScopeTerm b') _ = pcompare b b'+ pcompareScopes _ (ScopeTerm b) _ a' b' lvl' = pcompare b (Pi a' b' lvl')+ pcompareScopes a b lvl _ (ScopeTerm b') _ = pcompare (Pi a b lvl) b'+ pcompareScopes a (Scope _ b) lvl a' (Scope _ b') lvl' = pcompareScopes (fmap Free a) b lvl (fmap Free a') b' lvl'+ pcompare (Universe u) (Universe u') = Just $ compare (level u) (level u')+ pcompare e1 e2 = if e1 == e2 then Just EQ else Nothing++instance Eq a => POrd (Type a) where+ pcompare (Type t _) (Type t' _) = pcompare t t'++contraCovariant :: Maybe Ordering -> Maybe Ordering -> Maybe Ordering+contraCovariant (Just LT) (Just r) | r == EQ || r == GT = Just GT+contraCovariant (Just EQ) r = r+contraCovariant (Just GT) (Just r) | r == LT || r == EQ = Just LT+contraCovariant _ _ = Nothing++lessOrEqual :: POrd a => a -> a -> Bool+lessOrEqual a b = case pcompare a b of+ Just r | r == EQ || r == LT -> True+ _ -> False++instance Functor Term where fmap = fmapDefault+instance Foldable Term where foldMap = foldMapDefault++instance Functor Type where+ fmap f (Type t l) = Type (fmap f t) l++instance Applicative Term where+ pure = Var+ (<*>) = ap++instance Traversable Term where+ traverse f (Var a) = Var <$> f a+ traverse f (App e1 e2) = App <$> traverse f e1 <*> traverse f e2+ traverse f (Lam s) = Lam <$> traverse f s+ traverse f (At e1 e2 e3 e4) = At <$> traverse f e1 <*> traverse f e2 <*> traverse f e3 <*> traverse f e4+ traverse f (Pi (Type e1 lvl1) e2 lvl2) = (\e1' e2' -> Pi (Type e1' lvl1) e2' lvl2) <$> traverse f e1 <*> traverse f e2+ traverse f (Path h me es) = Path h <$> traverse (traverse f) me <*> traverse (traverse f) es+ traverse f (PCon e) = PCon <$> traverse (traverse f) e+ traverse f (Con c lc n cs as) = Con c lc n cs <$> traverse (traverse f) as+ traverse f (Coe as) = Coe <$> traverse (traverse f) as+ traverse f (Iso as) = Iso <$> traverse (traverse f) as+ traverse f (Squeeze as) = Squeeze <$> traverse (traverse f) as+ traverse f (FunSyn n e) = FunSyn n <$> traverse f e+ traverse f (DataType d e as) = DataType d e <$> traverse (traverse f) as+ traverse _ (FunCall lc n cs) = pure (FunCall lc n cs)+ traverse _ (Universe l) = pure (Universe l)+ traverse _ Interval = pure Interval+ traverse _ (ICon c) = pure (ICon c)++instance Monad Term where+ return = Var+ Var a >>= k = k a+ App e1 e2 >>= k = App (e1 >>= k) (e2 >>= k)+ Lam e >>= k = Lam (e >>>= k)+ Pi (Type e1 lvl1) e2 lvl2 >>= k = Pi (Type (e1 >>= k) lvl1) (e2 >>>= k) lvl2+ Con c lc n cs as >>= k = Con c lc n cs (map (>>= k) as)+ FunCall lc n cs >>= k = FunCall lc n cs+ FunSyn n e >>= k = FunSyn n (e >>= k)+ Universe l >>= _ = Universe l+ DataType d e as >>= k = DataType d e $ map (>>= k) as+ Interval >>= _ = Interval+ ICon c >>= _ = ICon c+ Path h me1 es >>= k = Path h (fmap (>>= k) me1) $ map (>>= k) es+ PCon e >>= k = PCon $ fmap (>>= k) e+ At e1 e2 e3 e4 >>= k = At (e1 >>= k) (e2 >>= k) (e3 >>= k) (e4 >>= k)+ Coe es >>= k = Coe $ map (>>= k) es+ Iso es >>= k = Iso $ map (>>= k) es+ Squeeze es >>= k = Squeeze $ map (>>= k) es++apps :: Term a -> [Term a] -> Term a+apps e [] = e+apps e1 (e2:es) = apps (App e1 e2) es++collect :: Term a -> Term a+collect term = go term []+ where+ go (App e1 e2) ts = go e1 (e2:ts)+ go (Con a b c d es) ts = Con a b c d (es ++ ts)+ go (DataType a b es) ts = DataType a b (es ++ ts)+ go (Path a b es) ts = Path a b (es ++ ts)+ go (Coe es) ts = Coe (es ++ ts)+ go (Iso es) ts = Iso (es ++ ts)+ go (Squeeze es) ts = Squeeze (es ++ ts)+ go _ _ = term++dropOnePi :: Type a -> Scope String Term a -> Level -> Scope1 String Term a+dropOnePi _ (ScopeTerm b) _ = Scope1 "_" (fmap Free b)+dropOnePi _ (Scope s (ScopeTerm b)) _ = Scope1 s b+dropOnePi a (Scope s b) lvl = Scope1 s $ Pi (fmap Free a) b lvl
+ src/TypeChecking/Context.hs view
@@ -0,0 +1,42 @@+{-# LANGUAGE GADTs #-}++module TypeChecking.Context where++import Control.Monad++import Syntax.Scope++data Ctx s f b a where+ Nil :: Ctx s f b b+ Snoc :: Ctx s f b a -> s -> f a -> Ctx s f b (Scoped a)++(+++) :: Ctx s f a b -> Ctx s f b c -> Ctx s f a c+ctx +++ Nil = ctx+ctx +++ Snoc ctx' s t = Snoc (ctx +++ ctx') s t++lengthCtx :: Ctx s f b a -> Int+lengthCtx Nil = 0+lengthCtx (Snoc ctx _ _) = lengthCtx ctx + 1++lookupCtx :: (Monad g, Functor f, Eq s) => s -> Ctx s f b a -> Maybe (g a, f a)+lookupCtx _ Nil = Nothing+lookupCtx s (Snoc ctx s' t) = if s == s'+ then Just (return Bound, fmap Free t)+ else fmap (\(te, ty) -> (liftM Free te, fmap Free ty)) (lookupCtx s ctx)++close :: Monad f => Ctx b g b a -> f a -> f b+close Nil t = t+close (Snoc ctx s _) t = close ctx $ t >>= \v -> return $ case v of+ Bound -> liftBase ctx s+ Free a -> a++liftBase :: Ctx s f b a -> b -> a+liftBase Nil = id+liftBase (Snoc ctx _ _) = Free . liftBase ctx++abstractTermInCtx :: Ctx s g b a -> f a -> Scope s f b+abstractTermInCtx ctx term = go ctx (ScopeTerm term)+ where+ go :: Ctx s g b a -> Scope s f a -> Scope s f b+ go Nil t = t+ go (Snoc ctx s _) t = go ctx (Scope s t)
+ src/TypeChecking/Definitions.hs view
@@ -0,0 +1,62 @@+module TypeChecking.Definitions+ ( typeCheckDefs+ ) where++import Control.Monad+import Control.Monad.Error++import Syntax.Expr as E+import Syntax.Term as T+import Syntax.ErrorDoc+import TypeChecking.Expressions+import TypeChecking.Definitions.DataTypes+import TypeChecking.Definitions.Functions+import TypeChecking.Monad++type Tele = [([Arg], Expr)]++typeCheckDefs :: MonadFix m => [Def] -> TCM m ()+typeCheckDefs [] = return ()+typeCheckDefs (DefType p@(PIdent (lc,name)) ty : defs) =+ case span (theSameAs name) defs of+ ([],_) -> do+ warn [emsgLC lc ("Missing a realization of function " ++ show name) enull]+ typeCheckDefs defs+ (defs1,defs2) -> do+ typeCheckFunction p ty (map defToPDef defs1)+ typeCheckDefs defs2+ where+ defToPDef :: Def -> ((Int, Int), [ParPat], Maybe Expr)+ defToPDef (DefFun (FunCase (E.Pattern (PIdent (lc,_)) pats) expr)) = (lc, pats, Just expr)+ defToPDef (DefFunEmpty (E.Pattern (PIdent (lc,_)) pats)) = (lc, pats, Nothing)+ defToPDef _ = error "defToPDef"+typeCheckDefs (DefFun (FunCase (E.Pattern p@(PIdent (_,name)) []) expr) : defs) = do+ (term, ty) <- typeCheck expr Nothing+ addFunctionCheck p (FunSyn name term) ty+ typeCheckDefs defs+typeCheckDefs (DefFun (FunCase (E.Pattern (PIdent (lc,name)) _) _) : defs) = do+ warn [inferErrorMsg lc "the argument"]+ typeCheckDefs $ dropWhile (theSameAs name) defs+typeCheckDefs (DefFunEmpty (E.Pattern (PIdent (lc,name)) []) : defs) = do+ warn [emsgLC lc "Expected right hand side" enull]+ typeCheckDefs $ dropWhile (theSameAs name) defs+typeCheckDefs (DefFunEmpty (E.Pattern (PIdent (lc,name)) _) : defs) = do+ warn [inferErrorMsg lc "the argument"]+ typeCheckDefs $ dropWhile (theSameAs name) defs+typeCheckDefs (DefDataEmpty p teles : defs) = typeCheckDefs (DefDataWith p teles [] [] : defs)+typeCheckDefs (DefData p teles cons : defs) = typeCheckDefs (DefDataWith p teles cons [] : defs)+typeCheckDefs (DefDataWith p teles cons conds : defs) = do+ dataTeles <- forM teles $ \(DataTele _ e1 e2) -> liftM (\vs -> (vs, e2)) (exprToVars e1)+ conTeles <- forM cons $ \(E.Con p teles) -> do+ teles' <- forM teles $ \tele ->+ case tele of+ VarTele _ e1 e2 -> liftM (\vs -> (vs, e2)) (exprToVars e1)+ TypeTele e2 -> return ([], e2)+ return (p, teles')+ typeCheckDataType p dataTeles conTeles $ map (\(FunCase pat expr) -> (pat, expr)) conds+ typeCheckDefs defs++theSameAs :: String -> Def -> Bool+theSameAs name (DefFun (FunCase (E.Pattern (PIdent (_,name')) _) _)) = name == name'+theSameAs name (DefFunEmpty (E.Pattern (PIdent (_,name')) _)) = name == name'+theSameAs _ _ = False
+ src/TypeChecking/Definitions/Conditions.hs view
@@ -0,0 +1,140 @@+{-# LANGUAGE GADTs, ExistentialQuantification #-}++module TypeChecking.Definitions.Conditions+ ( checkConditions+ ) where++import Control.Monad+import Control.Monad.State+import Data.Maybe++import Syntax.Term+import Syntax.ErrorDoc+import Syntax.PrettyPrinter+import TypeChecking.Context+import Normalization++checkConditions :: (Int,Int) -> Closed Term -> [([PatternC], Closed (Scope String Term))] -> [EMsg Term]+checkConditions lc func cs =+ maybeToList $ msum $ map (\(p, scope) -> fmap (uncurry msg) $ checkPatterns func (map fst cs) p scope) cs+ where+ msg :: Scope String Term String -> Scope String Term String -> EMsg Term+ msg t1 t2 = emsgLC lc "Conditions check failed:" $+ scopeToEDoc t1 <+> pretty "is not equal to" <+> scopeToEDoc t2+ + scopeToEDoc :: Scope String Term String -> EDoc Term+ scopeToEDoc t = epretty $ fmap pretty $ let (_,_,_,t') = scopeToTerm [] id t in t'++data TermInCtx f b = forall a. TermInCtx (Ctx String f b a) (f a)+data TermsInCtx f b = forall a. TermsInCtx (Ctx String f b a) [f a]+data TermsInCtx2 f b = forall a. TermsInCtx2 (Ctx String f b a) [f a] [f a]++checkPatterns :: Closed Term -> [[PatternC]] -> [PatternC] -> Closed (Scope String Term)+ -> Maybe (Scope String Term String, Scope String Term String)+checkPatterns (Closed func) cs pats (Closed scope) =+ listToMaybe $ findSuspiciousPairs cs pats >>= \(TermsInCtx2 ctx terms terms') ->+ let nscope1 = nfAppsScope $ abstractTermInCtx ctx (apps func terms)+ nscope2 = abstractTermInCtx ctx (instantiate terms' scope)+ in if nfScope nscope1 == nfScope nscope2 then [] else [(nscope1,nscope2)]+ where+ nfApps :: Eq a => Term a -> Term a+ nfApps (App a b) = App (nfApps a) (nf WHNF b)+ nfApps (Con i lc name conds terms) = Con i lc name conds $ map (nf WHNF) terms+ nfApps t = t+ + nfAppsScope :: Eq a => Scope String Term a -> Scope String Term a+ nfAppsScope (ScopeTerm t) = ScopeTerm (nfApps t)+ nfAppsScope (Scope v t) = Scope v (nfAppsScope t)++findSuspiciousPairs :: [[PatternC]] -> [PatternC] -> [TermsInCtx2 Term b]+findSuspiciousPairs _ [] = []+findSuspiciousPairs cs (pat@(PatternI con) : pats) = map ext $ findSuspiciousPairs (mapTail pat cs) pats+ where ext (TermsInCtx2 ctx terms1 terms2) = (TermsInCtx2 ctx (ICon con : terms1) terms2)+findSuspiciousPairs cs (pat@(PatternVar var) : pats) =+ check ILeft ++ check IRight ++ map ext (findSuspiciousPairs (mapTail pat cs) pats)+ where+ ext (TermsInCtx2 ctx terms1 terms2) = TermsInCtx2 (Snoc ctx var $ error "") (Var Bound : map (fmap Free) terms1)+ (Var Bound : map (fmap Free) terms2)+ check con = if null $ filter (\p -> p == PatternI con) (mapHead cs)+ then []+ else case patternsToTerms pats of+ TermsInCtx ctx terms -> [TermsInCtx2 ctx (ICon con : terms) (ICon con : ctxToVars ctx)]+findSuspiciousPairs cs (pat@(Pattern con@(PatternCon i _ name conds) args) : pats) =+ (conds >>= \(cond,_) -> case unifyPatternLists args cond of+ Nothing -> []+ Just args' -> [ext0 args $ patternsToTerms args']) +++ map ext1 (findSuspiciousPairs cs' args) ++ case patternsToTerms args of+ TermsInCtx ctx terms -> map (ext2 ctx terms) (findSuspiciousPairs (mapTail pat cs) pats)+ where+ cs' = cs >>= \as -> case as of+ Pattern con' args' : _ | con == con' -> [args']+ _ -> []+ + ext0 :: [PatternC] -> TermsInCtx Term b -> TermsInCtx2 Term b+ ext0 args (TermsInCtx ctx terms) = case patternsToTerms pats of+ TermsInCtx ctx' terms' -> TermsInCtx2 (ctx +++ ctx')+ (fmap (liftBase ctx') (Con i (0,0) name conds $ substPatterns args terms) : terms')+ (map (fmap $ liftBase ctx') terms ++ ctxToVars ctx')+ + ext1 :: TermsInCtx2 Term b -> TermsInCtx2 Term b+ ext1 (TermsInCtx2 ctx terms1 terms2) = case patternsToTerms pats of+ TermsInCtx ctx' terms' -> TermsInCtx2 (ctx +++ ctx') (fmap (liftBase ctx') (Con i (0,0) name conds terms1) : terms')+ (map (fmap $ liftBase ctx') terms2 ++ ctxToVars ctx')+ + ext2 :: Ctx String Term a b -> [Term b] -> TermsInCtx2 Term b -> TermsInCtx2 Term a+ ext2 ctx terms (TermsInCtx2 ctx' terms1 terms2) =+ TermsInCtx2 (ctx +++ ctx') (fmap (liftBase ctx') (Con i (0,0) name conds terms) : terms1)+ (map (fmap $ liftBase ctx') (ctxToVars ctx) ++ terms2)++unifyPatterns :: PatternC -> PatternC -> Maybe [PatternC]+unifyPatterns (PatternI con) (PatternI con') | con == con' = Just []+unifyPatterns (PatternVar _) p = Just [p]+unifyPatterns p (PatternVar _) = Just (varList p)+unifyPatterns (Pattern con pats) (Pattern con' pats') | con == con' = unifyPatternLists pats pats'+unifyPatterns _ _ = Nothing++unifyPatternLists :: [PatternC] -> [PatternC] -> Maybe [PatternC]+unifyPatternLists pats pats' = fmap concat $ sequence (zipWith unifyPatterns pats pats')++varList :: Pattern c -> [Pattern c]+varList (PatternI _) = []+varList pat@(PatternVar _) = [pat]+varList (Pattern _ pats) = pats >>= varList++substPatterns :: [PatternC] -> [Term a] -> [Term a]+substPatterns pats terms = evalState (mapM substPattern pats) terms+ where+ substPattern :: PatternC -> State [Term a] (Term a)+ substPattern (PatternI con) = return (ICon con)+ substPattern (PatternVar _) = do+ term:terms <- get+ put terms+ return term+ substPattern (Pattern (PatternCon i _ name conds) pats) = do+ terms <- mapM substPattern pats+ return (Con i (0,0) name conds terms)++patternToTerm :: PatternC -> TermInCtx Term a+patternToTerm (PatternI con) = TermInCtx Nil (ICon con)+patternToTerm (PatternVar var) = TermInCtx (Snoc Nil var $ error "") (Var Bound)+patternToTerm (Pattern (PatternCon i _ name conds) pats) = case patternsToTerms pats of+ TermsInCtx ctx' terms -> TermInCtx ctx' $ Con i (0,0) name conds terms++patternsToTerms :: [PatternC] -> TermsInCtx Term a+patternsToTerms [] = TermsInCtx Nil []+patternsToTerms (pat:pats) = case patternToTerm pat of+ TermInCtx ctx' term -> case patternsToTerms pats of+ TermsInCtx ctx'' terms -> TermsInCtx (ctx' +++ ctx'') $ fmap (liftBase ctx'') term : terms++ctxToVars :: Ctx s f b a -> [Term a]+ctxToVars = reverse . go+ where+ go :: Ctx s f b a -> [Term a]+ go Nil = []+ go (Snoc ctx _ _) = Var Bound : map (fmap Free) (go ctx)++mapHead :: [[a]] -> [a]+mapHead cs = cs >>= \as -> if null as then [] else [head as]++mapTail :: Eq a => a -> [[a]] -> [[a]]+mapTail a cs = cs >>= \as -> if null as || not (head as == a) then [] else [tail as]
+ src/TypeChecking/Definitions/Coverage.hs view
@@ -0,0 +1,89 @@+module TypeChecking.Definitions.Coverage+ ( checkCoverage+ ) where++import Data.List++import Syntax.Pattern++data PatternType c = Interval | DataType Int [(Int, [Pattern c])] | Unknown++data OK = OK | Incomplete deriving Eq+data Result = Result OK [Int]++checkCoverage :: [((Int,Int),[Pattern c])] -> Maybe [(Int,Int)]+checkCoverage [] = Just []+checkCoverage clauses = case checkClauses (map snd clauses) of+ Result Incomplete _ -> Nothing+ Result OK used -> Just $ map (\i -> fst $ clauses !! i) $ [0 .. length clauses - 1] \\ used++checkClauses :: [[Pattern c]] -> Result+checkClauses [] = Result Incomplete []+checkClauses clauses =+ let (t, clauses', b) = checkNull 0 Unknown clauses in+ case (b, checkNonEmptyClauses t clauses') of+ (Just i, Result Incomplete u) -> Result OK (i:u)+ (_, r) -> r++checkNull :: Int -> PatternType c -> [[Pattern c]] -> (PatternType c, [(Pattern c, [Pattern c])], Maybe Int)+checkNull _ t [] = (t, [], Nothing)+checkNull i t ([] : cs) = (t, [], Just i)+checkNull i t ((pat:pats) : cs) =+ let (t1, cs', b) = checkNull (i + 1) t cs+ t2 = case pat of+ PatternI _ -> Interval+ PatternVar _ -> t1+ Pattern (PatternCon _ n _ _) _ ->+ let heads = pat : concatMap (\c -> if null c then [] else [head c]) cs+ in DataType n $ heads >>= \p -> case p of+ Pattern (PatternCon i _ _ conds) _ -> map (\(cond,_) -> (i,cond)) conds+ _ -> []+ in (t2, (pat, pats) : cs', b)++checkNonEmptyClauses :: PatternType c -> [(Pattern c, [Pattern c])] -> Result+checkNonEmptyClauses _ [] = Result Incomplete []+checkNonEmptyClauses Interval clauses = checkIntervalClauses clauses+checkNonEmptyClauses (DataType n conds) clauses = checkDataTypeClauses n conds clauses+checkNonEmptyClauses Unknown clauses = checkClauses (map snd clauses)++checkIntervalClauses :: [(Pattern c, [Pattern c])] -> Result+checkIntervalClauses clauses =+ let get con = map (\(i,(_,ps)) -> (i,ps)) $ filterWithIndex (\(c,_) -> c == con) clauses+ lefts = get (PatternI ILeft)+ rights = get (PatternI IRight)+ vars = get (PatternVar "")+ Result _ is0 = checkClauses (map snd lefts)+ Result _ is1 = checkClauses (map snd rights)+ Result ok is2 = checkClauses (map snd vars)+ in Result ok $ getIndices lefts is0 ++ getIndices rights is1 ++ getIndices vars is2++checkDataTypeClauses :: Int -> [(Int, [Pattern c])] -> [(Pattern c, [Pattern c])] -> Result+checkDataTypeClauses n conds clauses = getResults $ flip map [0 .. n-1] $ \j ->+ let getLength [] = 0+ getLength (Pattern (PatternCon i _ _ _) args : _) | i == j = length args+ getLength (_ : pats) = getLength pats+ len = getLength (map fst clauses)+ + getPatterns (Pattern _ pats) = pats+ getPatterns _ = replicate len (PatternVar "_")+ in map (\(i,(p,ps)) -> (i, getPatterns p ++ ps))+ (filterWithIndex (\(c,_) -> c == Pattern (PatternCon j n "" []) [] || c == PatternVar "") clauses)+ ++ (conds >>= \(c,ps) -> if j == c then [(-1, ps)] else [])+ where+ getResults :: [[(Int, [Pattern c])]] -> Result+ getResults [] = Result OK []+ getResults (con:cons) =+ let Result ok1 is1 = checkClauses (map snd con)+ Result ok2 is2 = getResults cons+ in Result (if ok1 == OK && ok2 == OK then OK else Incomplete) (getIndices con is1 ++ is2)++getIndices :: [(Int,b)] -> [Int] -> [Int]+getIndices list = filter (>= 0) . map (\i -> fst $ list !! i)++filterWithIndex :: (a -> Bool) -> [a] -> [(Int,a)]+filterWithIndex p = go 0+ where+ go _ [] = []+ go i (x:xs) =+ let rs = go (i + 1) xs+ in if p x then (i,x):rs else rs
+ src/TypeChecking/Definitions/DataTypes.hs view
@@ -0,0 +1,115 @@+{-# LANGUAGE RecursiveDo #-}++module TypeChecking.Definitions.DataTypes+ ( typeCheckDataType+ ) where++import Control.Monad+import Control.Monad.Fix+import Data.List++import Syntax.Expr as E+import Syntax.Term as T+import Syntax.ErrorDoc+import TypeChecking.Monad+import TypeChecking.Context+import TypeChecking.Expressions+import TypeChecking.Definitions.Patterns+import TypeChecking.Definitions.Conditions+import TypeChecking.Definitions.Termination+import Normalization++type Tele = [([Arg], Expr)]++typeCheckDataType :: MonadFix m => PIdent -> Tele -> [(PIdent,Tele)] -> [(E.Pattern, Expr)] -> TCM m ()+typeCheckDataType p@(PIdent (lc,dt)) params cons conds = mdo+ let lcons = length cons+ (SomeEq ctx, dataType@(Type dtTerm _)) <- checkTele Nil params $ Closed (T.Universe NoLevel)+ addDataTypeCheck p dataType lcons+ cons' <- forW (zip cons [0..]) $ \((con@(PIdent (lc,conName)),tele),i) -> do+ (_, Type conType conLevel) <- checkTele ctx tele $ Closed $ DataType dt lcons []+ checkPositivity p (nf WHNF conType)+ let conTerm = T.Con i lc conName (map snd $ filter (\(c,_) -> c == conName) conds') []+ return $ Just (con, conTerm, Type conType conLevel)+ forM_ cons' $ \(con, te, Type ty lvl) ->+ addConstructorCheck con dt lcons (abstractTermInCtx ctx te) (abstractTermInCtx ctx ty) lvl+ conds' <- forW conds $ \(E.Pattern (E.PIdent (lc,con)) pats,expr) ->+ case find (\(PIdent (_,c),_,_) -> c == con) cons' of+ Nothing -> do+ warn [notInScope lc "data constructor" con]+ return Nothing+ Just (_, _, ty) -> do+ (bf, TermsInCtx ctx' _ ty', rtpats) <- typeCheckPatterns ctx (nfType WHNF ty) pats+ when bf $ warn [emsgLC lc "Absurd patterns are not allowed in conditions" enull]+ (term, _) <- typeCheckCtx (ctx +++ ctx') expr (Just ty')+ let scope = closed (abstractTermInCtx ctx' term)+ throwErrors (checkTermination con rtpats scope)+ return $ Just (con, (rtpats, scope))+ lift $ deleteDataType dt+ let lvls = map (\(_, _, Type _ lvl) -> lvl) cons'+ lvl = if null lvls then NoLevel else maximum lvls+ lift $ addDataType dt (Type (replaceLevel dtTerm lvl) lvl) lcons+ forM_ cons' $ \(_, T.Con i lc' conName conConds [], _) -> do+ warn $ checkConditions lc (Closed $ T.Con i lc' conName conConds []) conConds++checkTele :: (Monad m, Eq a) => Ctx String Type String a -> Tele -> Closed Term+ -> TCM m (SomeEq (Ctx String Type String), Type a)+checkTele ctx [] (Closed term) = return (SomeEq ctx, Type term NoLevel)+checkTele ctx ((args,expr):tele) term = do+ (r1, Type t1 _) <- typeCheckCtx ctx expr Nothing+ lvl1 <- checkIsType ctx expr (nf WHNF t1)+ case extendCtx (map unArg args) Nil (Type r1 lvl1) of+ SomeEq ctx' -> do+ (rctx, Type r2 lvl2) <- checkTele (ctx +++ ctx') tele term+ return (rctx, Type (T.Pi (Type r1 lvl1) (abstractTermInCtx ctx' r2) lvl2) $ max lvl1 lvl2)++replaceLevel :: Term a -> Level -> Term a+replaceLevel (T.Pi r1 r2 lvl2) lvl = T.Pi r1 (replaceLevelScope r2) lvl2+ where+ replaceLevelScope :: Scope String Term a -> Scope String Term a+ replaceLevelScope (ScopeTerm t) = ScopeTerm (replaceLevel t lvl)+ replaceLevelScope (Scope v t) = Scope v (replaceLevelScope t)+replaceLevel _ lvl = T.Universe lvl++checkPositivity :: (Eq a, Monad m) => PIdent -> Term a -> EDocM m ()+checkPositivity dt (T.Pi (Type a _) b _) = checkNoNegative dt (nf WHNF a) >> checkPositivityScope b+ where+ checkPositivityScope :: (Eq a, Monad m) => Scope String Term a -> EDocM m ()+ checkPositivityScope (ScopeTerm t) = checkPositivity dt (nf WHNF t)+ checkPositivityScope (Scope v t) = checkPositivityScope t+checkPositivity _ _ = return ()++checkNoNegative :: (Eq a, Monad m) => PIdent -> Term a -> EDocM m ()+checkNoNegative dt (T.Pi (Type a _) b _) = checkNoDataType dt a >> checkNoNegativeScope b+ where+ checkNoNegativeScope :: (Eq a, Monad m) => Scope String Term a -> EDocM m ()+ checkNoNegativeScope (ScopeTerm t) = checkNoNegative dt (nf WHNF t)+ checkNoNegativeScope (Scope v t) = checkNoNegativeScope t+checkNoNegative _ _ = return ()++checkNoDataType :: Monad m => PIdent -> Term a -> EDocM m ()+checkNoDataType (PIdent (lc,dt)) t = when (dt `elem` collectDataTypes t) $+ throwError [emsgLC lc "Data type is not strictly positive" enull]++collectDataTypes :: Term a -> [String]+collectDataTypes T.Var{} = []+collectDataTypes (T.App e1 e2) = collectDataTypes e1 ++ collectDataTypes e2+collectDataTypes (T.Lam (Scope1 _ e)) = collectDataTypes e+collectDataTypes (T.Pi (Type e _) s _) = collectDataTypes e ++ go s+ where+ go :: Scope s Term a -> [String]+ go (ScopeTerm t) = collectDataTypes t+ go (Scope _ s) = go s+collectDataTypes (T.Con _ _ _ _ as) = as >>= collectDataTypes+collectDataTypes FunCall{} = []+collectDataTypes FunSyn{} = []+collectDataTypes (DataType d _ as) = d : (as >>= collectDataTypes)+collectDataTypes T.Universe{} = []+collectDataTypes T.Interval = []+collectDataTypes ICon{} = []+collectDataTypes (T.Path _ me1 es) = maybe [] collectDataTypes me1 ++ (es >>= collectDataTypes)+collectDataTypes (PCon me) = maybe [] collectDataTypes me+collectDataTypes (T.At _ _ e3 e4) = collectDataTypes e3 ++ collectDataTypes e4+collectDataTypes (T.Coe es) = es >>= collectDataTypes+collectDataTypes (T.Iso es) = es >>= collectDataTypes+collectDataTypes (T.Squeeze es) = es >>= collectDataTypes
+ src/TypeChecking/Definitions/Functions.hs view
@@ -0,0 +1,53 @@+{-# LANGUAGE RecursiveDo #-}++module TypeChecking.Definitions.Functions+ ( typeCheckFunction+ ) where++import Control.Monad+import Control.Monad.Fix+import Data.Maybe++import Syntax.Expr as E+import Syntax.Term as T+import Syntax.ErrorDoc+import TypeChecking.Monad+import TypeChecking.Context+import TypeChecking.Expressions+import TypeChecking.Definitions.Patterns+import TypeChecking.Definitions.Coverage+import TypeChecking.Definitions.Conditions+import TypeChecking.Definitions.Termination+import Normalization++typeCheckFunction :: MonadFix m => PIdent -> Expr -> [((Int, Int), [ParPat], Maybe Expr)] -> TCM m ()+typeCheckFunction p@(PIdent (lc,name)) ety clauses = mdo+ (ty, Type u _) <- typeCheck ety Nothing+ lvl <- case u of+ T.Universe lvl -> return lvl+ _ -> throwError [emsgLC (getPos ety) "" $ pretty "Expected a type" $$+ pretty "Actual type:" <+> prettyOpen Nil ty]+ addFunctionCheck p (FunCall lc name clauses') (Type ty lvl)+ clausesAndPats <- forW clauses $ \(lc,pats,mexpr) -> do+ (bf, TermsInCtx ctx _ ty', rtpats) <- typeCheckPatterns Nil (Type (nf WHNF ty) lvl) pats+ case (bf,mexpr) of+ (True, Nothing) -> return Nothing+ (False, Nothing) -> do+ let msg = "The right hand side can be omitted only if the absurd pattern is given"+ warn [emsgLC lc msg enull]+ return Nothing+ (True, Just expr) -> do+ let msg = "If the absurd pattern is given the right hand side must be omitted"+ warn [emsgLC (getPos expr) msg enull]+ return Nothing+ (False, Just expr) -> do+ (term, _) <- typeCheckCtx ctx expr (Just ty')+ let scope = closed (abstractTermInCtx ctx term)+ throwErrors (checkTermination name rtpats scope)+ return $ Just ((rtpats, scope), (lc, rtpats))+ let clauses' = map fst clausesAndPats+ case checkCoverage (map snd clausesAndPats) of+ Nothing -> when (length clausesAndPats == length (filter (\(_,_,me) -> isJust me) clauses)) $+ warn [emsgLC lc "Incomplete pattern matching" enull]+ Just uc -> warn $ map (\lc -> emsgLC lc "Unreachable clause" enull) uc+ warn $ checkConditions lc (Closed $ FunCall lc name clauses') (map fst clausesAndPats)
+ src/TypeChecking/Definitions/Patterns.hs view
@@ -0,0 +1,79 @@+{-# LANGUAGE ExistentialQuantification #-}++module TypeChecking.Definitions.Patterns+ ( typeCheckPatterns+ , TermsInCtx(..)+ ) where++import Syntax.Expr as E+import Syntax.Term as T+import Syntax.ErrorDoc+import TypeChecking.Context+import TypeChecking.Monad+import TypeChecking.Expressions+import Normalization++data TermInCtx b = forall a. Eq a => TermInCtx (Ctx String Type b a) (Term a)+data TermsInCtx b = forall a. Eq a => TermsInCtx (Ctx String Type b a) [Term a] (Type a)++typeCheckPattern :: (Monad m, Eq a) => Ctx String Type String a+ -> Type a -> ParPat -> TCM m (Bool, Maybe (TermInCtx a), T.Pattern (Closed (Scope String Term)))+typeCheckPattern ctx (Type T.Interval _) (ParLeft _) = return (False, Just $ TermInCtx Nil $ ICon ILeft , PatternI ILeft)+typeCheckPattern ctx (Type T.Interval _) (ParRight _) = return (False, Just $ TermInCtx Nil $ ICon IRight, PatternI IRight)+typeCheckPattern ctx (Type (DataType _ 0 _) _) (ParEmpty _) = return (True, Nothing, PatternVar "_")+typeCheckPattern ctx (Type ty _) (ParEmpty (PPar (lc,_))) =+ throwError [emsgLC lc "" $ pretty "Expected non-empty type:" <+> prettyOpen ctx ty]+typeCheckPattern ctx _ (ParVar (NoArg _)) = return (False, Nothing, PatternVar "_")+typeCheckPattern ctx ty@(Type (DataType dt _ params) _) (ParVar (Arg (PIdent (lc,var)))) = do+ cons <- lift $ getConstructor var (Just dt)+ case cons of+ [] -> return (False, Just $ TermInCtx (Snoc Nil var ty) $ T.Var Bound, PatternVar var)+ (n,con,(conType,_)):_ -> if isDataType conType+ then let con'@(T.Con i _ conName conds _) = instantiate params $ fmap (liftBase ctx) con+ in return (False, Just $ TermInCtx Nil con', T.Pattern (PatternCon i n conName conds) [])+ else throwError [emsgLC lc ("Not enough arguments to " ++ show var) enull]+ where+ isDataType :: Scope a Term b -> Bool+ isDataType (ScopeTerm DataType{}) = True+ isDataType (ScopeTerm _) = False+ isDataType (Scope _ t) = isDataType t+typeCheckPattern ctx ty (ParVar (Arg (PIdent (lc,var)))) =+ return (False, Just $ TermInCtx (Snoc Nil var ty) $ T.Var Bound, PatternVar var)+typeCheckPattern ctx (Type (DataType dt _ params) _) (ParPat _ (E.Pattern (PIdent (lc,conName)) pats)) = do+ cons <- lift $ getConstructor conName (Just dt)+ case cons of+ [] -> throwError [notInScope lc "data constructor" conName]+ (n,con,(conType,lvl)):_ -> do+ let T.Con i _ _ conds _ = instantiate params $ fmap (liftBase ctx) con+ conType' = Type (nf WHNF $ instantiate params $ fmap (liftBase ctx) conType) lvl+ (bf, TermsInCtx ctx' terms (Type ty _), rtpats) <- typeCheckPatterns ctx conType' pats+ let res = TermInCtx ctx' (T.Con i lc conName conds terms)+ case nf WHNF ty of+ DataType{} -> return (bf, Just res, T.Pattern (PatternCon i n conName conds) rtpats)+ _ -> throwError [emsgLC lc "Not enough arguments" enull]+typeCheckPattern ctx (Type ty _) pat =+ throwError [emsgLC (parPatGetPos pat) "" $ pretty "Unexpected pattern" $$+ pretty "Expected type:" <+> prettyOpen ctx ty]++typeCheckPatterns :: (Monad m, Eq a) => Ctx String Type String a -> Type a -> [ParPat]+ -> TCM m (Bool, TermsInCtx a, [T.Pattern (Closed (Scope String Term))])+typeCheckPatterns _ ty [] = return (False, TermsInCtx Nil [] ty, [])+typeCheckPatterns ctx (Type (T.Pi a b lvl) _) (pat:pats) = do+ let a' = nfType WHNF a+ (bf1, mte, rtpat) <- typeCheckPattern ctx a' pat+ TermInCtx ctx' te <- case mte of+ Nothing ->+ let var = case b of+ Scope v _ -> v+ _ -> "_"+ in return $ TermInCtx (Snoc Nil var a') (T.Var Bound)+ Just te -> return te+ let b' = instantiate1 te $ fmap (fmap $ liftBase ctx') $ unScope1 (dropOnePi a b lvl)+ (bf2, TermsInCtx ctx'' tes ty, rtpats) <- typeCheckPatterns (ctx +++ ctx') (Type (nf WHNF b') lvl) pats+ return (bf1 || bf2, TermsInCtx (ctx' +++ ctx'') (fmap (liftBase ctx'') te : tes) ty, rtpat:rtpats)+typeCheckPatterns _ _ (pat:_) = throwError [emsgLC (parPatGetPos pat) "Too many arguments" enull]++getVariables :: ParPat -> [PIdent]+getVariables (ParPat _ (E.Pattern _ pats)) = pats >>= getVariables+getVariables (ParVar (Arg var)) = [var]+getVariables _ = []
+ src/TypeChecking/Definitions/Termination.hs view
@@ -0,0 +1,87 @@+{-# LANGUAGE GADTs, ExistentialQuantification #-}++module TypeChecking.Definitions.Termination+ ( checkTermination+ ) where++import Control.Monad.State++import Syntax.Term+import Syntax.ErrorDoc+import TypeChecking.Context++checkTermination :: String -> [PatternC] -> Closed (Scope String Term) -> [EMsg Term]+checkTermination name pats (Closed scope) = map msg $ case scopeToCtx Nil scope of+ TermInCtx ctx term -> collectFunCalls ctx name [] term >>= \(lc,mts) -> case mts of+ Nothing -> [lc]+ Just (TermsInCtx ctx ts) -> if evalState (checkTerms ctx pats ts) 0 == LT then [] else [lc]+ where+ msg :: (Int,Int) -> EMsg Term+ msg lc = emsgLC lc "Termination check failed" enull++checkTerm :: Ctx String Term String a -> PatternC -> Term a -> State Int Ordering+checkTerm ctx (PatternI con) (ICon con') | con == con' = return EQ+checkTerm ctx (PatternVar _) (Var v) = do+ s <- get+ put (s + 1)+ return $ if s == lengthCtx ctx - 1 - index ctx v then EQ else GT+ where+ index :: Ctx String Term b a -> a -> Int+ index Nil _ = 0+ index (Snoc ctx _ _) Bound = 0+ index (Snoc ctx _ _) (Free a) = index ctx a + 1+checkTerm ctx (Pattern (PatternCon i _ _ _) pats) term = do+ s <- get+ results <- mapM (\pat -> checkTerm ctx pat term) pats+ let result = minimum (GT:results)+ if result /= GT then return LT else case collect term of+ Con i' _ _ _ terms | i == i' -> do+ put s+ checkTerms ctx pats terms+ _ -> return GT+checkTerm _ _ _ = return GT++checkTerms :: Ctx String Term String a -> [PatternC] -> [Term a] -> State Int Ordering+checkTerms _ [] _ = return EQ+checkTerms _ _ [] = return EQ+checkTerms ctx (pat:pats) (term:terms) = do+ r <- checkTerm ctx pat term+ case r of+ EQ -> checkTerms ctx pats terms+ _ -> return r++data TermInCtx s f b = forall a. TermInCtx (Ctx s f b a) (f a)+data TermsInCtx s f b = forall a. TermsInCtx (Ctx s f b a) [f a]++scopeToCtx :: Ctx s f b a -> Scope s f a -> TermInCtx s f b+scopeToCtx ctx (ScopeTerm t) = TermInCtx ctx t+scopeToCtx ctx (Scope s t) = scopeToCtx (Snoc ctx s $ error "") t++collectFunCalls :: Ctx String Term b a -> String -> [Term a] -> Term a -> [((Int,Int), Maybe (TermsInCtx String Term b))]+collectFunCalls _ _ _ Var{} = []+collectFunCalls ctx name ts (App e1 e2) = collectFunCalls ctx name (e2:ts) e1 ++ collectFunCalls ctx name [] e2+collectFunCalls ctx name _ (Lam (Scope1 v e)) = collectFunCalls (Snoc ctx v $ error "") name [] e+collectFunCalls ctx name _ (Pi (Type e _) s _) = collectFunCalls ctx name [] e ++ go ctx s+ where+ go :: Ctx String Term b a -> Scope String Term a -> [((Int,Int), Maybe (TermsInCtx String Term b))]+ go ctx (ScopeTerm t) = collectFunCalls ctx name [] t+ go ctx (Scope v t) = go (Snoc ctx v $ error "") t+collectFunCalls ctx name ts (Con _ lc name' _ as) =+ (if name == name' then [(lc, Just $ TermsInCtx ctx $ as ++ ts)] else []) ++ (as >>= collectFunCalls ctx name [])+collectFunCalls ctx name ts (FunCall lc name' _) = if name == name' then [(lc, Just $ TermsInCtx ctx ts)] else []+collectFunCalls ctx name _ FunSyn{} = []+collectFunCalls ctx name _ (DataType _ _ as) = as >>= collectFunCalls ctx name []+collectFunCalls ctx name _ Universe{} = []+collectFunCalls ctx name _ Interval = []+collectFunCalls ctx name _ ICon{} = []+collectFunCalls ctx name _ (Path _ me1 es) =+ maybe [] (collectFunCalls ctx name []) me1 ++ (es >>= collectFunCalls ctx name [])+collectFunCalls ctx name _ (PCon me) = maybe [] (collectFunCalls ctx name []) me+collectFunCalls ctx name _ (At _ _ e3 e4) = collectFunCalls ctx name [] e3 ++ collectFunCalls ctx name [] e4+collectFunCalls ctx name _ (Coe es) = es >>= collectFunCalls ctx name []+collectFunCalls ctx name _ (Iso es) = es >>= collectFunCalls ctx name []+collectFunCalls ctx name _ (Squeeze es) = es >>= collectFunCalls ctx name []++scopedToMaybe :: Scoped a -> Maybe a+scopedToMaybe Bound = Nothing+scopedToMaybe (Free a) = Just a
+ src/TypeChecking/Expressions.hs view
@@ -0,0 +1,306 @@+{-# LANGUAGE FlexibleContexts, ExistentialQuantification #-}++module TypeChecking.Expressions+ ( typeCheck, typeCheckCtx+ , notInScope, inferErrorMsg, inferParamsErrorMsg+ , prettyOpen, exprToVars+ , checkUniverses, checkIsType+ , SomeEq(..), extendCtx+ ) where++import Control.Monad+import Data.List+import Data.Maybe++import Syntax.Expr as E+import Syntax.Term as T+import Syntax.ErrorDoc+import TypeChecking.Monad+import TypeChecking.Context+import Normalization++notInScope :: Show a => (Int,Int) -> String -> a -> EMsg f+notInScope lc s a = emsgLC lc ("Not in scope: " ++ (if null s then "" else s ++ " ") ++ show a) enull++inferErrorMsg :: (Int,Int) -> String -> EMsg f+inferErrorMsg lc s = emsgLC lc ("Cannot infer type of " ++ s) enull++inferParamsErrorMsg :: Show a => (Int,Int) -> a -> EMsg f+inferParamsErrorMsg lc d = emsgLC lc ("Cannot infer parameters of data constructor " ++ show d) enull++expectedArgErrorMsg :: Show a => (Int,Int) -> a -> EMsg f+expectedArgErrorMsg lc d = emsgLC lc ("Expected an argument to " ++ show d) enull++prettyOpen :: (Pretty b f, Monad f) => Ctx b g b a -> f a -> EDoc f+prettyOpen ctx term = epretty $ liftM pretty (close ctx term)++exprToVars :: Monad m => Expr -> EDocM m [Arg]+exprToVars = liftM reverse . go+ where+ go (E.Var a) = return [a]+ go (E.App as (E.Var a)) = liftM (a:) (go as)+ go e = throwError [emsgLC (getPos e) "Expected a list of identifiers" enull]++checkUniverses :: (Pretty b Term, Monad m) => Ctx b g b a1 -> Ctx b g b a2+ -> Expr -> Expr -> Term a1 -> Term a2 -> EDocM m Level+checkUniverses ctx1 ctx2 e1 e2 (T.Universe lvl1) (T.Universe lvl2) = return (max lvl1 lvl2)+checkUniverses ctx1 _ e1 _ t1 (T.Universe _) = throwError [typeErrorMsg ctx1 e1 t1]+checkUniverses _ ctx2 _ e2 (T.Universe _) t2 = throwError [typeErrorMsg ctx2 e2 t2]+checkUniverses ctx1 ctx2 e1 e2 t1 t2 = throwError [typeErrorMsg ctx1 e1 t1, typeErrorMsg ctx2 e2 t2]++checkIsType :: (Pretty b Term, Monad m) => Ctx b g b a -> Expr -> Term a -> EDocM m Level+checkIsType _ _ (T.Universe lvl) = return lvl+checkIsType ctx e t = throwError [typeErrorMsg ctx e t]++typeErrorMsg :: Pretty b Term => Ctx b g b a -> Expr -> Term a -> EMsg Term+typeErrorMsg ctx e t = emsgLC (getPos e) "" $ pretty "Expected type: Type" $$+ pretty "Actual type:" <+> prettyOpen ctx t++intType :: Type a+intType = Type T.Interval NoLevel++data SomeEq f = forall a. Eq a => SomeEq (f a)++extendCtx :: Eq a => [s] -> Ctx s Type b a -> Type a -> SomeEq (Ctx s Type b)+extendCtx [] ctx _ = SomeEq ctx+extendCtx (x:xs) ctx t = extendCtx xs (Snoc ctx x t) (fmap Free t)++typeCheck :: Monad m => Expr -> Maybe (Type String) -> TCM m (Term String, Type String)+typeCheck = typeCheckCtx Nil++typeCheckCtx :: (Monad m, Eq a) => Ctx String Type String a -> Expr -> Maybe (Type a) -> TCM m (Term a, Type a)+typeCheckCtx ctx expr ty = go ctx expr [] $ fmap (nfType WHNF) ty+ where+ go :: (Monad m, Eq a) => Ctx String Type String a -> Expr -> [Expr] -> Maybe (Type a) -> TCM m (Term a, Type a)+ go ctx (Paren _ e) exprs ty = go ctx e exprs ty+ go ctx (E.App e1 e2) exprs ty = go ctx e1 (e2:exprs) ty+ go ctx (E.Lam _ [] e) exprs ty = go ctx e exprs ty+ go ctx (E.Lam p (arg : args) e) [] (Just (Type ty@(T.Pi a@(Type _ lvl1) b lvl2) lvl)) = do+ let var = unArg arg+ (te, _) <- go (Snoc ctx var a) (E.Lam p args e) [] $ Just $ Type (nf WHNF $ unScope1 $ dropOnePi a b lvl2) lvl2+ return (T.Lam $ Scope1 var te, Type ty $ min lvl $ max lvl1 lvl2)+ go ctx (E.Lam p (arg : args) e) [] (Just (Type ty _)) =+ throwError [emsgLC (argGetPos arg) "" $ pretty "Expected type:" <+> prettyOpen ctx ty $$+ pretty "But lambda expression has pi type"]+ go _ e@E.Lam{} _ _ = throwError [inferErrorMsg (getPos e) "the argument"]+ go ctx (E.Var (NoArg (Pus (lc,_)))) exprs mty = throwError [emsgLC lc "Expected an identifier" enull]+ go ctx (E.Var (Arg (PIdent (lc,var)))) exprs mty = do+ (te, Type ty lvl) <- case lookupCtx var ctx of+ Just r -> return r+ Nothing -> do+ mt <- lift $ getEntry var $ case mty of+ Just (Type (DataType d _ _) _) -> Just d+ _ -> Nothing+ let replaceConPos (T.Con i _ name conds args) = T.Con i lc name conds args+ replaceConPos t = t+ case mt of+ [FunctionE (FunCall _ name clauses) ty] -> return (FunCall lc name clauses, fmap (liftBase ctx) ty)+ [FunctionE te ty] -> return (fmap (liftBase ctx) te , fmap (liftBase ctx) ty)+ DataTypeE ty e : _ -> return (DataType var e [] , fmap (liftBase ctx) ty)+ [ConstructorE _ (ScopeTerm con) (ScopeTerm ty, lvl)] ->+ return (fmap (liftBase ctx) (replaceConPos con), Type (fmap (liftBase ctx) ty) lvl)+ [ConstructorE _ con (ty, lvl)] -> case mty of+ Just (Type (DataType _ _ params) _) ->+ let liftTerm = instantiate params . fmap (liftBase ctx)+ in return (replaceConPos (liftTerm con), Type (liftTerm ty) lvl)+ Just (Type ty _) -> throwError [emsgLC lc "" $ pretty "Expected type:" <+> prettyOpen ctx ty $$+ pretty ("But given data constructor " ++ show var)]+ Nothing -> throwError [inferParamsErrorMsg lc var]+ [] -> do+ cons <- lift (getConstructorDataTypes var)+ let Type (DataType dataType _ _) _ = fromJust mty+ case cons of+ [] -> throwError [notInScope lc "" var]+ [act] -> throwError [emsgLC lc "" $+ pretty ("Expected data type: " ++ dataType) $$+ pretty ("Actual data type: " ++ act)]+ acts -> throwError [emsgLC lc "" $+ pretty ("Expected data type: " ++ dataType) $$+ pretty ("Posible data types: " ++ intercalate ", " acts)]+ _ -> throwError [inferErrorMsg lc $ show var]+ (tes, Type ty' lvl') <- typeCheckApps lc ctx exprs (Type ty lvl)+ case (mty, ty') of+ (Nothing, _) -> return ()+ (Just (Type (DataType edt _ _) _), DataType adt _ []) -> unless (edt == adt) $+ throwError [emsgLC lc "" $ pretty ("Expected data type: " ++ edt) $$+ pretty ("Actual data type: " ++ adt)]+ (Just (Type ety _), _) -> actExpType ctx ty' ety lc+ return (apps te tes, Type ty' $ maybe lvl' (\(Type _ lvl'') -> min lvl' lvl'') mty)+ go _ (ELeft _) [] Nothing = return (ICon ILeft, intType)+ go _ e@ELeft{} _ Nothing = throwError [emsgLC (getPos e) "\"left\" is applied to arguments" enull]+ go _ (ERight _) [] Nothing = return (ICon IRight, intType)+ go _ e@ERight{} _ Nothing = throwError [emsgLC (getPos e) "\"right\" is applied to arguments" enull]+ go ctx e@PathCon{} es _ | length es > 1 = throwError [emsgLC (getPos e) "A path is applied to arguments" enull]+ go ctx e@PathCon{} [] Nothing = throwError [inferErrorMsg (getPos e) "path"]+ go ctx PathCon{} [e] Nothing = do+ (r, Scope1 v t, lvl) <- typeCheckLambda ctx e intType+ return (r, Type (T.Pi intType (Scope v (ScopeTerm t)) lvl) lvl)+ go ctx e@PathCon{} [] _ = throwError [expectedArgErrorMsg (getPos e) "path"]+ go ctx e'@PathCon{} [e] (Just (Type ty@(T.Path h mt1 _) lvl)) = do+ (r,t) <- go ctx e [] $ fmap (\t1 -> Type+ (T.Pi intType (Scope "i" $ ScopeTerm $ T.App (fmap Free t1) $ T.Var Bound) lvl) lvl) mt1+ let left = T.App r (ICon ILeft)+ right = T.App r (ICon IRight)+ actExpType ctx (T.Path Implicit Nothing [left,right]) ty (getPos e')+ return (PCon (Just r), Type ty lvl)+ go ctx e'@PathCon{} [e] (Just (Type ty _)) =+ throwError [emsgLC (getPos e') "" $ pretty "Expected type:" <+> prettyOpen ctx ty $$+ pretty "Actual type: Path"]+ go ctx (E.At e1 e2) es Nothing = do+ (r1, Type t1 lvl) <- go ctx e1 [] Nothing+ (r2, _) <- go ctx e2 [] (Just intType)+ case nf WHNF t1 of+ T.Path _ (Just a) [b,c] -> do+ (tes, ty) <- typeCheckApps (getPos e1) ctx es $ Type (T.App a r2) lvl+ return (apps (T.At b c r1 r2) tes, ty)+ T.Path _ Nothing _ -> throwError [emsgLC (getPos e1) "Cannot infer type" enull]+ t1' -> throwError [emsgLC (getPos e1) "" $ pretty "Expected type: Path" $$+ pretty "Actual type:" <+> prettyOpen ctx t1']+ go ctx e@E.Coe{} [] Nothing = throwError [expectedArgErrorMsg (getPos e) "coe"]+ go ctx e@E.Coe{} (e1:es) Nothing = do+ (r1, Scope1 v t1, _) <- typeCheckLambda ctx e1 intType+ lvl <- checkIsType (Snoc ctx v $ error "") e1 t1+ let res = T.Pi intType (Scope "r" $ ScopeTerm $ T.App (fmap Free r1) $ T.Var Bound) lvl+ case es of+ [] -> return (T.Coe [r1], Type (T.Pi intType (Scope "l" $ ScopeTerm $+ T.Pi (Type (T.App (fmap Free r1) $ T.Var Bound) lvl) (ScopeTerm $ fmap Free res) lvl) lvl) lvl)+ e2:es1 -> do+ (r2, _) <- go ctx e2 [] $ Just intType+ case es1 of+ [] -> return (T.Coe [r1,r2], Type (T.Pi (Type (T.App r1 r2) lvl) (ScopeTerm res) lvl) lvl)+ e3:es2 -> do+ (r3, _) <- go ctx e3 [] $ Just $ Type (nf WHNF $ T.App r1 r2) lvl+ case es2 of+ [] -> return (T.Coe [r1,r2,r3], Type res lvl)+ e4:es3 -> do+ (r4, _) <- go ctx e4 [] $ Just intType+ (tes, ty) <- typeCheckApps (getPos e) ctx es3 $ Type (T.App r1 r4) lvl+ return (T.Coe $ [r1,r2,r3,r4] ++ tes, ty)+ go ctx e@E.Iso{} es Nothing | length es < 6 =+ throwError [emsgLC (getPos e) "Expected at least 6 arguments to \"iso\"" enull]+ go ctx E.Iso{} (e1:e2:e3:e4:e5:e6:es) Nothing | length es <= 1 = do+ (r1, Type t1 _) <- go ctx e1 [] Nothing+ (r2, Type t2 _) <- go ctx e2 [] Nothing+ let t1' = nf WHNF t1+ t2' = nf WHNF t2+ lvl1 <- checkIsType ctx e1 t1'+ lvl2 <- checkIsType ctx e2 t2'+ let lvl = max lvl1 lvl2+ (r3, _) <- go ctx e3 [] $ Just $ Type (T.Pi (Type r1 lvl1) (ScopeTerm r2) lvl2) lvl+ (r4, _) <- go ctx e4 [] $ Just $ Type (T.Pi (Type r2 lvl2) (ScopeTerm r1) lvl1) lvl+ let h e s1 s3 s4 tlvl = go ctx e [] $ Just $ Type (T.Pi (Type s1 tlvl) (Scope "x" $+ ScopeTerm $ T.Path Implicit (Just $ T.Pi intType (ScopeTerm $ fmap Free s1) tlvl)+ [T.App (fmap Free s4) $ T.App (fmap Free s3) $ T.Var Bound, T.Var Bound]) tlvl) tlvl+ (r5, _) <- h e5 r1 r3 r4 lvl1+ (r6, _) <- h e6 r2 r4 r3 lvl2+ case es of+ [] -> return (T.Iso [r1,r2,r3,r4,r5,r6],+ Type (T.Pi intType (ScopeTerm $ T.Universe lvl) $ succ lvl) $ succ lvl)+ e7:_ -> do+ (r7, _) <- go ctx e7 [] $ Just intType+ return (T.Iso [r1,r2,r3,r4,r5,r6,r7], Type (T.Universe lvl) $ succ lvl)+ go ctx e@E.Squeeze{} [] Nothing = return (T.Squeeze [],+ Type (T.Pi intType (ScopeTerm $ T.Pi intType (ScopeTerm T.Interval) NoLevel) NoLevel) NoLevel)+ go ctx e@E.Squeeze{} [e1] Nothing = do+ (r1, _) <- go ctx e1 [] $ Just intType+ return (T.Squeeze [r1], Type (T.Pi intType (ScopeTerm T.Interval) NoLevel) NoLevel)+ go ctx E.Squeeze{} [e1,e2] Nothing = do+ (r1, _) <- go ctx e1 [] $ Just intType+ (r2, _) <- go ctx e2 [] $ Just intType+ return (T.Squeeze [r1,r2], intType)+ go ctx (E.Pi [] e) [] Nothing = go ctx e [] Nothing+ go ctx expr@(E.Pi (PiTele _ e1 e2 : tvs) e) [] Nothing = do+ args <- exprToVars e1+ (r1, Type t1 _) <- typeCheckCtx ctx e2 Nothing+ lvl1 <- checkIsType ctx e2 (nf WHNF t1)+ case extendCtx (map unArg args) Nil (Type r1 lvl1) of+ SomeEq ctx' -> do+ (r2, Type t2 _) <- go (ctx +++ ctx') (E.Pi tvs e) [] Nothing+ lvl2 <- checkIsType (ctx +++ ctx') (E.Pi tvs e) (nf WHNF t2)+ let lvl = max lvl1 lvl2+ return (T.Pi (Type r1 lvl1) (abstractTermInCtx ctx' r2) lvl2, Type (T.Universe lvl) $ succ lvl)+ go ctx (E.Arr e1 e2) [] Nothing = do+ (r1, Type t1 _) <- go ctx e1 [] Nothing+ (r2, Type t2 _) <- go ctx e2 [] Nothing+ lvl1 <- checkIsType ctx e1 (nf WHNF t1)+ lvl2 <- checkIsType ctx e1 (nf WHNF t2)+ let lvl = max lvl1 lvl2+ return (T.Pi (Type r1 lvl1) (ScopeTerm r2) lvl2, Type (T.Universe lvl) $ succ lvl)+ go _ (E.Universe (U (_,u))) [] Nothing =+ let l = parseLevel u+ l' = Level (level l + 1)+ in return (T.Universe l, Type (T.Universe l') $ succ l')+ where+ parseLevel :: String -> Level+ parseLevel "Type" = NoLevel+ parseLevel ('T':'y':'p':'e':s) = Level (read s)+ parseLevel s = error $ "parseLevel: " ++ s+ go _ E.Interval{} [] Nothing = return (T.Interval, Type (T.Universe NoLevel) $ Level 1)+ go ctx e@E.Path{} [] _ = throwError [expectedArgErrorMsg (getPos e) "Path"]+ go ctx E.Path{} (e1:es) Nothing | length es < 3 = do+ (r1, Scope1 v t1, _) <- typeCheckLambda ctx e1 intType+ lvl <- checkIsType (Snoc ctx v $ error "") e1 t1+ let r1' c = Type (T.App r1 $ ICon c) lvl+ mkType t = Type t (succ lvl)+ case es of+ [] -> return (T.Path Explicit (Just r1) [], mkType $+ T.Pi (r1' ILeft) (ScopeTerm $ T.Pi (r1' IRight) (ScopeTerm $ T.Universe lvl) $ succ lvl) $ succ lvl)+ [e2] -> do+ (r2,_) <- go ctx e2 [] $ Just $ nfType WHNF (r1' ILeft)+ return (T.Path Explicit (Just r1) [r2], mkType $+ T.Pi (r1' IRight) (ScopeTerm $ T.Universe lvl) $ succ lvl)+ [e2,e3] -> do+ (r2,_) <- go ctx e2 [] $ Just $ nfType WHNF (r1' ILeft)+ (r3,_) <- go ctx e3 [] $ Just $ nfType WHNF (r1' IRight)+ return (T.Path Explicit (Just r1) [r2,r3], mkType $ T.Universe lvl)+ _ -> error "typeCheckCtx.Path"+ go ctx (E.PathImp e1 e2) [] Nothing = do+ (r1, Type t1 lvl) <- go ctx e1 [] Nothing+ (r2, _) <- go ctx e2 [] $ Just $ Type (nf WHNF t1) lvl+ return (T.Path Implicit (Just $ T.Lam $ Scope1 "_" $ fmap Free t1) [r1,r2], Type (T.Universe lvl) $ succ lvl)+ go _ e _ Nothing = throwError [emsgLC (getPos e) "A type is applied to arguments" enull]+ go ctx e es (Just (Type ty lvl)) = do+ (r, Type t _) <- go ctx e es Nothing+ actExpType ctx t ty (getPos e)+ return (r, Type ty lvl)++typeCheckLambda :: (Monad m, Eq a) => Ctx String Type String a -> Expr -> Type a+ -> TCM m (Term a, Scope1 String Term a, Level)+typeCheckLambda ctx (Paren _ e) ty = typeCheckLambda ctx e ty+typeCheckLambda ctx (E.Lam _ [] e) ty = typeCheckLambda ctx e ty+typeCheckLambda ctx (E.Lam p (arg:args) e) ty = do+ let var = unArg arg+ (te, Type ty' lvl) <- typeCheckCtx (Snoc ctx var ty) (E.Lam p args e) Nothing+ return (T.Lam $ Scope1 var te, Scope1 var ty', lvl)+typeCheckLambda ctx e ty = do+ (te, Type ty' _) <- typeCheckCtx ctx e Nothing+ case nf WHNF ty' of+ T.Pi a b lvlb ->+ let Type na lvla = nfType NF a+ Type nty lvlty = nfType NF ty+ in if (nty `lessOrEqual` na)+ then return (te, dropOnePi a b lvlb, lvlb)+ else throwError [emsgLC (getPos e) "" $+ pretty "Expected type:" <+> prettyOpen ctx (T.Pi (Type nty lvla) b lvlb) $$+ pretty "Actual type:" <+> prettyOpen ctx (T.Pi (Type na lvlty) b lvlb)]+ _ -> throwError [emsgLC (getPos e) "" $ pretty "Expected pi type" $$+ pretty "Actual type:" <+> prettyOpen ctx ty']++actExpType :: (Monad m, Eq a) => Ctx String Type String a -> Term a -> Term a -> (Int,Int) -> EDocM m ()+actExpType ctx act exp lc =+ let act' = nf NF act+ exp' = nf NF exp+ in unless (act' `lessOrEqual` exp') $+ throwError [emsgLC lc "" $ pretty "Expected type:" <+> prettyOpen ctx exp' $$+ pretty "Actual type:" <+> prettyOpen ctx act']++typeCheckApps :: (Monad m, Eq a) => (Int,Int) -> Ctx String Type String a -> [Expr] -> Type a -> TCM m ([Term a], Type a)+typeCheckApps lc ctx exprs ty = go exprs (nfType WHNF ty)+ where+ go [] ty = return ([], ty)+ go (expr:exprs) (Type (T.Pi a b lvl') _) = do+ (term, _) <- typeCheckCtx ctx expr (Just a)+ (terms, ty) <- go exprs $ Type (nf WHNF $ instantiate1 term $ unScope1 $ dropOnePi a b lvl') lvl'+ return (term:terms, ty)+ go _ (Type ty _) = throwError [emsgLC lc "" $ pretty "Expected pi type" $$+ pretty "Actual type:" <+> prettyOpen ctx ty]
+ src/TypeChecking/Monad.hs view
@@ -0,0 +1,50 @@+module TypeChecking.Monad+ ( EDocM, ScopeM, TCM, runTCM+ , addFunctionCheck, addDataTypeCheck, addConstructorCheck+ , module TypeChecking.Monad.Warn+ , module TypeChecking.Monad.Scope+ , lift+ ) where++import Control.Monad+import Control.Monad.Trans(lift)++import TypeChecking.Monad.Warn+import TypeChecking.Monad.Scope+import Syntax.Term+import Syntax.Expr+import Syntax.ErrorDoc++type EDocM = WarnT [EMsg Term]+type ScopeM = ScopeT (Term String) (Type String) (Scope String Term String) (Scope String Term String, Level)+type TCM m = EDocM (ScopeM m)++runTCM :: Monad m => TCM m a -> m (Maybe a)+runTCM = liftM snd . runScopeT . runWarnT++multipleDeclaration :: (Int,Int) -> String -> EMsg f+multipleDeclaration lc var = emsgLC lc ("Multiple declarations of " ++ show var) enull++addFunctionCheck :: Monad m => PIdent -> Term String -> Type String -> TCM m ()+addFunctionCheck (PIdent (lc,var)) te ty = do+ mr <- lift (getEntry var Nothing)+ case mr of+ [] -> lift (addFunction var te ty)+ _ -> warn [multipleDeclaration lc var]++addDataTypeCheck :: Monad m => PIdent -> Type String -> Int -> TCM m ()+addDataTypeCheck (PIdent (lc,var)) ty b = do+ mr <- lift (getEntry var Nothing)+ case mr of+ FunctionE _ _ : _ -> warn [multipleDeclaration lc var]+ DataTypeE _ _ : _ -> warn [multipleDeclaration lc var]+ _ -> lift (addDataType var ty b)++addConstructorCheck :: Monad m => PIdent -> String -> Int+ -> Scope String Term String -> Scope String Term String -> Level -> TCM m ()+addConstructorCheck (PIdent (lc,var)) dt n te ty lvl = do+ mr <- lift $ getEntry var (Just dt)+ case mr of+ FunctionE _ _ : _ -> warn [multipleDeclaration lc var]+ ConstructorE _ _ _ : _ -> warn [multipleDeclaration lc var]+ _ -> lift $ addConstructor var dt n te (ty,lvl)
+ src/TypeChecking/Monad/Scope.hs view
@@ -0,0 +1,59 @@+{-# LANGUAGE GeneralizedNewtypeDeriving #-}++module TypeChecking.Monad.Scope+ ( ScopeT, runScopeT+ , addFunction, addConstructor, addDataType+ , deleteDataType+ , getConstructor, getConstructorDataTypes+ , Entry(..), getEntry+ ) where++import Control.Monad+import Control.Monad.Fix+import Control.Monad.State+import Control.Applicative+import Data.List+import Data.Maybe++data Entry a b c d = FunctionE a b | DataTypeE b Int | ConstructorE Int c d++data ScopeState a b c d = ScopeState+ { functions :: [(String, (a, b))]+ , dataTypes :: [(String, (b, Int))]+ , constructors :: [((String, String), (Int, c, d))]+ }++newtype ScopeT a b c d m a' = ScopeT { unScopeT :: StateT (ScopeState a b c d) m a' }+ deriving (Functor,Monad,MonadTrans,MonadIO,MonadFix,Applicative)++addFunction :: Monad m => String -> a -> b -> ScopeT a b c d m ()+addFunction v te ty = ScopeT $ modify $ \scope -> scope { functions = (v, (te, ty)) : functions scope }++addDataType :: Monad m => String -> b -> Int -> ScopeT a b c d m ()+addDataType v ty b = ScopeT $ modify $ \scope -> scope { dataTypes = (v, (ty, b)) : dataTypes scope }++addConstructor :: Monad m => String -> String -> Int -> c -> d -> ScopeT a b c d m ()+addConstructor con dt n te ty = ScopeT $ modify $ \scope ->+ scope { constructors = ((con, dt), (n, te, ty)) : constructors scope }++deleteDataType :: Monad m => String -> ScopeT a b c d m ()+deleteDataType dt = ScopeT $ modify $ \scope ->+ scope { dataTypes = deleteBy (\(v1,_) (v2,_) -> v1 == v2) (dt, error "") (dataTypes scope) }++getConstructor :: Monad m => String -> Maybe String -> ScopeT a b c d m [(Int, c, d)]+getConstructor con (Just dt) = ScopeT $ liftM (maybeToList . lookup (con, dt) . constructors) get+getConstructor con Nothing = ScopeT $ liftM (map snd . filter (\((c,_),_) -> con == c) . constructors) get++getConstructorDataTypes :: Monad m => String -> ScopeT a b c d m [String]+getConstructorDataTypes con = ScopeT $ liftM (map (snd . fst) . filter (\((c,_),_) -> con == c) . constructors) get++getEntry :: Monad m => String -> Maybe String -> ScopeT a b c d m [Entry a b c d]+getEntry v dt = ScopeT $ do+ cons <- unScopeT (getConstructor v dt)+ scope <- get+ return $ map (uncurry FunctionE) (maybeToList $ lookup v $ functions scope)+ ++ (if isNothing dt then map (uncurry DataTypeE) (maybeToList $ lookup v $ dataTypes scope) else [])+ ++ map (\(i,c,d) -> ConstructorE i c d) cons++runScopeT :: Monad m => ScopeT a b c d m a' -> m a'+runScopeT (ScopeT f) = evalStateT f $ ScopeState [] [] []
+ src/TypeChecking/Monad/Warn.hs view
@@ -0,0 +1,57 @@+{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}++module TypeChecking.Monad.Warn+ ( WarnT, warn, runWarnT+ , throwError, catchError+ , forW, throwErrors+ ) where++import Control.Monad+import Control.Monad.Fix+import Control.Monad.Trans+import Control.Monad.Error.Class+import Control.Applicative+import Data.Monoid hiding ((<>))+import Data.Maybe++newtype WarnT w m a = WarnT { runWarnT :: m (w, Maybe a) }++instance Functor m => Functor (WarnT w m) where+ fmap f (WarnT m) = WarnT $ fmap (\(w, ma) -> (w, fmap f ma)) m++instance (Monoid w, Applicative m) => Applicative (WarnT w m) where+ pure a = WarnT $ pure (mempty, Just a)+ WarnT f <*> WarnT a = WarnT $ (\(w1, mf) (w2, ma) -> (w1 `mappend` w2, mf <*> ma)) <$> f <*> a++instance (Monoid w, Monad m) => Monad (WarnT w m) where+ return a = WarnT $ return (mempty, Just a)+ WarnT m >>= k = WarnT $ m >>= \(w, ma) -> case ma of+ Nothing -> return (w, Nothing)+ Just a -> do+ (w', mb) <- runWarnT (k a)+ return (w `mappend` w', mb)++instance (Monoid w, Monad m) => MonadError w (WarnT w m) where+ throwError w = WarnT $ return (w, Nothing)+ catchError (WarnT m) h = WarnT $ m >>= \(w, ma) -> case ma of+ Nothing -> runWarnT (h w)+ Just _ -> return (w, ma)++instance Monoid w => MonadTrans (WarnT w) where+ lift m = WarnT $ liftM (\a -> (mempty, Just a)) m++instance (Monoid w, MonadIO m) => MonadIO (WarnT w m) where+ liftIO m = WarnT $ liftM (\a -> (mempty, Just a)) (liftIO m)++instance (Monoid w, MonadFix m) => MonadFix (WarnT w m) where+ mfix f = WarnT $ mfix $ \ ~(_, ~(Just a)) -> runWarnT (f a)++warn :: Monad m => w -> WarnT w m ()+warn w = WarnT $ return (w, Just ())++forW :: (Monoid w, Monad m) => [a] -> (a -> WarnT w m (Maybe b)) -> WarnT w m [b]+forW as k = liftM catMaybes $ forM as $ \a -> k a `catchError` \w -> warn w >> return Nothing++throwErrors :: Monad m => [w] -> WarnT [w] m ()+throwErrors [] = return ()+throwErrors ws = throwError ws