summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndresSicardRamirez <>2015-12-18 22:54:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2015-12-18 22:54:00 (GMT)
commita6fab26cb3e42f8a2fd55de48317f6364a8945a2 (patch)
tree5cb8fd5b37dd7244a3faa0b9ece5eeea78fdf195
parent2c7bab00f155214ad68a0f4798a9698d4524c527 (diff)
version 2.4.2.52.4.2.5
-rw-r--r--Agda.cabal28
-rw-r--r--CHANGELOG75
-rw-r--r--README.md2
-rw-r--r--dist/build/Agda/Syntax/Parser/Lexer.hs97
-rw-r--r--dist/build/Agda/Syntax/Parser/Parser.hs350
-rw-r--r--src/data/agda.sty1
-rw-r--r--src/data/emacs-mode/agda2-mode.el3
-rw-r--r--src/full/Agda/Auto/Auto.hs4
-rw-r--r--src/full/Agda/Auto/Convert.hs3
-rw-r--r--src/full/Agda/Compiler/Epic/CompileState.hs6
-rw-r--r--src/full/Agda/Compiler/Epic/Compiler.hs5
-rw-r--r--src/full/Agda/Compiler/Epic/Forcing.hs4
-rw-r--r--src/full/Agda/Compiler/Epic/NatDetection.hs4
-rw-r--r--src/full/Agda/Compiler/Epic/Smashing.hs8
-rw-r--r--src/full/Agda/Compiler/Epic/Static.hs4
-rw-r--r--src/full/Agda/Compiler/MAlonzo/Compiler.hs44
-rw-r--r--src/full/Agda/Compiler/MAlonzo/Misc.hs18
-rw-r--r--src/full/Agda/Compiler/MAlonzo/Pretty.hs6
-rw-r--r--src/full/Agda/Compiler/MAlonzo/Primitives.hs2
-rw-r--r--src/full/Agda/Interaction/BasicOps.hs10
-rw-r--r--src/full/Agda/Interaction/Highlighting/Generate.hs2
-rw-r--r--src/full/Agda/Interaction/Highlighting/LaTeX.hs2
-rw-r--r--src/full/Agda/Interaction/InteractionTop.hs14
-rw-r--r--src/full/Agda/Interaction/MakeCase.hs17
-rw-r--r--src/full/Agda/Syntax/Abstract/Name.hs5
-rw-r--r--src/full/Agda/Syntax/Common.hs13
-rw-r--r--src/full/Agda/Syntax/Concrete/Definitions.hs85
-rw-r--r--src/full/Agda/Syntax/Concrete/Operators.hs10
-rw-r--r--src/full/Agda/Syntax/Info.hs2
-rw-r--r--src/full/Agda/Syntax/Internal.hs38
-rw-r--r--src/full/Agda/Syntax/Parser/Parser.y372
-rw-r--r--src/full/Agda/Syntax/Scope/Base.hs6
-rw-r--r--src/full/Agda/Syntax/Translation/AbstractToConcrete.hs2
-rw-r--r--src/full/Agda/Syntax/Translation/ConcreteToAbstract.hs51
-rw-r--r--src/full/Agda/Syntax/Translation/InternalToAbstract.hs6
-rw-r--r--src/full/Agda/Termination/Inlining.hs15
-rw-r--r--src/full/Agda/TypeChecking/Abstract.hs2
-rw-r--r--src/full/Agda/TypeChecking/CompiledClause.hs2
-rw-r--r--src/full/Agda/TypeChecking/CompiledClause/Compile.hs89
-rw-r--r--src/full/Agda/TypeChecking/Coverage.hs2
-rw-r--r--src/full/Agda/TypeChecking/Errors.hs12
-rw-r--r--src/full/Agda/TypeChecking/Monad/Base.hs49
-rw-r--r--src/full/Agda/TypeChecking/Monad/Builtin.hs21
-rw-r--r--src/full/Agda/TypeChecking/Monad/Signature.hs132
-rw-r--r--src/full/Agda/TypeChecking/Monad/State.hs12
-rw-r--r--src/full/Agda/TypeChecking/Pretty.hs2
-rw-r--r--src/full/Agda/TypeChecking/Quote.hs2
-rw-r--r--src/full/Agda/TypeChecking/Records.hs5
-rw-r--r--src/full/Agda/TypeChecking/Reduce.hs2
-rw-r--r--src/full/Agda/TypeChecking/Reduce/Monad.hs4
-rw-r--r--src/full/Agda/TypeChecking/Rules/Data.hs2
-rw-r--r--src/full/Agda/TypeChecking/Rules/Decl.hs11
-rw-r--r--src/full/Agda/TypeChecking/Rules/Def.hs493
-rw-r--r--src/full/Agda/TypeChecking/Rules/Def.hs-boot2
-rw-r--r--src/full/Agda/TypeChecking/Rules/Record.hs2
-rw-r--r--src/full/Agda/TypeChecking/Rules/Term.hs57
-rw-r--r--src/full/Agda/TypeChecking/Serialise.hs1749
-rw-r--r--src/full/Agda/TypeChecking/Serialise/Base.hs640
-rw-r--r--src/full/Agda/TypeChecking/Serialise/Instances.hs19
-rw-r--r--src/full/Agda/TypeChecking/Serialise/Instances/Abstract.hs279
-rw-r--r--src/full/Agda/TypeChecking/Serialise/Instances/Common.hs437
-rw-r--r--src/full/Agda/TypeChecking/Serialise/Instances/Compilers.hs126
-rw-r--r--src/full/Agda/TypeChecking/Serialise/Instances/Highlighting.hs93
-rw-r--r--src/full/Agda/TypeChecking/Serialise/Instances/Internal.hs418
-rw-r--r--src/full/Agda/TypeChecking/Substitute.hs29
-rw-r--r--src/full/Agda/TypeChecking/With.hs304
-rw-r--r--src/full/Agda/Utils/Pretty.hs5
67 files changed, 3558 insertions, 2758 deletions
diff --git a/Agda.cabal b/Agda.cabal
index 4dd96b3..f377b7b 100644
--- a/Agda.cabal
+++ b/Agda.cabal
@@ -1,5 +1,5 @@
name: Agda
-version: 2.4.2.4
+version: 2.4.2.5
cabal-version: >= 1.8
build-type: Custom
license: OtherLicense
@@ -34,7 +34,7 @@ description:
packages.
tested-with: GHC == 7.6.3
GHC == 7.8.4
- GHC == 7.10.2
+ GHC == 7.10.3
extra-source-files: src/full/undefined.h
README.md
CHANGELOG
@@ -55,7 +55,7 @@ source-repository head
source-repository this
type: git
location: https://github.com/agda/agda
- tag: 2.4.2.4
+ tag: 2.4.2.5
flag cpphs
default: True
@@ -97,7 +97,7 @@ library
-- much slower (infinitely slower?) in some cases.
, hashtables >= 1.0.1.8 && < 1.2 || >= 1.2.0.2 && < 1.3
, haskeline >= 0.7.1.3 && < 0.8
- , haskell-src-exts >= 1.16.0.1 && < 1.17
+ , haskell-src-exts >= 1.16.0.1 && < 1.18
-- mtl-2.1 contains a severe bug.
--
-- mtl >= 2.2 && < 2.2.1 doesn't export Control.Monad.Except.
@@ -119,12 +119,19 @@ library
, transformers-compat >= 0.3.3.3 && < 0.5
, unordered-containers >= 0.2.5.0 && < 0.3
, xhtml >= 3000.2.1 && < 3000.3
- -- zlib >= 0.6.1 is broken. See Issue 1518.
- , zlib >= 0.4.0.1 && < 0.6.1
if impl(ghc < 7.8)
build-depends: base-orphans >= 0.3.1 && < 0.5
+ if impl(ghc < 7.10)
+ build-depends: void >= 0.5.4 && < 0.9
+
+ -- zlib >= 0.6.1 is broken with GHC < 7.10.3. See Issue 1518.
+ if impl(ghc < 7.10.3)
+ build-depends: zlib >= 0.4.0.1 && < 0.6.1
+ else
+ build-depends: zlib >= 0.4.0.1 && < 0.7
+
build-tools:
alex >= 3.1.0 && < 3.2
, happy >= 1.19.4 && < 2
@@ -325,6 +332,13 @@ library
Agda.TypeChecking.Rules.Record
Agda.TypeChecking.Rules.Term
Agda.TypeChecking.Serialise
+ Agda.TypeChecking.Serialise.Base
+ Agda.TypeChecking.Serialise.Instances
+ Agda.TypeChecking.Serialise.Instances.Abstract
+ Agda.TypeChecking.Serialise.Instances.Common
+ Agda.TypeChecking.Serialise.Instances.Compilers
+ Agda.TypeChecking.Serialise.Instances.Highlighting
+ Agda.TypeChecking.Serialise.Instances.Internal
Agda.TypeChecking.SizedTypes
Agda.TypeChecking.SizedTypes.Solve
Agda.TypeChecking.SizedTypes.Syntax
@@ -436,7 +450,7 @@ executable agda
hs-source-dirs: src/main
main-is: Main.hs
build-depends:
- Agda == 2.4.2.4
+ Agda == 2.4.2.5
-- Nothing is used from the following package, except for the
-- prelude.
, base >= 4.6.0.1 && < 6
diff --git a/CHANGELOG b/CHANGELOG
index d3a5e25..0cde26a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,77 @@
------------------------------------------------------------------------
+-- Release notes for Agda version 2.4.2.5
+------------------------------------------------------------------------
+
+Important changes since 2.4.2.4:
+
+Installation and infrastructure
+===============================
+
+* Added support for GHC 7.10.3.
+
+* Added `cpphs` Cabal flag
+
+ Turn on/off this flag to choose cpphs/cpp as the C preprocessor.
+
+ This flag is turn on by default.
+
+ (This flag was added in Agda 2.4.2.1 but it was not documented)
+
+Pragmas and options
+===================
+
+* Termination pragmas are not allowed inside `where` clauses
+ [Issue 1137].
+
+Type checking
+=============
+
+* `with`-abstraction is more agressive, abstracts also in types of
+ variables that are used in the `with`-expressions, unless they are
+ also used in the types of the `with`-expressions. [Issue 1692]
+
+ Example:
+
+ ```agda
+ test : (f : (x : A) → a ≡ x) (b : A) → b ≡ a
+ test f b with a | f b
+ test f b | .b | refl = f b
+ ```
+
+ Previously, `with` would not abstract in types of variables that
+ appear in the `with`-expressions, in this case, both `f` and `b`,
+ leaving their types unchanged.
+ Now, it tries to abstract in `f`, as only `b` appears in the types of
+ the `with`-expressions which are `A` (of `a`) and `a ≡ b` (of `f b`).
+ As a result, the type of `f` changes to `(x : A) → b ≡ x` and the
+ type of the goal to `b ≡ b` (as previously).
+
+ This also affects `rewrite`, which is implemented in terms of
+ `with`.
+
+ ```agda
+ test : (f : (x : A) → a ≡ x) (b : A) → b ≡ a
+ test f b rewrite f b = f b
+ ```
+
+ As the new `with` is not fully backwards-compatible, some parts of
+ your Agda developments using `with` or `rewrite` might need
+ maintenance.
+
+Fixed issues
+============
+
+See https://github.com/agda/agda/issues
+* 1407
+* 1518
+* 1670
+* 1677
+* 1698
+* 1701
+* 1710
+* 1718
+
+------------------------------------------------------------------------
-- Release notes for Agda version 2.4.2.4
------------------------------------------------------------------------
@@ -7,8 +80,6 @@ Important changes since 2.4.2.3:
Installation and infrastructure
===============================
-* Added support for GHC 7.10.2.
-
* Removed support for GHC 7.4.2.
Pragmas and options
diff --git a/README.md b/README.md
index 5b1f1e1..de09c08 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-[![Build Status](https://travis-ci.org/agda/agda.svg?branch=maint-2.4.2)](https://travis-ci.org/agda/agda)
+[![Build Status](https://travis-ci.org/agda/agda.svg?branch=maint-2.4)](https://travis-ci.org/agda/agda)
Agda 2
======
diff --git a/dist/build/Agda/Syntax/Parser/Lexer.hs b/dist/build/Agda/Syntax/Parser/Lexer.hs
index 05421bd..199bbde 100644
--- a/dist/build/Agda/Syntax/Parser/Lexer.hs
+++ b/dist/build/Agda/Syntax/Parser/Lexer.hs
@@ -1,3 +1,4 @@
+{-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-missing-signatures #-}
{-# LANGUAGE CPP,MagicHash #-}
{-# LINE 1 "src/full/Agda/Syntax/Parser/Lexer.x" #-}
@@ -43,17 +44,17 @@ import Agda.Syntax.Literal
#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_tab_size :: Int
+alex_tab_size = 8
alex_base :: AlexAddr
alex_base = AlexA# "\xf7\xff\xff\xff\x6c\x00\x00\x00\xe1\x00\x00\x00\x55\x01\x00\x00\xca\x01\x00\x00\x3f\x02\x00\x00\xb5\x02\x00\x00\xab\x03\x00\x00\x88\xff\xff\xff\xd9\xff\xff\xff\x8a\x04\x00\x00\xe8\x04\x00\x00\x46\x05\x00\x00\xb6\x02\x00\x00\xa2\x05\x00\x00\x9d\x03\x00\x00\xfe\x05\x00\x00\xfd\x05\x00\x00\x7d\x06\x00\x00\xa2\xff\xff\xff\xfd\x06\x00\x00\xdc\x07\x00\x00\xdb\x07\x00\x00\x5b\x08\x00\x00\xdb\x08\x00\x00\x5b\x09\x00\x00\x3a\x0a\x00\x00\x96\x0a\x00\x00\xf2\x0a\x00\x00\xf1\x0a\x00\x00\x99\xff\xff\xff\xa6\xff\xff\xff\x8f\xff\xff\xff\x9d\xff\xff\xff\xa8\xff\xff\xff\x00\x00\x00\x00\x62\x0b\x00\x00\x00\x00\x00\x00\xd3\x0b\x00\x00\xa9\xff\xff\xff\x00\x00\x00\x00\x44\x0c\x00\x00\x00\x00\x00\x00\xb5\x0c\x00\x00\x00\x00\x00\x00\xf6\x0c\x00\x00\x00\x00\x00\x00\x37\x0d\x00\x00\x00\x00\x00\x00\x78\x0d\x00\x00\x00\x00\x00\x00\xb9\x0d\x00\x00\x98\x0e\x00\x00\x17\x0f\x00\x00\xd7\x0e\x00\x00\x00\x00\x00\x00\xd7\x0f\x00\x00\x97\x0f\x00\x00\x00\x00\x00\x00\x97\x10\x00\x00\x57\x10\x00\x00\x00\x00\x00\x00\x57\x11\x00\x00\x04\x00\x00\x00\xcd\x11\x00\x00\x2f\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x12\x00\x00\xb9\x13\x00\x00\xaf\x14\x00\x00\xa5\x15\x00\x00\x9b\x16\x00\x00\x91\x17\x00\x00\x87\x18\x00\x00\x7d\x19\x00\x00\x73\x1a\x00\x00\x69\x1b\x00\x00\x5f\x1c\x00\x00\x55\x1d\x00\x00\x4b\x1e\x00\x00\x41\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x73\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x20\x00\x00\x2f\x21\x00\x00\x26\x22\x00\x00\x1d\x23\x00\x00\x14\x24\x00\x00\x0b\x25\x00\x00\x02\x26\x00\x00\xf9\x26\x00\x00\xf0\x27\x00\x00\xe7\x28\x00\x00\xde\x29\x00\x00\xd5\x2a\x00\x00\xcc\x2b\x00\x00\xc3\x2c\x00\x00\xba\x2d\x00\x00\xb1\x2e\x00\x00\xa8\x2f\x00\x00\x9f\x30\x00\x00\x96\x31\x00\x00\x8d\x32\x00\x00\x84\x33\x00\x00\x7b\x34\x00\x00\x72\x35\x00\x00\x69\x36\x00\x00\x60\x37\x00\x00\x57\x38\x00\x00\x4e\x39\x00\x00\x45\x3a\x00\x00\x3c\x3b\x00\x00\x33\x3c\x00\x00\x2a\x3d\x00\x00\x21\x3e\x00\x00\x18\x3f\x00\x00\x0f\x40\x00\x00\x06\x41\x00\x00\xfd\x41\x00\x00\xf4\x42\x00\x00\xeb\x43\x00\x00\xe2\x44\x00\x00\xd9\x45\x00\x00\xd0\x46\x00\x00\xc7\x47\x00\x00\xbe\x48\x00\x00\xb5\x49\x00\x00\xac\x4a\x00\x00\xa3\x4b\x00\x00\x9a\x4c\x00\x00\x91\x4d\x00\x00\x88\x4e\x00\x00\x7f\x4f\x00\x00\x76\x50\x00\x00\x6d\x51\x00\x00\x64\x52\x00\x00\x5b\x53\x00\x00\x52\x54\x00\x00\x49\x55\x00\x00\x40\x56\x00\x00\x37\x57\x00\x00\x2e\x58\x00\x00\x25\x59\x00\x00\x1c\x5a\x00\x00\x13\x5b\x00\x00\x0a\x5c\x00\x00\x01\x5d\x00\x00\xf8\x5d\x00\x00\xef\x5e\x00\x00\xe6\x5f\x00\x00\xdd\x60\x00\x00\xd4\x61\x00\x00\xcb\x62\x00\x00\xc2\x63\x00\x00\xb9\x64\x00\x00\xb0\x65\x00\x00\xa7\x66\x00\x00\x9e\x67\x00\x00\x95\x68\x00\x00\x8c\x69\x00\x00\x83\x6a\x00\x00\x7a\x6b\x00\x00\x71\x6c\x00\x00\x68\x6d\x00\x00\x5f\x6e\x00\x00\x56\x6f\x00\x00\x4d\x70\x00\x00\x44\x71\x00\x00\x3b\x72\x00\x00\x32\x73\x00\x00\x29\x74\x00\x00\x20\x75\x00\x00\x17\x76\x00\x00\x0e\x77\x00\x00\x05\x78\x00\x00\xfc\x78\x00\x00\xf3\x79\x00\x00\xea\x7a\x00\x00\xe1\x7b\x00\x00\xd8\x7c\x00\x00\xcf\x7d\x00\x00\xc6\x7e\x00\x00\xbd\x7f\x00\x00\xb4\x80\x00\x00\xab\x81\x00\x00\xa2\x82\x00\x00\x99\x83\x00\x00\x90\x84\x00\x00\x87\x85\x00\x00\x7e\x86\x00\x00\x75\x87\x00\x00\x6c\x88\x00\x00\x63\x89\x00\x00\x5a\x8a\x00\x00\x51\x8b\x00\x00\x48\x8c\x00\x00\x3f\x8d\x00\x00\x36\x8e\x00\x00\x2d\x8f\x00\x00\x24\x90\x00\x00\x1b\x91\x00\x00\x12\x92\x00\x00\x09\x93\x00\x00\x00\x94\x00\x00\xf7\x94\x00\x00\xee\x95\x00\x00\xe5\x96\x00\x00\xdc\x97\x00\x00\xd3\x98\x00\x00\xca\x99\x00\x00\xc1\x9a\x00\x00\xb8\x9b\x00\x00\xaf\x9c\x00\x00\xa6\x9d\x00\x00\x9d\x9e\x00\x00\xec\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x93\x9f\x00\x00\x93\xa0\x00\x00\x93\xa1\x00\x00\x89\xa2\x00\x00\x89\xa3\x00\x00\x7f\xa4\x00\x00\x7f\xa5\x00\x00\x7f\xa6\x00\x00\x7f\xa7\x00\x00\x7f\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x12\x00\x00\xa3\x13\x00\x00\x99\x14\x00\x00\x8f\x15\x00\x00\x7b\x17\x00\x00\x71\x18\x00\x00\x67\x19\x00\x00\x5d\x1a\x00\x00\x53\x1b\x00\x00\x35\x1e\x00\x00\x2f\x20\x00\x00\x26\x21\x00\x00\x1d\x22\x00\x00\x14\x23\x00\x00\x0b\x24\x00\x00\x02\x25\x00\x00\xf9\x25\x00\x00\xe7\x27\x00\x00\xde\x28\x00\x00\xd5\x29\x00\x00\xcc\x2a\x00\x00\xc3\x2b\x00\x00\xba\x2c\x00\x00\xb1\x2d\x00\x00\xa8\x2e\x00\x00\x9f\x2f\x00\x00\x96\x30\x00\x00\x8d\x31\x00\x00\x84\x32\x00\x00\x85\x33\x00\x00\x72\x34\x00\x00\x61\x37\x00\x00\x2b\x3d\x00\x00\xa4\x4b\x00\x00\x41\x56\x00\x00\xf9\x5d\x00\x00\xf0\x5e\x00\x00\xe7\x5f\x00\x00\x60\x6e\x00\x00\x20\x74\x00\x00\x7d\x9f\x00\x00\x73\xa2\x00\x00\x5e\xa9\x00\x00\xba\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe2\xff\xff\xff\xe3\xff\xff\xff\x00\x00\x00\x00\x16\xaa\x00\x00\x72\xaa\x00\x00\xe6\x42\x00\x00\xce\xaa\x00\x00\x2a\xab\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\xab\x00\x00\x85\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe2\xab\x00\x00\x3e\xac\x00\x00\x9a\xac\x00\x00\xf6\xac\x00\x00\x52\xad\x00\x00\xae\xad\x00\x00\x0a\xae\x00\x00\x66\xae\x00\x00\xc2\xae\x00\x00\x1e\xaf\x00\x00\x7a\xaf\x00\x00\xd6\xaf\x00\x00\x32\xb0\x00\x00\x8e\xb0\x00\x00\xea\xb0\x00\x00\x46\xb1\x00\x00\xa2\xb1\x00\x00\x00\xb2\x00\x00\x5e\xb2\x00\x00\xbc\xb2\x00\x00\x1a\xb3\x00\x00\x76\xb3\x00\x00\xd2\xb3\x00\x00\x2e\xb4\x00\x00\x8a\xb4\x00\x00\xe6\xb4\x00\x00\x42\xb5\x00\x00\x9e\xb5\x00\x00\xfa\xb5\x00\x00\x56\xb6\x00\x00\xb2\xb6\x00\x00\x0e\xb7\x00\x00\x6a\xb7\x00\x00\xc6\xb7\x00\x00\x22\xb8\x00\x00\x7e\xb8\x00\x00\xda\xb8\x00\x00\x36\xb9\x00\x00\x92\xb9\x00\x00\xee\xb9\x00\x00\x4a\xba\x00\x00\xa6\xba\x00\x00\x02\xbb\x00\x00\x5e\xbb\x00\x00\xba\xbb\x00\x00\x16\xbc\x00\x00\x72\xbc\x00\x00\xce\xbc\x00\x00\x2a\xbd\x00\x00\x86\xbd\x00\x00\xe2\xbd\x00\x00\x3e\xbe\x00\x00\x9a\xbe\x00\x00\xf6\xbe\x00\x00\x52\xbf\x00\x00\xae\xbf\x00\x00\x0a\xc0\x00\x00\x66\xc0\x00\x00\xc2\xc0\x00\x00\x1e\xc1\x00\x00\x7a\xc1\x00\x00\xd6\xc1\x00\x00\x32\xc2\x00\x00\x8e\xc2\x00\x00\xea\xc2\x00\x00\x46\xc3\x00\x00\xa2\xc3\x00\x00\xfe\xc3\x00\x00\x5a\xc4\x00\x00\xb6\xc4\x00\x00\x12\xc5\x00\x00\x6e\xc5\x00\x00\xca\xc5\x00\x00\x26\xc6\x00\x00\x82\xc6\x00\x00\xde\xc6\x00\x00\x3a\xc7\x00\x00\x96\xc7\x00\x00\xf2\xc7\x00\x00\x4e\xc8\x00\x00\xaa\xc8\x00\x00\x06\xc9\x00\x00\x62\xc9\x00\x00\xbe\xc9\x00\x00\x1a\xca\x00\x00\x76\xca\x00\x00\xd2\xca\x00\x00\x2e\xcb\x00\x00\x8a\xcb\x00\x00\xe6\xcb\x00\x00\x42\xcc\x00\x00\x9e\xcc\x00\x00\xfa\xcc\x00\x00\x56\xcd\x00\x00\xb2\xcd\x00\x00\x0e\xce\x00\x00\x6a\xce\x00\x00\xc6\xce\x00\x00\x22\xcf\x00\x00\x7e\xcf\x00\x00\xda\xcf\x00\x00\x36\xd0\x00\x00\x92\xd0\x00\x00\xee\xd0\x00\x00\x4a\xd1\x00\x00\xa6\xd1\x00\x00\x02\xd2\x00\x00\x5e\xd2\x00\x00\xba\xd2\x00\x00\x16\xd3\x00\x00\x72\xd3\x00\x00\xce\xd3\x00\x00\x2a\xd4\x00\x00\x86\xd4\x00\x00\xe2\xd4\x00\x00\x3e\xd5\x00\x00\x9a\xd5\x00\x00\xf6\xd5\x00\x00\x52\xd6\x00\x00\xae\xd6\x00\x00\x0a\xd7\x00\x00\x66\xd7\x00\x00\xc2\xd7\x00\x00\x1e\xd8\x00\x00\x7a\xd8\x00\x00\xd6\xd8\x00\x00\x32\xd9\x00\x00\x8e\xd9\x00\x00\xea\xd9\x00\x00\x46\xda\x00\x00\xa2\xda\x00\x00\xfe\xda\x00\x00\x5a\xdb\x00\x00\xb6\xdb\x00\x00\x12\xdc\x00\x00\x6e\xdc\x00\x00\xca\xdc\x00\x00\x26\xdd\x00\x00\x82\xdd\x00\x00\xde\xdd\x00\x00\x3a\xde\x00\x00\x96\xde\x00\x00\xf2\xde\x00\x00\x4e\xdf\x00\x00\xaa\xdf\x00\x00\x06\xe0\x00\x00\x62\xe0\x00\x00\xbe\xe0\x00\x00\x1a\xe1\x00\x00\x76\xe1\x00\x00\xd2\xe1\x00\x00\x2e\xe2\x00\x00\x8a\xe2\x00\x00\xe6\xe2\x00\x00\x42\xe3\x00\x00\x9e\xe3\x00\x00\xfa\xe3\x00\x00\x56\xe4\x00\x00\xb2\xe4\x00\x00\x0e\xe5\x00\x00\x6a\xe5\x00\x00\xc6\xe5\x00\x00\x22\xe6\x00\x00\x7e\xe6\x00\x00\xda\xe6\x00\x00\x36\xe7\x00\x00\x92\xe7\x00\x00\xee\xe7\x00\x00\x4a\xe8\x00\x00\xa6\xe8\x00\x00\x02\xe9\x00\x00\x5e\xe9\x00\x00\xba\xe9\x00\x00\x16\xea\x00\x00\x72\xea\x00\x00\xce\xea\x00\x00\x2a\xeb\x00\x00\x86\xeb\x00\x00\xe2\xeb\x00\x00\x3e\xec\x00\x00\x9a\xec\x00\x00\xf6\xec\x00\x00\x52\xed\x00\x00\xae\xed\x00\x00\x0a\xee\x00\x00\x66\xee\x00\x00\xc2\xee\x00\x00\x1e\xef\x00\x00\x7a\xef\x00\x00\xd6\xef\x00\x00\x32\xf0\x00\x00\x8e\xf0\x00\x00\xea\xf0\x00\x00\x46\xf1\x00\x00\xa2\xf1\x00\x00\xfe\xf1\x00\x00\x5a\xf2\x00\x00\xb6\xf2\x00\x00"#
@@ -255,7 +256,7 @@ alex_action_105 = identifier
{-# LINE 1 "<built-in>" #-}
{-# LINE 1 "<command-line>" #-}
{-# LINE 9 "<command-line>" #-}
-{-# LINE 1 "/usr/local/stow/ghc-7.10.2/lib/ghc-7.10.2/include/ghcversion.h" #-}
+{-# LINE 1 "/usr/local/stow/ghc-7.10.3/lib/ghc-7.10.3/include/ghcversion.h" #-}
@@ -330,8 +331,8 @@ alexIndexInt32OffAddr (AlexA# arr) off =
narrow32Int# i
where
i = word2Int# ((b3 `uncheckedShiftL#` 24#) `or#`
- (b2 `uncheckedShiftL#` 16#) `or#`
- (b1 `uncheckedShiftL#` 8#) `or#` b0)
+ (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#)))
@@ -371,30 +372,30 @@ alexScan 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 ->
+ (AlexNone, input') ->
+ case alexGetByte input of
+ Nothing ->
- AlexEOF
- Just _ ->
+ AlexEOF
+ Just _ ->
- AlexError input'
+ AlexError input'
- (AlexLastSkip input'' len, _) ->
+ (AlexLastSkip input'' len, _) ->
- AlexSkip input'' len
+ AlexSkip input'' len
- (AlexLastAcc k input''' len, _) ->
+ (AlexLastAcc k input''' len, _) ->
- AlexToken input''' len k
+ AlexToken input''' len k
-- Push the input through the DFA, remembering the most recent accepting
@@ -403,7 +404,7 @@ alexScanUser user input (I# (sc))
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))))
+ new_acc = (check_accs (alex_accept `quickIndex` (I# (s))))
in
new_acc `seq`
case alexGetByte input of
@@ -417,34 +418,34 @@ alex_scan_tkn user orig_input len input s last_acc =
base = alexIndexInt32OffAddr alex_base s
offset = (base +# ord_c)
check = alexIndexInt16OffAddr alex_check offset
-
+
new_s = if GTE(offset,0#) && EQ(check,ord_c)
- then alexIndexInt16OffAddr alex_table offset
- else alexIndexInt16OffAddr alex_deflt s
- in
+ 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)
+ -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
+ new_input new_s new_acc
}
where
- check_accs (AlexAccNone) = last_acc
- check_accs (AlexAcc a ) = AlexLastAcc a input (I# (len))
- check_accs (AlexAccSkip) = AlexLastSkip input (I# (len))
-
- check_accs (AlexAccPred a predx rest)
- | predx user orig_input (I# (len)) input
- = AlexLastAcc a input (I# (len))
- | otherwise
- = check_accs rest
- check_accs (AlexAccSkipPred predx rest)
- | predx user orig_input (I# (len)) input
- = AlexLastSkip input (I# (len))
- | otherwise
- = check_accs rest
+ check_accs (AlexAccNone) = last_acc
+ check_accs (AlexAcc a ) = AlexLastAcc a input (I# (len))
+ check_accs (AlexAccSkip) = AlexLastSkip input (I# (len))
+
+ check_accs (AlexAccPred a predx rest)
+ | predx user orig_input (I# (len)) input
+ = AlexLastAcc a input (I# (len))
+ | otherwise
+ = check_accs rest
+ check_accs (AlexAccSkipPred predx rest)
+ | predx user orig_input (I# (len)) input
+ = AlexLastSkip input (I# (len))
+ | otherwise
+ = check_accs rest
data AlexLastAcc a
@@ -453,9 +454,9 @@ data AlexLastAcc a
| AlexLastSkip !AlexInput !Int
instance Functor AlexLastAcc where
- fmap f AlexNone = AlexNone
+ fmap _ AlexNone = AlexNone
fmap f (AlexLastAcc x y z) = AlexLastAcc (f x) y z
- fmap f (AlexLastSkip x y) = AlexLastSkip x y
+ fmap _ (AlexLastSkip x y) = AlexLastSkip x y
data AlexAcc a user
= AlexAccNone
@@ -484,12 +485,8 @@ alexPrevCharIsOneOf arr _ input _ _ = arr ! alexInputPrevChar input
--alexRightContext :: Int -> AlexAccPred _
alexRightContext (I# (sc)) user _ _ input =
case alex_scan_tkn user input 0# input sc AlexNone of
- (AlexNone, _) -> False
- _ -> True
- -- TODO: there's no need to find the longest
- -- match when checking the right context, just
- -- the first match will do.
-
-
--- used by wrappers
-iUnbox (I# (i)) = i
+ (AlexNone, _) -> False
+ _ -> True
+ -- TODO: there's no need to find the longest
+ -- match when checking the right context, just
+ -- the first match will do.
diff --git a/dist/build/Agda/Syntax/Parser/Parser.hs b/dist/build/Agda/Syntax/Parser/Parser.hs
index d71bd05..1df463b 100644
--- a/dist/build/Agda/Syntax/Parser/Parser.hs
+++ b/dist/build/Agda/Syntax/Parser/Parser.hs
@@ -915,19 +915,19 @@ happyOutTok x = Happy_GHC_Exts.unsafeCoerce# x
happyActOffsets :: HappyAddr
-happyActOffsets = HappyA# "\x00\x00\xfc\x09\xee\x05\x20\x04\x00\x00\xd2\x04\x00\x00\x00\x00\xe7\x05\x00\x00\x00\x00\xe7\x05\x79\x04\xf4\x05\x00\x00\xdd\x05\xf5\x05\x00\x00\x00\x00\x00\x00\x00\x00\x9b\x02\x00\x00\x00\x00\x87\x08\xfc\x09\xef\x05\x00\x00\xb6\x02\xde\x05\x83\x0b\x00\x00\x00\x00\x9a\x0f\xdb\x05\xdb\x05\x00\x00\x00\x00\x5b\x0b\x00\x00\x00\x00\xe6\x02\x38\x0b\x00\x00\x00\x00\x5a\x0b\x65\x06\x25\x06\x4c\x08\x00\x00\xd4\x05\xe9\x05\x00\x00\xd9\x05\x1f\x02\xd8\x05\x00\x00\x00\x00\xef\x00\xef\x00\x00\x00\xd3\x05\xd5\x05\xd6\x05\x31\x01\xcd\x05\x06\x06\xc8\x05\xbe\x05\x20\x04\x00\x00\x00\x00\x00\x00\x8a\x0f\xfc\x09\x00\x00\xc6\x05\x00\x00\x37\x0b\x87\x0f\x39\x04\xd3\x00\x00\x00\x1b\x08\xdd\x07\xc1\x09\x00\x00\x10\x0b\xac\x07\x25\x06\x71\x07\x2d\x0a\x2d\x0a\x2d\x0a\xc4\x05\x10\x0b\x40\x07\x25\x06\x05\x07\x09\x06\x08\x06\x0f\x0b\x90\x09\xc3\x05\x0f\x0b\x00\x00\x5f\x09\x2d\x0a\x2d\x0a\xb9\x05\xb1\x05\xff\x05\x74\x05\x00\x00\xb7\x02\x2d\x0a\x2d\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x24\x09\x2d\x0a\x24\x09\x10\x0b\xfb\x05\xb6\x05\x2c\x04\x3c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x05\xa9\x05\x82\x00\xd0\x00\xa3\x05\xa3\x05\xed\x0a\xa6\x05\x88\x02\x88\x02\x88\x02\x9b\x05\x9b\x05\x9b\x05\x9b\x05\x98\x05\x98\x05\x98\x05\x8c\x05\xcd\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x99\x05\xe4\xff\x97\x05\x8b\x05\x94\x05\x8a\x05\x93\x05\x83\x05\x82\x05\x88\x05\x81\x05\x81\x05\x81\x05\x81\x05\x81\x05\x81\x05\x81\x05\xce\x05\xc5\x0a\x8f\x05\xec\x0a\x7f\x01\x00\x00\x00\x00\x00\x00\x00\x00\xff\x00\x00\x00\x00\x00\xff\x00\xff\x00\x00\x00\xca\x03\xc4\x0a\xa1\x0a\xa1\x0a\xa1\x0a\xa1\x0a\x00\x00\xa2\x0a\x7f\x05\x00\x00\x7f\x05\x00\x00\x00\x00\x00\x00\x74\x05\x00\x00\x00\x00\xd6\x00\x24\x09\x24\x09\xcc\x05\x2d\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2d\x0a\x2d\x0a\x2d\x0a\x2d\x0a\x10\x00\x24\x09\x8e\x05\x80\x05\x00\x00\x8d\x05\x65\x05\x7e\x05\x62\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x09\x24\x09\x2d\x0a\x7c\x05\xef\x00\x7d\x05\x72\x05\xef\x00\x7b\x05\x30\x01\x79\x05\x00\x00\xe2\x00\x3d\x01\x77\x05\x76\x05\x70\x05\x00\x00\x2d\x0a\x2d\x0a\x00\x00\x2d\x0a\x2d\x0a\x79\x0a\x6f\x05\x79\x0a\xd4\x06\x96\x06\xe9\x08\x00\x00\x00\x00\x6b\x05\x35\x00\x00\x00\x12\x04\x00\x00\x00\x00\xb8\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x08\x00\x00\x00\x00\x7a\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\x62\x01\x66\x00\x62\x01\x2d\x0a\x00\x00\x2d\x0a\xb8\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x64\x05\x5b\x05\x00\x00\xb8\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x08\x00\x00\x00\x00\x00\x00\x57\x05\xde\x00\x00\x00\x50\x05\x62\x05\x00\x00\x3d\x00\x56\x0a\x7a\x0a\x0d\x03\xe5\x05\x56\x0a\xa0\x05\x56\x0a\x1d\x00\xb9\x00\x9f\x00\x9a\x00\x2d\x0a\x00\x00\xca\x03\x60\x05\x00\x00\x3d\x00\x34\x01\x5e\x01\xd5\xff\xd5\xff\xf2\xff\x00\x00\x00\x00\x00\x00\x29\x03\x00\x00\x00\x00\x00\x00\x5a\x05\xed\xff\xed\xff\x00\x00\x00\x00\x5d\x05\xb8\x08\x52\x05\x96\x05\x4b\x05\x00\x00\x47\x05\x47\x05\x47\x05\x46\x05\x45\x05\x42\x05\x44\x05\x00\x00\x00\x00\x00\x00\x00\x00\x43\x05\x00\x00\x35\x05\x34\x05\x30\x05\x30\x05\x2d\x05\x27\x05\x00\x00\x00\x00\x25\x05\x23\x05\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x05\x1e\x05\x00\x00\x16\x05\x1c\x05\x18\x05\x17\x05\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x08\x1a\x05\x24\x05\x11\x05\x10\x05\x19\x05\x05\x05\x00\x00\x05\x05\x00\x00\xd5\xff\x0c\x05\x04\x05\x60\x00\x00\x00\x04\x05\x04\x05\x04\x05\x04\x05\x00\x00\xca\x03\xb8\x08\x00\x00\x48\x00\x08\x05\xb8\x08\x07\x05\xb8\x08\x07\x05\xb8\x08\x06\x05\x12\x04\x00\x00\x06\x05\x00\x00\x60\x00\x00\x00\x00\x00\x0d\x03\x00\x00\x00\x00\x0b\x05\x0a\x05\x09\x05\x00\x00\x00\x00\x0f\x05\x00\x00\xfc\x04\xb8\x08\x00\x00\x4d\x05\x4c\x05\x00\x00\x00\x00\x26\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0d\x03\x00\x00\x00\x00\xfe\x04\xfe\x04\x00\x00\x00\x00\x12\x04\x90\x00\x2d\x00\x2d\x00\x00\x00\x0d\x03\x00\x00\x57\x0a\x0d\x03\x00\x00\x4a\x05\x00\x00\x00\x00\x0a\x00\x3c\x05\x00\x00\x3b\x05\x00\x00\xcd\x03\x00\x00\x00\x00\xe9\x04\x60\x00\xe7\x04\x60\x00\xca\x03\xca\x03\x00\x00\xe2\x04\x00\x00\xef\x04\xed\xff\x00\x00\xee\x04\xed\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7c\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe4\x04\x00\x00\xda\x04\xe1\x04\xd8\x04\x00\x00\x00\x00\x00\x00\xca\x03\xca\x03\xca\x03\xca\x03\x00\x00\x3d\x00\x3d\x00\x10\x00\x74\x04\x00\x00\x00\x00\xdc\x04\x7d\x04\x00\x00\x7d\x04\x00\x00\x00\x00\xa5\x05\x00\x00\x00\x00\x83\x04\x80\x04\x00\x00\x73\x04\x77\x04\x71\x04\x76\x04\x7e\x04\xaf\x04\x00\x00\x00\x00\x0d\x03\x00\x00\x00\x00\x00\x00\x63\x04\x63\x04\xac\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2d\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2a\x05\x00\x00\x74\x05\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x04\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x3d\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x74\x05\x00\x00\x10\x00\x00\x00\x00\x00"#
+happyActOffsets = HappyA# "\x00\x00\xdf\x09\xa6\x06\x0a\x04\x00\x00\xd4\x04\x00\x00\x00\x00\x98\x06\x00\x00\x00\x00\x98\x06\x7b\x04\x9d\x06\x00\x00\x96\x06\xa7\x06\x00\x00\x00\x00\x00\x00\x00\x00\xfb\x01\x00\x00\x00\x00\x92\x08\xdf\x09\xa2\x06\x00\x00\x0f\x04\x6b\x0f\x92\x06\x00\x00\x00\x00\x8c\x06\x8c\x06\x00\x00\xfa\x0a\x00\x00\xe3\x0a\x00\x00\x00\x00\x50\x02\xa4\x0a\x00\x00\x00\x00\x68\x0f\x86\x06\x45\x06\x79\x08\x00\x00\x7e\x06\x97\x06\x00\x00\x91\x06\xc9\x01\x8e\x06\x00\x00\x00\x00\x44\x02\x44\x02\x00\x00\x89\x06\x94\x06\x8a\x06\x59\x01\x88\x06\xc5\x06\x84\x06\x7c\x06\x0a\x04\x00\x00\x00\x00\x00\x00\x16\x05\xdf\x09\x00\x00\x83\x06\x00\x00\xe2\x0a\x65\x04\x3a\x03\xc2\x02\x00\x00\x3a\x08\xf9\x07\x9e\x09\x00\x00\x8d\x0a\xe0\x07\x45\x06\x9f\x07\xf8\x09\xf8\x09\xf8\x09\x7f\x06\x8d\x0a\x60\x07\x45\x06\x1f\x07\x79\x06\x6e\x06\xb5\x06\xb4\x06\xae\x06\x84\x05\xc7\x0a\x85\x09\x70\x06\xc7\x0a\x00\x00\x46\x09\xf8\x09\xf8\x09\x00\x00\x18\x02\xf8\x09\xf8\x09\x00\x00\x00\x00\x00\x00\x00\x00\x2d\x09\xf8\x09\x2d\x09\x8d\x0a\x95\x06\x68\x06\x64\x04\x3c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x64\x06\x5e\x06\x5e\x06\x62\x06\x5e\x01\x5e\x01\x5e\x01\x60\x06\x5b\x00\x60\x06\xb2\x00\x59\x06\x5d\x06\x5a\x06\x58\x06\x4e\x0a\x57\x06\x57\x06\x53\x06\x97\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xda\xff\x48\x06\x48\x06\x48\x06\x48\x06\x48\x06\x48\x06\x48\x06\x41\x06\x43\x06\x3e\x06\x3c\x06\x3a\x06\x34\x06\x2c\x06\x2c\x06\x2e\x06\x61\x06\x37\x0a\x38\x06\x7f\x01\x8c\x0a\x00\x00\x00\x00\x25\x06\x00\x00\x71\x0a\x3b\x03\x25\x06\x00\x00\x36\x0a\x36\x0a\x00\x00\x00\x00\xff\x00\x00\x00\x00\x00\xff\x00\xff\x00\x00\x00\xc7\x03\x36\x0a\x36\x0a\x00\x00\x00\x00\x00\x00\x84\x05\x00\x00\x00\x00\x0f\x00\x2d\x09\x2d\x09\x50\x06\xf8\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x09\xf8\x09\xf8\x09\xf8\x09\x22\x06\x31\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x2d\x09\x2d\x09\x2d\x09\x2d\x06\x1a\x06\x00\x00\x26\x06\x03\x06\xf8\x09\x0c\x06\x44\x02\x0b\x06\x08\x06\x44\x02\xff\x05\x30\x01\x0e\x06\x00\x00\xe2\x00\xd3\x00\x09\x06\x07\x06\xfb\x05\x00\x00\xf8\x09\xf8\x09\x00\x00\xf8\x09\xf8\x09\x1b\x0a\xfa\x05\x1b\x0a\xe0\x06\x9f\x06\xec\x08\x00\x00\x00\x00\xf4\x05\xfa\xff\x00\x00\x02\x04\x00\x00\x00\x00\xd3\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd3\x08\x00\x00\x00\x00\xc3\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x66\x00\x31\x01\x4e\x00\x31\x01\xf8\x09\x00\x00\xf8\x09\xd3\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xea\x05\xe3\x05\x00\x00\xd3\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd3\x08\x00\x00\x00\x00\x00\x00\xd2\x00\xe0\x05\x00\x00\x2d\x08\xb9\x00\x2d\x08\xa3\x00\x00\x00\xc7\x03\xe6\x05\x00\x00\x3d\x00\x7e\x01\x07\x01\xd5\xff\xd5\xff\xd1\x00\x00\x00\x00\x00\x00\x00\xfe\x05\xeb\xff\x2d\x08\xc3\x02\x1b\x00\x04\x06\x00\x00\xd7\x05\xc2\x05\xd4\x05\x00\x00\x3d\x00\x69\x00\xf8\x09\x4a\x02\x00\x00\x00\x00\x00\x00\xce\x05\xb5\x00\xb5\x00\x00\x00\xd3\x08\xca\x05\xaf\x05\x00\x00\xba\x05\x00\x00\xb8\x05\xb5\x05\xad\x05\x00\x00\x00\x00\xb1\x05\x00\x00\x00\x00\xac\x05\xab\x05\xa3\x05\xa3\x05\x9f\x05\x9e\x05\x90\x05\x8e\x05\x8b\x05\x8b\x05\x82\x05\x81\x05\x80\x05\x7a\x05\x7b\x05\x79\x05\x00\x00\x78\x05\x6f\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x72\x05\x7d\x05\x69\x05\x6b\x05\x71\x05\x57\x05\x00\x00\x57\x05\x1d\x00\x5b\x05\xd3\x08\x00\x00\x4f\x05\xd3\x08\x00\x00\xd3\x08\xef\x00\x00\x00\x00\x00\x1b\x00\x00\x00\x00\x00\x59\x05\x00\x00\x53\x05\x44\x05\x00\x00\x4a\x05\x3c\x05\x02\x04\x3c\x05\x00\x00\xd5\xff\x39\x05\x2e\x05\xef\x00\x00\x00\x2e\x05\x2e\x05\x2e\x05\x2e\x05\x00\x00\xc7\x03\xd3\x08\x00\x00\x30\x05\xd3\x08\x00\x00\x30\x05\xd3\x08\x00\x00\x00\x00\x00\x00\x23\x04\x56\x05\x55\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1b\x00\x00\x00\x29\x05\x29\x05\x00\x00\x4d\x05\x00\x00\x00\x00\x0a\x00\x47\x05\x00\x00\x00\x00\x00\x00\x28\x05\xef\x00\x25\x05\xef\x00\xc7\x03\xc7\x03\x00\x00\x00\x00\x4b\x02\x1b\x00\x00\x00\x02\x04\xf2\xff\xf8\xff\xf2\xff\x00\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x41\x05\x00\x00\xca\x03\x19\x05\x00\x00\x22\x05\xb5\x00\x00\x00\x20\x05\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x05\x00\x00\x00\x00\x00\x00\x00\x00\x14\x05\x00\x00\x0c\x05\x0e\x05\x04\x05\x00\x00\x00\x00\x3d\x00\x3d\x00\x10\x00\x00\x00\x03\x05\x00\x00\x07\x05\x00\x00\x00\x00\x12\x05\x00\x05\x00\x00\xf0\x04\xf0\x04\xeb\x04\xf4\x04\x10\x05\x00\x00\x00\x00\x87\x04\x1b\x00\x00\x00\x00\x00\xc3\x05\x00\x00\x00\x00\xc7\x03\xc7\x03\xc7\x03\xc7\x03\x7d\x04\x00\x00\x7d\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xef\x00\x00\x00\x00\x00\x7a\x04\x7a\x04\xb5\x04\x00\x00\x00\x00\x00\x00\x00\x00\xf2\xff\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x05\x00\x00\x84\x05\x78\x04\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x3d\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x05\x00\x00\x10\x00\x00\x00\x00\x00"#
happyGotoOffsets :: HappyAddr
-happyGotoOffsets = HappyA# "\x4a\x04\x9b\x0f\xb3\x04\xeb\x02\xb4\x04\xa9\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x06\x7f\x0f\x00\x00\x00\x00\x08\x04\x24\x04\xa5\x01\x00\x00\x00\x00\xe3\x01\xa0\x04\x84\x04\x00\x00\x00\x00\x4d\x03\x00\x00\x00\x00\x00\x00\x2b\x04\x00\x00\x00\x00\x70\x01\x0f\x01\xff\x0b\x39\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x04\x7b\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfc\x03\x06\x02\x00\x00\x00\x00\x00\x00\x2a\x04\x63\x0f\x00\x00\x00\x00\x00\x00\x4c\x03\x00\x00\x81\x00\x03\x00\x00\x00\x84\x01\x5c\x0c\xc1\x0b\x00\x00\x2b\x04\x47\x07\xdc\x0b\x1c\x0c\xd8\x06\x34\x0d\x17\x0d\x00\x00\xef\x02\x47\x0f\x4f\x0d\x2b\x0f\x00\x00\x00\x00\x1f\x04\x0f\x0f\x00\x00\xc6\x03\x00\x00\x84\x01\x10\x0d\xf3\x0c\x00\x00\x1a\x00\x00\x00\x48\x03\x00\x00\x00\x00\xec\x0c\xcf\x0c\x00\x00\x00\x00\x00\x00\x00\x00\xf3\x0e\x60\x02\xd7\x0e\x87\x03\x3a\x04\x00\x00\x25\x04\x72\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe4\x03\xe8\x03\x06\x02\x1c\x00\x5c\x04\x4d\x04\xfa\x00\xb6\x03\x23\x04\x1c\x04\x19\x04\x92\x03\x8d\x03\x8b\x03\x88\x03\x03\x04\xf7\x03\xf4\x03\xb5\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x91\x03\x00\x00\x94\x03\x00\x00\x00\x00\x82\x03\x00\x00\x00\x00\x00\x00\x7b\x03\x78\x03\x70\x03\x58\x03\x49\x03\x45\x03\x3b\x03\x1f\x03\xed\x02\x7e\x02\x00\x00\x7b\x00\x45\x04\x00\x00\x00\x00\x00\x00\x00\x00\x3b\x02\x00\x00\x00\x00\xe4\x01\xbf\x01\x00\x00\x18\x00\x4a\x03\x28\x03\xd5\x02\xd2\x02\xb0\x02\x00\x00\x9d\x00\x2a\x03\x00\x00\x1e\x00\x00\x00\x00\x00\x00\x00\xd0\x02\x00\x00\x00\x00\xda\x02\xbb\x0e\x9f\x0e\xe8\x02\x25\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x02\xf3\x05\xc8\x0c\xab\x0c\x19\x03\x83\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x0d\x00\x00\x00\x11\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x67\x0e\x4b\x0e\xe8\x01\x00\x00\x0b\x03\x00\x00\x00\x00\xf2\x02\x00\x00\x00\x00\x00\x00\x00\x00\x02\x03\xf3\x02\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x0c\x87\x0c\x00\x00\x80\x0c\x63\x0c\x5f\x02\x00\x00\x5c\x02\x84\x01\xa3\x0b\x69\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xea\x01\x00\x00\x00\x00\x2f\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x0e\x00\x00\x00\x00\x98\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xec\x02\x00\x00\xdf\x02\x70\x06\x00\x00\x30\x06\xf7\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\x08\x00\x00\x00\xdb\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbf\x0d\x00\x00\x00\x00\x00\x00\xa1\x03\x19\x00\x00\x00\x13\x04\x00\x00\x00\x00\x09\x04\x5a\x02\x95\x00\x67\x04\x4f\x0d\x09\x02\x00\x00\xe7\x01\x00\x00\x00\x00\x00\x00\x00\x00\x64\x09\x00\x00\xaf\x02\x00\x00\x00\x00\xd5\x03\x00\x00\xdc\x02\x83\x02\x3c\x02\xa0\x00\x00\x00\x00\x00\x00\x00\x41\x02\x00\x00\x00\x00\x00\x00\x00\x00\x74\x03\x6c\x03\x00\x00\x00\x00\x00\x00\xa3\x0d\x96\x02\x79\x02\x00\x00\x00\x00\x95\x02\x86\x02\x84\x02\x00\x00\x4f\x02\x4e\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2a\x02\x26\x02\x00\x00\x15\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x87\x0d\x00\x00\x00\x00\xb8\x01\x00\x00\x00\x00\x89\x01\x00\x00\xad\xff\x00\x00\x8f\x01\x00\x00\xcc\x01\xc1\x01\x00\x00\xab\x03\xa7\x03\xa2\x03\x4f\x03\x00\x00\xb8\x00\x6b\x0d\x00\x00\x00\x00\x44\x01\x03\x0a\x92\x01\x2b\x09\x8b\x01\x8e\x08\x06\x03\x20\x00\x00\x00\xf7\x02\x00\x00\xab\x01\x00\x00\x00\x00\x8e\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfa\xff\xb3\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x78\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x62\x04\x00\x00\x00\x00\xf1\x02\x8b\x02\x00\x00\x00\x00\xff\xff\x55\x01\x0d\x01\xd7\x00\x00\x00\x15\x04\x00\x00\x3b\x00\xbc\x03\x00\x00\x00\x00\x00\x00\x00\x00\xfd\xff\x00\x00\x00\x00\x00\x00\x00\x00\xfc\xff\x00\x00\x00\x00\x00\x00\xa0\x01\x00\x00\x1c\x01\xae\x02\x8d\x02\x00\x00\x32\x01\x00\x00\x00\x00\xd8\x02\x00\x00\x00\x00\xa2\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x01\x00\x00\x0e\x01\x00\x00\x00\x00\x00\x00\x7c\x02\x20\x02\xa2\x00\x2c\x00\x00\x00\xbf\x02\x6c\x02\x1b\x01\xfe\x00\x00\x00\x00\x00\x57\x00\xd4\x00\x00\x00\x85\x00\x00\x00\x00\x00\x4f\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x00\x00\x00\xf1\x00\x00\x00\x00\x00\x00\x00\xdd\x00\x00\x00\xb7\x03\x00\x00\x00\x00\x00\x00\xc2\x00\x84\x00\x51\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x68\x01\x00\x00\x58\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3e\x00\x4d\x01\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x01\x00\x00\x0e\x00\x00\x00\x00\x00"#
+happyGotoOffsets = HappyA# "\x52\x04\x7c\x0f\xc1\x04\x41\x04\xc0\x04\xbc\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x52\x03\x60\x0f\x00\x00\x00\x00\xe3\x03\x03\x00\x35\x04\x00\x00\x00\x00\xaf\x04\xae\x04\x00\x00\xa5\x01\x00\x00\xf0\x06\x00\x00\x00\x00\x00\x00\xa4\x05\x00\x00\x00\x00\x70\x01\x0f\x01\x98\x0b\xd2\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaa\x04\xa9\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2a\x04\x39\x02\x00\x00\x00\x00\x00\x00\x43\x05\x44\x0f\x00\x00\x00\x00\x00\x00\x4b\x04\x00\x00\x17\x01\xf5\x00\x00\x00\x84\x01\x77\x07\x38\x0b\x00\x00\xa4\x05\x53\x0b\x75\x0b\xb5\x0b\xf7\x06\xc1\x0c\xa4\x0c\x00\x00\x5c\x06\x28\x0f\xdc\x0c\x0c\x0f\x00\x00\xb3\x00\x00\x00\x00\x00\x00\x00\x48\x03\x92\x04\xf0\x0e\x00\x00\x3a\x04\x00\x00\x84\x01\x9d\x0c\x80\x0c\x00\x00\x00\x00\x79\x0c\x5c\x0c\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x0e\xda\x02\xb8\x0e\x73\x01\x68\x04\x00\x00\x5c\x04\xa2\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x12\x04\x8b\x04\x7c\x04\xfc\x03\x6f\x04\x66\x04\x5a\x04\xe4\x03\x1c\x00\xdd\x03\x39\x02\x51\x04\xc5\x03\xc1\x03\xa5\x03\xfa\x00\x22\x04\x1e\x04\xf6\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x04\x05\x04\xfe\x03\xf9\x03\xf0\x03\xe7\x03\xbb\x03\x00\x00\x00\x00\xb1\x03\x00\x00\x00\x00\x97\x03\x8e\x03\x7d\x03\x00\x00\x4c\x03\x1b\x06\x00\x00\xb1\x02\x7e\x05\x00\x00\x00\x00\x1e\x00\x00\x00\x7b\x00\x9d\x00\x81\x03\x00\x00\x26\x05\x75\x04\x00\x00\x00\x00\xe4\x01\x00\x00\x00\x00\xbf\x01\x86\x01\x00\x00\x18\x00\x71\x03\xf9\x02\x00\x00\x00\x00\x00\x00\xd0\x02\x00\x00\x00\x00\x38\x03\x9c\x0e\x80\x0e\x3c\x03\x62\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x02\xda\x05\x55\x0c\x38\x0c\x00\x00\x6e\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x69\x03\x64\x0e\x48\x0e\x2c\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x89\x00\xe8\x01\x00\x00\x57\x03\x00\x00\x00\x00\x54\x03\x00\x00\x00\x00\x00\x00\x00\x00\x50\x03\x4e\x03\x00\x00\x00\x00\x00\x00\x00\x00\x31\x0c\x14\x0c\x00\x00\x0d\x0c\x51\x08\x1d\x04\x00\x00\xe1\x03\x84\x01\x36\x07\xb6\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xea\x01\x00\x00\x00\x00\x10\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf4\x0d\x00\x00\x00\x00\x98\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x47\x03\x00\x00\x11\x03\x55\x06\x00\x00\x14\x06\xd8\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0d\x00\x00\x00\xbc\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x0d\x00\x00\x00\x00\x00\x00\x19\x00\x76\x03\x00\x00\x81\x02\x00\x00\xe7\x01\x00\x00\x00\x00\x5d\x04\x00\x00\x00\x00\xaf\x03\x00\x00\x26\x03\x2c\x03\xf8\x02\x79\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe3\x01\x95\x00\xf1\x05\xdc\x0c\x00\x00\x00\x00\xa7\x03\x00\x00\x00\x00\xa6\x03\x00\x00\xef\x0b\x29\x03\x00\x00\x00\x00\x00\x00\x00\x00\x18\x03\x13\x03\x00\x00\x84\x0d\xc5\x02\xd7\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf3\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x02\xd1\x02\xc7\x02\xc6\x02\x00\x00\xc4\x02\x9e\x02\x8d\x02\x00\x00\x00\x00\x00\x00\x8e\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\x36\x02\x00\x00\x00\x00\x08\x02\x00\x00\xb2\x01\x00\x00\xf6\x01\x68\x0d\x00\x00\x35\x00\x4c\x0d\x00\x00\x30\x0d\x64\x02\x00\x00\x00\x00\x31\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe4\x02\x20\x00\xd5\x02\x00\x00\xb4\x02\x00\x00\x22\x02\x34\x02\x00\x00\x33\x03\x2a\x03\xf6\x02\xeb\x02\x00\x00\xb8\x00\x14\x0d\x00\x00\xed\x01\xf8\x0c\x00\x00\x98\x01\xda\x03\x00\x00\x00\x00\x00\x00\x78\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x05\x00\x00\x5d\x02\x3c\x02\x00\x00\x00\x00\x00\x00\x00\x00\xfd\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x02\x00\x00\xca\x01\xe5\x03\x80\x02\x00\x00\x00\x00\x3b\x00\xb0\x05\x00\x00\xff\xff\xd7\x00\x51\x01\x99\x00\x00\x00\x7f\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfc\xff\xbc\x01\x00\x00\x00\x00\x57\x02\x00\x00\x00\x00\x46\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\xaa\x01\x00\x00\x89\x01\x00\x00\x00\x00\x82\x02\x47\x02\x96\x01\x00\x00\x50\x01\x00\x00\x06\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x01\x2a\x01\x00\x00\x00\x00\x00\x00\x1a\x01\x00\x00\x00\x00\x74\x05\x00\x00\x00\x00\xdc\x0c\x00\x00\x00\x00\x37\x02\x20\x02\x07\x02\xa3\x01\xf3\x00\x00\x00\x8c\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf6\x00\x00\x00\x00\x00\xf1\x00\x37\x00\x10\x01\x00\x00\x00\x00\x00\x00\x00\x00\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x68\x01\x00\x00\x58\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\x30\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x01\x00\x00\x88\x00\x00\x00\x00\x00"#
happyDefActions :: HappyAddr
-happyDefActions = HappyA# "\xf9\xff\x00\x00\x00\x00\x00\x00\x00\x00\xfb\xff\x7e\xff\x7d\xff\x00\x00\x96\xff\x7f\xff\x00\x00\xa3\xfe\x7e\xff\x58\xff\x00\x00\x6d\xff\x6c\xff\x6a\xff\x69\xff\x66\xff\x00\x00\x46\xff\x45\xff\x63\xff\x00\x00\x00\x00\x3e\xff\x3c\xff\x00\x00\x00\x00\x54\xff\x53\xff\x00\x00\x00\x00\x00\x00\x52\xff\x51\xff\x00\x00\x50\xff\x4f\xff\x00\x00\x00\x00\x55\xff\x56\xff\x00\x00\xa3\xfe\x00\x00\x00\x00\x57\xff\x00\x00\x00\x00\x78\xff\x00\x00\x77\xff\x00\x00\x59\xff\x4b\xff\x00\x00\x00\x00\x93\xff\x00\x00\x00\x00\x00\x00\x76\xff\x00\x00\x00\x00\x00\x00\x00\x00\xa4\xfe\x4c\xff\x7c\xff\x0e\xff\x22\xff\x00\x00\x5d\xff\x00\x00\x2d\xff\x2a\xff\x23\xff\x00\x00\x00\x00\x7b\xff\xa3\xfe\x00\x00\x00\x00\x49\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\xff\x5c\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\xff\x00\x00\x00\x00\x14\xff\x0f\xff\xa3\xfe\x00\x00\x00\x00\x00\x00\x44\xff\x00\x00\xa3\xfe\x3d\xff\x00\x00\x00\x00\x00\x00\x3f\xff\x70\xff\x68\xff\x5b\xff\x00\x00\x00\x00\x00\x00\x00\x00\xea\xfe\x00\x00\xcb\xfe\x5b\xfe\xe3\xfe\xe2\xfe\xe1\xfe\xe0\xfe\xdf\xfe\xde\xfe\xe4\xfe\xdd\xfe\xdc\xfe\xdb\xfe\xda\xfe\xd9\xfe\xd8\xfe\xd1\xfe\xd3\xfe\xd2\xfe\xd7\xfe\xd6\xfe\xd5\xfe\x9f\xff\xd4\xfe\x95\xfe\x84\xfe\x94\xfe\x93\xfe\x92\xfe\x91\xfe\x8f\xfe\x90\xfe\x8e\xfe\x8d\xfe\x8c\xfe\x89\xfe\x86\xfe\x87\xfe\x88\xfe\x85\xfe\x8b\xfe\x8a\xfe\x59\xfe\x96\xfe\x00\x00\x00\x00\xa4\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xee\xfe\x00\x00\xfa\xff\xf8\xff\xf7\xff\xf6\xff\xf5\xff\xf4\xff\xf3\xff\xf2\xff\xf1\xff\xf0\xff\xef\xff\xee\xff\xed\xff\xec\xff\xeb\xff\xea\xff\xe9\xff\xe8\xff\xe7\xff\xe6\xff\xe5\xff\xe4\xff\xe3\xff\xe2\xff\xe1\xff\xe0\xff\xdf\xff\xde\xff\xdd\xff\xdc\xff\xdb\xff\xda\xff\xd9\xff\xd8\xff\xd7\xff\xd6\xff\xd5\xff\xd4\xff\xd3\xff\xcb\xff\xca\xff\xc9\xff\xc8\xff\xc7\xff\xc6\xff\xd2\xff\xd1\xff\xd0\xff\xcf\xff\xce\xff\xcd\xff\xcc\xff\xc5\xff\xc4\xff\xc3\xff\xc2\xff\xc1\xff\xc0\xff\xbf\xff\xbe\xff\xbd\xff\xbc\xff\xbb\xff\xba\xff\xb9\xff\xb8\xff\xb7\xff\xb6\xff\xb5\xff\xb4\xff\xb3\xff\xb2\xff\xb1\xff\xb0\xff\xaf\xff\xae\xff\xad\xff\xac\xff\xab\xff\xaa\xff\xa9\xff\xa8\xff\xa7\xff\xa6\xff\xa5\xff\xa4\xff\xa3\xff\xa2\xff\xa1\xff\x75\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xea\xfe\x00\x00\x00\x00\xb4\xfe\x00\x00\xba\xfe\xbb\xfe\xbc\xfe\xbd\xfe\x00\x00\x97\xff\x98\xff\x00\x00\x00\x00\xbe\xfe\x00\x00\x10\xff\x10\xff\x10\xff\x10\xff\x10\xff\x97\xfe\x9f\xfe\x00\x00\xb8\xfe\x00\x00\xb9\xfe\xa0\xff\x9e\xff\xa3\xfe\x9b\xff\x9a\xff\xe8\xfe\x00\x00\x00\x00\xec\xfe\x00\x00\x4a\xff\x6e\xff\x6b\xff\x6f\xff\x77\xff\x63\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\xff\x42\xff\x44\xff\x78\xff\x00\x00\x76\xff\x16\xff\x17\xff\x65\xff\x15\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1d\xff\x00\x00\x18\xff\x00\x00\x00\x00\x20\xff\x1f\xff\x21\xff\x0d\xff\x00\x00\x00\x00\x0c\xff\x00\x00\x00\x00\x29\xff\x25\xff\x2a\xff\xa3\xfe\x00\x00\x00\x00\x2e\xff\x67\xff\x24\xff\x00\x00\x32\xff\x00\x00\x35\xff\x4d\xff\x00\x00\x92\xff\x34\xff\x4e\xff\x33\xff\x5a\xff\x00\x00\x30\xff\x2f\xff\x9f\xfe\x31\xff\x27\xff\x26\xff\x28\xff\x2c\xff\x2b\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5e\xff\x00\x00\x00\x00\x3b\xff\x39\xff\x3a\xff\x38\xff\x36\xff\x37\xff\x5f\xff\x61\xff\x62\xff\x0a\xff\x0b\xff\x00\x00\x00\x00\x48\xff\x00\x00\x64\xff\x5f\xfe\x9c\xff\x9d\xff\xe9\xfe\xf0\xfe\x00\x00\xcd\xfe\xcc\xfe\xce\xfe\x00\x00\x00\x00\x5c\xfe\x94\xff\x00\x00\x6f\xfe\x00\x00\x10\xff\x9f\xfe\x03\xff\x00\x00\x10\xff\x00\x00\x10\xff\x00\x00\x00\x00\x00\x00\x00\x00\x44\xff\x90\xff\x8c\xff\x00\x00\x6c\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x79\xff\xc1\xfe\xc0\xfe\xbf\xfe\x00\x00\xb0\xfe\xae\xfe\xa9\xfe\x00\x00\x00\x00\x00\x00\xa5\xfe\xb3\xfe\x00\x00\x00\x00\xee\xfe\xec\xfe\x00\x00\x71\xff\x75\xff\x75\xff\x75\xff\x00\x00\x00\x00\x75\xff\x00\x00\x72\xff\x75\xfe\x76\xfe\x77\xfe\x00\x00\x72\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x75\xff\x74\xff\x83\xfe\x00\x00\x00\x00\x80\xfe\x73\xfe\x78\xfe\x74\xfe\x00\x00\x00\x00\x73\xff\x75\xff\x00\x00\x00\x00\x00\x00\x79\xfe\xef\xfe\xed\xfe\xb7\xfe\x00\x00\x00\x00\xa7\xfe\x00\x00\x00\x00\xa7\xfe\x00\x00\xaf\xfe\x00\x00\x7a\xff\x8e\xff\x00\x00\x00\x00\x00\x00\x91\xff\x00\x00\x00\x00\x00\x00\x00\x00\x6e\xfe\x00\x00\x00\x00\x8d\xff\x7e\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x12\xff\x00\x00\x11\xff\x00\x00\xa1\xfe\x05\xff\x03\xff\x01\xff\x00\xff\x00\x00\x00\x00\x00\x00\x02\xff\x9e\xfe\x00\x00\x71\xfe\x00\x00\x00\x00\x95\xff\x00\x00\x00\x00\x5d\xfe\xe7\xfe\x00\x00\xeb\xfe\x40\xff\x41\xff\x47\xff\x1e\xff\x1d\xff\x1c\xff\x1b\xff\x19\xff\x1a\xff\x08\xff\x09\xff\x06\xff\x07\xff\x03\xff\xa2\xfe\x5e\xfe\x00\x00\x00\x00\xd0\xfe\x70\xfe\x00\x00\x99\xff\xf4\xfe\xf4\xfe\x04\xff\x03\xff\x98\xfe\x9f\xfe\x03\xff\x99\xfe\xc6\xfe\x6a\xfe\xc8\xfe\x00\x00\x00\x00\xc7\xfe\xc3\xfe\xc4\xfe\x00\x00\xcf\xfe\x6d\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x8a\xff\x88\xff\x8f\xff\xb6\xfe\xb2\xfe\x00\x00\x00\x00\xac\xfe\x00\x00\x00\x00\xad\xfe\xb5\xfe\x7a\xfe\x7b\xfe\x7d\xfe\x00\x00\x7e\xfe\x7f\xfe\x81\xfe\x82\xfe\x7c\xfe\x00\x00\xa7\xfe\x00\x00\x00\x00\x00\x00\xb1\xfe\x89\xff\x8b\xff\x84\xff\x86\xff\x80\xff\x82\xff\x69\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x61\xfe\x60\xfe\x00\x00\x00\x00\x6b\xfe\x00\x00\x9b\xfe\x9c\xfe\x00\x00\xa0\xfe\xf6\xfe\xf2\xfe\x00\x00\xf3\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xfa\xfe\x00\x00\x99\xff\xfc\xfe\x03\xff\xe6\xfe\xe5\xfe\x9a\xfe\x00\x00\x00\x00\x99\xff\xfd\xfe\xf8\xfe\xfe\xfe\xf5\xfe\xff\xfe\x00\x00\x00\x00\xca\xfe\xc9\xfe\xc5\xfe\xc2\xfe\x66\xfe\x65\xfe\xa3\xfe\x68\xfe\xa3\xfe\x83\xff\x81\xff\x87\xff\x85\xff\x00\x00\xaa\xfe\xa6\xfe\xab\xfe\xa8\xfe\x00\x00\x00\x00\x00\x00\x9d\xfe\xf1\xfe\xfb\xfe\xf9\xfe\xf7\xfe\x62\xfe\x64\xfe\xa3\xfe\x67\xfe\x00\x00\x63\xfe"#
+happyDefActions = HappyA# "\xf9\xff\x00\x00\x00\x00\x00\x00\x00\x00\xfb\xff\x7e\xff\x7d\xff\x00\x00\x96\xff\x7f\xff\x00\x00\xa3\xfe\x7e\xff\x58\xff\x00\x00\x6d\xff\x6c\xff\x6a\xff\x69\xff\x66\xff\x00\x00\x46\xff\x45\xff\x63\xff\x00\x00\x00\x00\x3e\xff\x3c\xff\x00\x00\x00\x00\x54\xff\x52\xff\x00\x00\x00\x00\x51\xff\x00\x00\x53\xff\x00\x00\x50\xff\x4f\xff\x00\x00\x00\x00\x55\xff\x56\xff\x00\x00\xa3\xfe\x00\x00\x00\x00\x57\xff\x00\x00\x00\x00\x78\xff\x00\x00\x77\xff\x00\x00\x59\xff\x4b\xff\x00\x00\x00\x00\x93\xff\x00\x00\x00\x00\x00\x00\x76\xff\x00\x00\x00\x00\x00\x00\x00\x00\xa4\xfe\x4c\xff\x7c\xff\x0e\xff\x22\xff\x00\x00\x5d\xff\x00\x00\x2d\xff\x2a\xff\x23\xff\x00\x00\x00\x00\x7b\xff\xa3\xfe\x00\x00\x00\x00\x49\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\xff\x5c\xff\x00\x00\x00\x00\x00\x00\x00\x00\x44\xff\x00\x00\x00\x00\x00\x00\xa3\xfe\x13\xff\x00\x00\x00\x00\x14\xff\x0f\xff\xa3\xfe\x00\x00\x00\x00\x3d\xff\x00\x00\x00\x00\x00\x00\x3f\xff\x70\xff\x68\xff\x5b\xff\x00\x00\x00\x00\x00\x00\x00\x00\xea\xfe\x00\x00\xcb\xfe\x5b\xfe\xe3\xfe\xe2\xfe\xe1\xfe\xe0\xfe\xdf\xfe\xde\xfe\xe4\xfe\xdd\xfe\xdc\xfe\xdb\xfe\xda\xfe\xd9\xfe\xd8\xfe\xd1\xfe\xd3\xfe\xd2\xfe\xd7\xfe\xd6\xfe\xd5\xfe\x9f\xff\xd4\xfe\x95\xfe\x84\xfe\x94\xfe\x93\xfe\x92\xfe\x91\xfe\x8f\xfe\x90\xfe\x8e\xfe\x8d\xfe\x8c\xfe\x89\xfe\x86\xfe\x87\xfe\x88\xfe\x85\xfe\x8b\xfe\x8a\xfe\x59\xfe\x96\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xee\xfe\x00\x00\xfa\xff\xf8\xff\xf7\xff\xf6\xff\xf5\xff\xf4\xff\xf3\xff\xf2\xff\xf1\xff\xf0\xff\xef\xff\xee\xff\xed\xff\xec\xff\xeb\xff\xea\xff\xe9\xff\xe8\xff\xe7\xff\xe6\xff\xe5\xff\xe4\xff\xe3\xff\xe2\xff\xe1\xff\xe0\xff\xdf\xff\xde\xff\xdd\xff\xdc\xff\xdb\xff\xda\xff\xd9\xff\xd8\xff\xd7\xff\xd6\xff\xd5\xff\xd4\xff\xd3\xff\xd2\xff\xd1\xff\xd0\xff\xcf\xff\xce\xff\xcd\xff\xcc\xff\xcb\xff\xca\xff\xc9\xff\xc8\xff\xc7\xff\xc6\xff\xc5\xff\xc4\xff\xc3\xff\xc2\xff\xc1\xff\xc0\xff\xbf\xff\xbe\xff\xbd\xff\xbc\xff\xbb\xff\xba\xff\xb9\xff\xb8\xff\xb7\xff\xb6\xff\xb5\xff\xb4\xff\xb3\xff\xb2\xff\xb1\xff\xb0\xff\xaf\xff\xae\xff\xad\xff\xac\xff\xab\xff\xaa\xff\xa9\xff\xa8\xff\xa7\xff\xa6\xff\xa5\xff\xa4\xff\xa3\xff\xa2\xff\xa1\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x75\xff\x00\x00\x00\x00\x00\x00\xea\xfe\x00\x00\x00\x00\x00\x00\x10\xff\xbb\xfe\xb8\xfe\x00\x00\xb9\xfe\xb4\xfe\x9f\xfe\x00\x00\xbd\xfe\x10\xff\x10\xff\x97\xfe\xba\xfe\x00\x00\x97\xff\x98\xff\x00\x00\x00\x00\xbe\xfe\x00\x00\x10\xff\x10\xff\xbc\xfe\xa0\xff\x9e\xff\xa3\xfe\x9b\xff\x9a\xff\xe8\xfe\x00\x00\x00\x00\xec\xfe\x00\x00\x4a\xff\x6e\xff\x6b\xff\x6f\xff\x77\xff\x63\xff\x00\x00\x00\x00\x00\x00\x78\xff\x00\x00\x76\xff\x16\xff\x17\xff\x65\xff\x15\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\xff\x42\xff\x44\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1d\xff\x00\x00\x18\xff\x00\x00\x00\x00\x20\xff\x1f\xff\x21\xff\x0d\xff\x00\x00\x00\x00\x0c\xff\x00\x00\x00\x00\x29\xff\x25\xff\x2a\xff\xa3\xfe\x00\x00\x00\x00\x2e\xff\x67\xff\x24\xff\x00\x00\x32\xff\x00\x00\x35\xff\x4d\xff\x00\x00\x92\xff\x34\xff\x4e\xff\x33\xff\x5a\xff\x00\x00\x30\xff\x2f\xff\x9f\xfe\x31\xff\x27\xff\x26\xff\x28\xff\x2c\xff\x2b\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5e\xff\x00\x00\x00\x00\x3b\xff\x39\xff\x3a\xff\x38\xff\x36\xff\x37\xff\x5f\xff\x00\x00\x00\x00\x48\xff\x00\x00\x62\xff\x61\xff\x64\xff\x5f\xfe\x9c\xff\x9d\xff\x0a\xff\x0b\xff\xe9\xfe\xf0\xfe\x00\x00\xcd\xfe\xcc\xfe\xce\xfe\x00\x00\x00\x00\x5c\xfe\x10\xff\x00\x00\x10\xff\x00\x00\x90\xff\x8c\xff\x00\x00\x6c\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x79\xff\xc1\xfe\xc0\xfe\xbf\xfe\x00\x00\x00\x00\x10\xff\x9f\xfe\x03\xff\x00\x00\xb3\xfe\x00\x00\x94\xff\x00\x00\x6f\xfe\x00\x00\x00\x00\x44\xff\x00\x00\xb0\xfe\xae\xfe\xa9\xfe\x00\x00\x00\x00\x00\x00\xa5\xfe\x00\x00\xee\xfe\xec\xfe\x75\xfe\x00\x00\x71\xff\x00\x00\x00\x00\x75\xff\x76\xfe\x77\xfe\x00\x00\x72\xff\x72\xfe\x00\x00\x00\x00\x75\xff\x75\xff\x00\x00\x75\xff\x00\x00\x75\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x75\xff\x00\x00\x00\x00\x73\xff\x00\x00\x00\x00\x78\xfe\x73\xfe\x74\xfe\x74\xff\x83\xfe\x80\xfe\x79\xfe\xef\xfe\xed\xfe\xb7\xfe\x00\x00\xa7\xfe\x00\x00\x00\x00\xa7\xfe\x00\x00\xaf\xfe\x00\x00\x7e\xff\x00\x00\x00\x00\x71\xfe\x00\x00\x00\x00\x95\xff\x00\x00\x00\x00\xa1\xfe\x05\xff\x03\xff\x01\xff\x00\xff\x00\x00\x02\xff\x00\x00\x00\x00\x9e\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x7a\xff\x8e\xff\x00\x00\x00\x00\x00\x00\x91\xff\x00\x00\x00\x00\x00\x00\x00\x00\x6e\xfe\x00\x00\x00\x00\x8d\xff\x00\x00\x00\x00\x12\xff\x00\x00\x00\x00\x11\xff\x5d\xfe\xe7\xfe\x00\x00\x00\x00\x00\x00\xeb\xfe\x40\xff\x41\xff\x47\xff\x1e\xff\x1d\xff\x1c\xff\x1b\xff\x19\xff\x1a\xff\x08\xff\x09\xff\x06\xff\x07\xff\x03\xff\xa2\xfe\x00\x00\x00\x00\x5e\xfe\x00\x00\x6a\xfe\xc7\xfe\x00\x00\xc6\xfe\xc8\xfe\xcf\xfe\x6d\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x8a\xff\x88\xff\x8f\xff\x98\xfe\x9f\xfe\x03\xff\x99\xfe\x00\x00\xf4\xfe\x99\xff\xf4\xfe\x04\xff\x03\xff\xb5\xfe\xd0\xfe\x70\xfe\xc3\xfe\xc4\xfe\x00\x00\xb6\xfe\xb2\xfe\x00\x00\x00\x00\xac\xfe\x00\x00\x00\x00\xad\xfe\x7d\xfe\x7a\xfe\x7e\xfe\x7b\xfe\x00\x00\x7f\xfe\x81\xfe\x82\xfe\x7c\xfe\x00\x00\xa7\xfe\x00\x00\x00\x00\x00\x00\xb1\xfe\x69\xfe\x00\x00\x00\x00\x00\x00\x60\xfe\x00\x00\x61\xfe\x00\x00\xa0\xfe\xf6\xfe\xf2\xfe\x00\x00\xf3\xfe\x00\x00\x00\x00\x00\x00\xfa\xfe\x00\x00\x99\xff\xfc\xfe\x00\x00\x03\xff\x9b\xfe\x9c\xfe\x00\x00\x89\xff\x8b\xff\x84\xff\x86\xff\x80\xff\x82\xff\x00\x00\x6b\xfe\x00\x00\xe6\xfe\xe5\xfe\xc9\xfe\xca\xfe\x83\xff\x81\xff\x87\xff\x85\xff\x00\x00\x9a\xfe\xff\xfe\x00\x00\x00\x00\x99\xff\xfd\xfe\xf8\xfe\xf5\xfe\xfe\xfe\x00\x00\xc5\xfe\xc2\xfe\x66\xfe\x65\xfe\xa3\xfe\x68\xfe\xa3\xfe\x00\x00\xaa\xfe\xa6\xfe\xab\xfe\xa8\xfe\x00\x00\x00\x00\x00\x00\xf1\xfe\xfb\xfe\xf9\xfe\xf7\xfe\x9d\xfe\x62\xfe\x64\xfe\xa3\xfe\x67\xfe\x00\x00\x63\xfe"#
happyCheck :: HappyAddr
-happyCheck = HappyA# "\xff\xff\x05\x00\x05\x00\x09\x00\x0a\x00\x09\x00\x09\x00\x0a\x00\x09\x00\x25\x00\x00\x00\x0f\x00\x09\x00\x60\x00\x0f\x00\x10\x00\x00\x00\x09\x00\x65\x00\x05\x00\x11\x00\x40\x00\x09\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x03\x00\x09\x00\x09\x00\x09\x00\x0c\x00\x09\x00\x0e\x00\x09\x00\x0a\x00\x09\x00\x55\x00\x0f\x00\x10\x00\x25\x00\x26\x00\x0f\x00\x10\x00\x24\x00\x25\x00\x26\x00\x47\x00\x09\x00\x44\x00\x02\x00\x0c\x00\x05\x00\x0e\x00\x57\x00\x0f\x00\x00\x00\x24\x00\x25\x00\x26\x00\x45\x00\x55\x00\x05\x00\x09\x00\x4b\x00\x4a\x00\x55\x00\x4b\x00\x4d\x00\x0f\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x51\x00\x21\x00\x22\x00\x23\x00\x55\x00\x43\x00\x51\x00\x66\x00\x67\x00\x4c\x00\x0b\x00\x6a\x00\x6b\x00\x69\x00\x4b\x00\x6e\x00\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\x80\x00\x05\x00\x41\x00\x82\x00\x4b\x00\x09\x00\x55\x00\x87\x00\x09\x00\x6c\x00\x8a\x00\x0f\x00\x6c\x00\x69\x00\x09\x00\x43\x00\x11\x00\x09\x00\x51\x00\x52\x00\x48\x00\x0f\x00\x11\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x84\x00\x03\x00\x09\x00\x0f\x00\x82\x00\x09\x00\x03\x00\x68\x00\x0f\x00\x2a\x00\x09\x00\x0f\x00\x42\x00\x09\x00\x2f\x00\x09\x00\x0f\x00\x4d\x00\x0c\x00\x4f\x00\x0e\x00\x11\x00\x12\x00\x38\x00\x39\x00\x4f\x00\x21\x00\x22\x00\x23\x00\x21\x00\x22\x00\x23\x00\x03\x00\x45\x00\x21\x00\x22\x00\x23\x00\x09\x00\x4a\x00\x09\x00\x0c\x00\x4d\x00\x0e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x09\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x55\x00\x56\x00\x03\x00\x5f\x00\x4b\x00\x42\x00\x86\x00\x66\x00\x67\x00\x09\x00\x42\x00\x6a\x00\x6b\x00\x07\x00\x0f\x00\x6e\x00\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\x80\x00\x09\x00\x09\x00\x42\x00\x42\x00\x68\x00\x44\x00\x0f\x00\x68\x00\x09\x00\x8a\x00\x09\x00\x4c\x00\x68\x00\x81\x00\x09\x00\x42\x00\x0f\x00\x85\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x44\x00\x4f\x00\x09\x00\x44\x00\x09\x00\x42\x00\x43\x00\x44\x00\x22\x00\x4a\x00\x0f\x00\x4c\x00\x05\x00\x4e\x00\x44\x00\x41\x00\x15\x00\x55\x00\x56\x00\x0b\x00\x55\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x55\x00\x52\x00\x45\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x4a\x00\x2c\x00\x4d\x00\x4d\x00\x4f\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x44\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x42\x00\x43\x00\x44\x00\x05\x00\x06\x00\x55\x00\x81\x00\x66\x00\x67\x00\x07\x00\x85\x00\x6a\x00\x6b\x00\x07\x00\x6d\x00\x6e\x00\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\x80\x00\x09\x00\x42\x00\x65\x00\x43\x00\x66\x00\x67\x00\x0f\x00\x65\x00\x09\x00\x8a\x00\x8b\x00\x4b\x00\x41\x00\x41\x00\x4f\x00\x4c\x00\x11\x00\x4e\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x4f\x00\x09\x00\x52\x00\x52\x00\x3f\x00\x40\x00\x41\x00\x0f\x00\x3f\x00\x40\x00\x41\x00\x65\x00\x09\x00\x15\x00\x2a\x00\x0c\x00\x0d\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x1d\x00\x1e\x00\x1f\x00\x42\x00\x21\x00\x22\x00\x23\x00\x38\x00\x39\x00\x4c\x00\x0b\x00\x4e\x00\x45\x00\x09\x00\x4d\x00\x2c\x00\x4f\x00\x4a\x00\x55\x00\x0f\x00\x4d\x00\x0b\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x22\x00\x09\x00\x4a\x00\x86\x00\x4c\x00\x0b\x00\x4e\x00\x66\x00\x67\x00\x11\x00\x12\x00\x6a\x00\x6b\x00\x55\x00\x09\x00\x6e\x00\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\x80\x00\x09\x00\x66\x00\x67\x00\x09\x00\x09\x00\x65\x00\x0f\x00\x09\x00\x09\x00\x8a\x00\x09\x00\x11\x00\x11\x00\x12\x00\x0f\x00\x11\x00\x0f\x00\x10\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x81\x00\x2a\x00\x09\x00\x09\x00\x85\x00\x2a\x00\x09\x00\x81\x00\x0f\x00\x0f\x00\x10\x00\x85\x00\x35\x00\x36\x00\x11\x00\x38\x00\x39\x00\x65\x00\x37\x00\x38\x00\x39\x00\x16\x00\x1d\x00\x1e\x00\x1f\x00\x45\x00\x21\x00\x22\x00\x23\x00\x09\x00\x4a\x00\x16\x00\x0c\x00\x4d\x00\x0e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x2a\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x19\x00\x37\x00\x38\x00\x39\x00\x19\x00\x09\x00\x09\x00\x66\x00\x67\x00\x0c\x00\x0d\x00\x6a\x00\x6b\x00\x11\x00\x12\x00\x6e\x00\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\x80\x00\x09\x00\x43\x00\x09\x00\x16\x00\x09\x00\x17\x00\x0f\x00\x09\x00\x09\x00\x8a\x00\x11\x00\x4d\x00\x11\x00\x4f\x00\x0f\x00\x11\x00\x05\x00\x06\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x2a\x00\x09\x00\x2a\x00\x09\x00\x0c\x00\x2a\x00\x0e\x00\x2f\x00\x09\x00\x0f\x00\x2f\x00\x0c\x00\x0d\x00\x37\x00\x38\x00\x39\x00\x38\x00\x39\x00\x09\x00\x38\x00\x39\x00\x0c\x00\x16\x00\x0e\x00\x16\x00\x45\x00\x20\x00\x21\x00\x22\x00\x23\x00\x4a\x00\x62\x00\x63\x00\x4d\x00\x65\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x16\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x09\x00\x09\x00\x09\x00\x0c\x00\x0c\x00\x0e\x00\x0e\x00\x66\x00\x67\x00\x47\x00\x11\x00\x6a\x00\x6b\x00\x05\x00\x06\x00\x6e\x00\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\x80\x00\x09\x00\x2a\x00\x09\x00\x46\x00\x55\x00\x09\x00\x0f\x00\x58\x00\x46\x00\x8a\x00\x11\x00\x49\x00\x09\x00\x11\x00\x37\x00\x38\x00\x39\x00\x0b\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x09\x00\x3f\x00\x40\x00\x0b\x00\x09\x00\x06\x00\x0f\x00\x10\x00\x2a\x00\x0b\x00\x0f\x00\x2a\x00\x4a\x00\x4a\x00\x4c\x00\x4c\x00\x4e\x00\x4e\x00\x64\x00\x65\x00\x06\x00\x37\x00\x38\x00\x39\x00\x37\x00\x38\x00\x39\x00\x20\x00\x21\x00\x22\x00\x23\x00\x88\x00\x89\x00\x45\x00\x0b\x00\x0a\x00\x0b\x00\x0c\x00\x4a\x00\x0e\x00\x0b\x00\x4d\x00\x05\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x49\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x47\x00\x4a\x00\x09\x00\x4c\x00\x09\x00\x4e\x00\x48\x00\x66\x00\x67\x00\x19\x00\x11\x00\x6a\x00\x6b\x00\x64\x00\x65\x00\x6e\x00\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\x80\x00\x09\x00\x2a\x00\x09\x00\x19\x00\x09\x00\x09\x00\x0f\x00\x09\x00\x0a\x00\x8a\x00\x11\x00\x0f\x00\x11\x00\x19\x00\x37\x00\x38\x00\x39\x00\x19\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x43\x00\x20\x00\x21\x00\x22\x00\x23\x00\x19\x00\x09\x00\x4a\x00\x2a\x00\x4c\x00\x2a\x00\x4e\x00\x0f\x00\x88\x00\x89\x00\x2f\x00\x13\x00\x14\x00\x55\x00\x88\x00\x89\x00\x37\x00\x38\x00\x39\x00\x38\x00\x39\x00\x1d\x00\x1e\x00\x1f\x00\x19\x00\x21\x00\x22\x00\x23\x00\x45\x00\x88\x00\x89\x00\x09\x00\x19\x00\x4a\x00\x18\x00\x2b\x00\x4d\x00\x0f\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x19\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x16\x00\x21\x00\x22\x00\x23\x00\x09\x00\x0a\x00\x19\x00\x66\x00\x67\x00\x09\x00\x0a\x00\x6a\x00\x6b\x00\x09\x00\x0a\x00\x6e\x00\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\x80\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x00\x00\x01\x00\x09\x00\x64\x00\x65\x00\x8a\x00\x06\x00\x07\x00\x08\x00\x09\x00\x11\x00\x64\x00\x65\x00\x05\x00\x06\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\x2a\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x46\x00\x36\x00\x09\x00\x38\x00\x39\x00\x09\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3f\x00\x40\x00\x3e\x00\x09\x00\x40\x00\x05\x00\x06\x00\x88\x00\x44\x00\x45\x00\x88\x00\x47\x00\x88\x00\x4c\x00\x4a\x00\x4e\x00\x4c\x00\x88\x00\x4e\x00\x09\x00\x0a\x00\x51\x00\x55\x00\x53\x00\x08\x00\x55\x00\x56\x00\x08\x00\x58\x00\x00\x00\x01\x00\x09\x00\x88\x00\x89\x00\x08\x00\x06\x00\x07\x00\x08\x00\x09\x00\x11\x00\x29\x00\x2a\x00\x09\x00\x09\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x83\x00\x0f\x00\x11\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\x2a\x00\x00\x00\x01\x00\x21\x00\x22\x00\x23\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x2a\x00\x36\x00\x09\x00\x38\x00\x39\x00\x2f\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x38\x00\x39\x00\x3e\x00\x09\x00\x40\x00\x55\x00\x56\x00\x81\x00\x44\x00\x45\x00\x88\x00\x47\x00\x42\x00\x43\x00\x4a\x00\x04\x00\x4c\x00\x4e\x00\x4e\x00\x55\x00\x56\x00\x51\x00\x06\x00\x53\x00\x01\x00\x55\x00\x56\x00\x44\x00\x58\x00\x06\x00\x07\x00\x08\x00\x48\x00\x4a\x00\x88\x00\x4c\x00\x0b\x00\x4e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x0b\x00\x09\x00\x55\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\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x61\x00\x62\x00\x63\x00\x09\x00\x65\x00\x02\x00\x88\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x01\x00\x03\x00\x3e\x00\x55\x00\x40\x00\x4b\x00\x0f\x00\x0d\x00\x44\x00\x45\x00\x41\x00\x47\x00\x4b\x00\x4b\x00\x4a\x00\x41\x00\x4c\x00\x55\x00\x4e\x00\x55\x00\x55\x00\x51\x00\x4b\x00\x53\x00\x50\x00\x55\x00\x56\x00\x54\x00\x58\x00\x59\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\x01\x00\x50\x00\x55\x00\x4d\x00\x55\x00\x06\x00\x07\x00\x08\x00\x4f\x00\x46\x00\x46\x00\x4f\x00\x55\x00\x4f\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x03\x00\x03\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\x03\x00\x50\x00\x03\x00\x03\x00\x55\x00\x43\x00\x4a\x00\x4a\x00\x4a\x00\x50\x00\x50\x00\x50\x00\x55\x00\x55\x00\x4f\x00\x43\x00\x4d\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x55\x00\x43\x00\x3e\x00\x4f\x00\x40\x00\x54\x00\x54\x00\x57\x00\x44\x00\x45\x00\x54\x00\x47\x00\x54\x00\x54\x00\x4a\x00\x01\x00\x4c\x00\x54\x00\x4e\x00\x54\x00\x06\x00\x07\x00\x08\x00\x53\x00\x57\x00\x55\x00\x56\x00\x54\x00\x58\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x57\x00\x54\x00\x54\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\x54\x00\x54\x00\x57\x00\x04\x00\x49\x00\x57\x00\x57\x00\x57\x00\x54\x00\x43\x00\x47\x00\x42\x00\x03\x00\x42\x00\x55\x00\x01\x00\x50\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x55\x00\x46\x00\x3e\x00\x4f\x00\x40\x00\x46\x00\x46\x00\x12\x00\x44\x00\x45\x00\x55\x00\x47\x00\x46\x00\x46\x00\x4a\x00\x46\x00\x4c\x00\x4f\x00\x4e\x00\x1e\x00\x1f\x00\x20\x00\x4b\x00\x53\x00\x4b\x00\x55\x00\x56\x00\x4f\x00\x58\x00\x4f\x00\x41\x00\x4f\x00\x04\x00\x43\x00\x43\x00\x05\x00\x55\x00\x49\x00\x54\x00\x54\x00\x57\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x57\x00\x3b\x00\x57\x00\x57\x00\x3e\x00\x3f\x00\x40\x00\x01\x00\x54\x00\x54\x00\x44\x00\x45\x00\x50\x00\x47\x00\x55\x00\x57\x00\x4a\x00\x57\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x51\x00\x50\x00\x12\x00\x55\x00\x50\x00\x55\x00\x56\x00\x09\x00\x58\x00\x50\x00\x49\x00\x05\x00\x02\x00\x0f\x00\x1e\x00\x1f\x00\x20\x00\x55\x00\x4e\x00\x15\x00\x46\x00\x02\x00\x02\x00\x46\x00\x49\x00\x50\x00\x09\x00\x1d\x00\x1e\x00\x1f\x00\x4b\x00\x21\x00\x22\x00\x23\x00\x42\x00\x4b\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x2c\x00\x3b\x00\x4b\x00\x4f\x00\x3e\x00\x3f\x00\x40\x00\x01\x00\x4f\x00\x4f\x00\x44\x00\x45\x00\x42\x00\x47\x00\x59\x00\x50\x00\x4a\x00\x55\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x46\x00\x59\x00\x12\x00\x43\x00\x09\x00\x55\x00\x56\x00\x48\x00\x58\x00\x50\x00\x0f\x00\x59\x00\xff\xff\xff\xff\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x3b\x00\x31\x00\x32\x00\x33\x00\x3f\x00\x40\x00\x01\x00\xff\xff\xff\xff\x44\x00\x45\x00\xff\xff\x47\x00\x08\x00\xff\xff\x4a\x00\xff\xff\x4c\x00\x4d\x00\x4e\x00\x4f\x00\xff\xff\xff\xff\x12\x00\xff\xff\x09\x00\x55\x00\x56\x00\xff\xff\x58\x00\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x3b\x00\x31\x00\x32\x00\x33\x00\x3f\x00\x40\x00\xff\xff\xff\xff\x12\x00\x44\x00\x45\x00\xff\xff\x47\x00\xff\xff\xff\xff\x4a\x00\x4b\x00\x4c\x00\xff\xff\x4e\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\x01\x00\x40\x00\xff\xff\xff\xff\xff\xff\x44\x00\x45\x00\x08\x00\x47\x00\xff\xff\xff\xff\x4a\x00\x09\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x12\x00\x0f\x00\xff\xff\x09\x00\xff\xff\x55\x00\x56\x00\x15\x00\x58\x00\x0f\x00\xff\xff\xff\xff\x1e\x00\x1f\x00\x20\x00\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\xff\xff\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x2c\x00\xff\xff\x01\x00\xff\xff\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\xff\xff\xff\xff\x12\x00\x44\x00\x45\x00\xff\xff\x47\x00\xff\xff\xff\xff\x4a\x00\x4b\x00\x4c\x00\xff\xff\x4e\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x3b\x00\x01\x00\xff\xff\xff\xff\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\x44\x00\x45\x00\xff\xff\x47\x00\xff\xff\xff\xff\x4a\x00\x09\x00\x4c\x00\x12\x00\x4e\x00\x4f\x00\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\x15\x00\x58\x00\x1e\x00\x1f\x00\x20\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x01\x00\x2c\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\x3f\x00\x40\x00\xff\xff\xff\xff\x12\x00\x44\x00\x45\x00\xff\xff\x47\x00\xff\xff\xff\xff\x4a\x00\x4b\x00\x4c\x00\xff\xff\x4e\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x3b\x00\x01\x00\xff\xff\xff\xff\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\x44\x00\x45\x00\xff\xff\x47\x00\xff\xff\xff\xff\x4a\x00\x09\x00\x4c\x00\x12\x00\x4e\x00\x4f\x00\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\xff\xff\x58\x00\x1e\x00\x1f\x00\x20\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x01\x00\xff\xff\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\x3f\x00\x40\x00\xff\xff\xff\xff\x12\x00\x44\x00\x45\x00\xff\xff\x47\x00\xff\xff\xff\xff\x4a\x00\x4b\x00\x4c\x00\xff\xff\x4e\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\x01\x00\x40\x00\xff\xff\xff\xff\xff\xff\x44\x00\x45\x00\x08\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x12\x00\x09\x00\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\x0f\x00\x58\x00\xff\xff\xff\xff\xff\xff\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\xff\xff\xff\xff\x12\x00\x44\x00\x45\x00\xff\xff\x47\x00\xff\xff\xff\xff\x4a\x00\x4b\x00\x4c\x00\xff\xff\x4e\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x3b\x00\x01\x00\xff\xff\xff\xff\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\x44\x00\x45\x00\xff\xff\x47\x00\xff\xff\xff\xff\x4a\x00\x09\x00\x4c\x00\x12\x00\x4e\x00\x4f\x00\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\xff\xff\x58\x00\x1e\x00\x1f\x00\x20\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x01\x00\xff\xff\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\xff\xff\xff\xff\x12\x00\x44\x00\x45\x00\x46\x00\x47\x00\xff\xff\x49\x00\x4a\x00\xff\xff\x4c\x00\xff\xff\x4e\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\x3f\x00\x40\x00\xff\xff\xff\xff\x12\x00\x44\x00\x45\x00\xff\xff\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\x4e\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x3b\x00\x01\x00\xff\xff\xff\xff\xff\xff\x40\x00\xff\xff\xff\xff\xff\xff\x44\x00\x45\x00\xff\xff\x47\x00\xff\xff\xff\xff\x4a\x00\x09\x00\x4c\x00\x12\x00\x4e\x00\x4f\x00\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\xff\xff\x58\x00\x1e\x00\x1f\x00\x20\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\xff\xff\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x3b\x00\x01\x00\xff\xff\xff\xff\x3f\x00\x40\x00\xff\xff\xff\xff\x08\x00\x44\x00\x45\x00\xff\xff\x47\x00\xff\xff\x09\x00\x4a\x00\xff\xff\x4c\x00\x12\x00\x4e\x00\x0f\x00\xff\xff\xff\xff\xff\xff\x13\x00\x14\x00\x55\x00\x56\x00\xff\xff\x58\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2b\x00\xff\xff\x01\x00\xff\xff\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\xff\xff\xff\xff\x12\x00\x44\x00\x45\x00\xff\xff\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\x4e\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\x3f\x00\x40\x00\xff\xff\xff\xff\x12\x00\x44\x00\x45\x00\xff\xff\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\x4e\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x3b\x00\x01\x00\xff\xff\xff\xff\xff\xff\x40\x00\xff\xff\xff\xff\xff\xff\x44\x00\x45\x00\xff\xff\x47\x00\xff\xff\xff\xff\x4a\x00\x09\x00\x4c\x00\x12\x00\x4e\x00\x4f\x00\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\xff\xff\x58\x00\x1e\x00\x1f\x00\x20\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x01\x00\xff\xff\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\x3f\x00\x40\x00\xff\xff\xff\xff\x12\x00\x44\x00\x45\x00\xff\xff\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\x4e\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x3b\x00\x12\x00\xff\xff\xff\xff\xff\xff\x40\x00\xff\xff\xff\xff\xff\xff\x44\x00\x45\x00\xff\xff\x47\x00\x1e\x00\x1f\x00\x4a\x00\xff\xff\x4c\x00\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x36\x00\x37\x00\xff\xff\x39\x00\xff\xff\x3b\x00\xff\xff\xff\xff\x3f\x00\x40\x00\x40\x00\x1e\x00\x1f\x00\x44\x00\x44\x00\x45\x00\xff\xff\xff\xff\xff\xff\x4a\x00\x4a\x00\x4c\x00\x4c\x00\x4e\x00\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x55\x00\x55\x00\x56\x00\xff\xff\x58\x00\x36\x00\x37\x00\xff\xff\x39\x00\x12\x00\x3b\x00\xff\xff\xff\xff\x3f\x00\x40\x00\x40\x00\xff\xff\xff\xff\x44\x00\x44\x00\x45\x00\x1e\x00\x1f\x00\xff\xff\x4a\x00\x4a\x00\x4c\x00\x4c\x00\x4e\x00\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x55\x00\x55\x00\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x36\x00\x37\x00\xff\xff\x39\x00\xff\xff\x3b\x00\xff\xff\xff\xff\x3f\x00\x40\x00\x40\x00\x1e\x00\x1f\x00\x44\x00\x44\x00\x45\x00\xff\xff\xff\xff\xff\xff\x4a\x00\x4a\x00\x4c\x00\x4c\x00\x4e\x00\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x55\x00\x55\x00\x56\x00\xff\xff\x58\x00\x36\x00\x37\x00\xff\xff\x39\x00\x12\x00\x3b\x00\xff\xff\xff\xff\x3f\x00\x40\x00\x40\x00\xff\xff\xff\xff\x44\x00\x44\x00\x45\x00\x1e\x00\x1f\x00\xff\xff\x4a\x00\x4a\x00\x4c\x00\x4c\x00\x4e\x00\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x55\x00\x55\x00\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x36\x00\x37\x00\xff\xff\x39\x00\xff\xff\x3b\x00\xff\xff\xff\xff\x3f\x00\x40\x00\x40\x00\x1e\x00\x1f\x00\x44\x00\x44\x00\x45\x00\xff\xff\xff\xff\xff\xff\x4a\x00\x4a\x00\x4c\x00\x4c\x00\x4e\x00\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x55\x00\x55\x00\x56\x00\xff\xff\x58\x00\x36\x00\x37\x00\xff\xff\x39\x00\x12\x00\x3b\x00\xff\xff\xff\xff\x3f\x00\x40\x00\x40\x00\xff\xff\xff\xff\x44\x00\x44\x00\x45\x00\x1e\x00\x1f\x00\xff\xff\x4a\x00\x4a\x00\x4c\x00\x4c\x00\x4e\x00\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x55\x00\x55\x00\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x36\x00\x37\x00\xff\xff\x39\x00\xff\xff\x3b\x00\xff\xff\xff\xff\x3f\x00\x40\x00\x40\x00\x1e\x00\x1f\x00\x44\x00\x44\x00\x45\x00\xff\xff\xff\xff\xff\xff\x4a\x00\x4a\x00\x4c\x00\x4c\x00\x4e\x00\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x55\x00\x55\x00\x56\x00\xff\xff\x58\x00\x36\x00\x37\x00\xff\xff\x39\x00\x12\x00\x3b\x00\xff\xff\xff\xff\x3f\x00\x40\x00\x40\x00\xff\xff\xff\xff\x44\x00\x44\x00\x45\x00\x1e\x00\x1f\x00\xff\xff\x4a\x00\x4a\x00\x4c\x00\x4c\x00\x4e\x00\x4e\x00\xff\xff\xff\xff\x09\x00\xff\xff\x0b\x00\x55\x00\x55\x00\x56\x00\x0f\x00\x58\x00\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\x36\x00\x37\x00\xff\xff\x39\x00\xff\xff\x3b\x00\xff\xff\x1d\x00\x1e\x00\x1f\x00\x40\x00\x21\x00\x22\x00\x23\x00\x44\x00\x45\x00\xff\xff\x09\x00\xff\xff\xff\xff\x4a\x00\x2b\x00\x4c\x00\x0f\x00\x4e\x00\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\xff\xff\x55\x00\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\x0f\x00\x2b\x00\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\x31\x00\x32\x00\xff\xff\x34\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x09\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x0f\x00\xff\xff\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x09\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x0f\x00\xff\xff\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\x0f\x00\x09\x00\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x2b\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2b\x00\x0f\x00\x09\x00\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x2b\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2b\x00\x0f\x00\x09\x00\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x2b\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2b\x00\x0f\x00\x09\x00\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x2b\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2b\x00\x0f\x00\x09\x00\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x2b\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2b\x00\x0f\x00\x09\x00\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x2b\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2b\x00\x0f\x00\xff\xff\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\x0f\x00\x2b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x3f\x00\x40\x00\xff\xff\x3f\x00\x40\x00\x44\x00\xff\xff\x46\x00\x44\x00\xff\xff\x46\x00\x4a\x00\xff\xff\x4c\x00\x4a\x00\x4e\x00\x4c\x00\xff\xff\x4e\x00\x3f\x00\x40\x00\xff\xff\x55\x00\xff\xff\x44\x00\x55\x00\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x55\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#
+happyCheck = HappyA# "\xff\xff\x05\x00\x05\x00\x11\x00\x0a\x00\x09\x00\x09\x00\x0a\x00\x09\x00\x11\x00\x00\x00\x0f\x00\x09\x00\x81\x00\x0f\x00\x10\x00\x00\x00\x85\x00\x38\x00\x28\x00\x11\x00\x40\x00\x09\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x11\x00\x09\x00\x09\x00\x08\x00\x0c\x00\x09\x00\x0e\x00\x09\x00\x0a\x00\x09\x00\x55\x00\x0f\x00\x10\x00\x2a\x00\x43\x00\x0f\x00\x10\x00\x57\x00\x25\x00\x26\x00\x19\x00\x05\x00\x06\x00\x28\x00\x35\x00\x36\x00\x1f\x00\x38\x00\x39\x00\x00\x00\x09\x00\x0a\x00\x09\x00\x45\x00\x27\x00\x4b\x00\x09\x00\x4b\x00\x4a\x00\x55\x00\x4b\x00\x4d\x00\x0f\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x51\x00\x21\x00\x22\x00\x23\x00\x55\x00\x43\x00\x51\x00\x66\x00\x67\x00\x4c\x00\x48\x00\x6a\x00\x6b\x00\x69\x00\x4b\x00\x6e\x00\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\x80\x00\x05\x00\x41\x00\x82\x00\x4b\x00\x09\x00\x09\x00\x87\x00\x09\x00\x6c\x00\x8a\x00\x0f\x00\x6c\x00\x69\x00\x11\x00\x12\x00\x11\x00\x05\x00\x51\x00\x52\x00\x42\x00\x28\x00\x09\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x84\x00\x4f\x00\x09\x00\x44\x00\x82\x00\x09\x00\x09\x00\x68\x00\x0f\x00\x2a\x00\x09\x00\x0f\x00\x42\x00\x05\x00\x2f\x00\x42\x00\x0f\x00\x24\x00\x25\x00\x26\x00\x55\x00\x56\x00\x05\x00\x38\x00\x39\x00\x4f\x00\x21\x00\x22\x00\x23\x00\x21\x00\x22\x00\x23\x00\x09\x00\x45\x00\x21\x00\x22\x00\x23\x00\x09\x00\x4a\x00\x11\x00\x0c\x00\x4d\x00\x0e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x28\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x24\x00\x25\x00\x26\x00\x5f\x00\x42\x00\x43\x00\x44\x00\x66\x00\x67\x00\x09\x00\x28\x00\x6a\x00\x6b\x00\x09\x00\x42\x00\x6e\x00\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\x80\x00\x09\x00\x09\x00\x42\x00\x47\x00\x68\x00\x09\x00\x0f\x00\x68\x00\x0b\x00\x8a\x00\x09\x00\x4c\x00\x68\x00\x11\x00\x55\x00\x56\x00\x0f\x00\x55\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x41\x00\x44\x00\x44\x00\x07\x00\x09\x00\x42\x00\x43\x00\x44\x00\x22\x00\x42\x00\x0f\x00\x44\x00\x09\x00\x07\x00\x4f\x00\x41\x00\x15\x00\x52\x00\x55\x00\x55\x00\x11\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x09\x00\x52\x00\x45\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x4a\x00\x2c\x00\x4d\x00\x4d\x00\x4f\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x44\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x3f\x00\x40\x00\x41\x00\x09\x00\x4c\x00\x55\x00\x4e\x00\x66\x00\x67\x00\x07\x00\x09\x00\x6a\x00\x6b\x00\x55\x00\x6d\x00\x6e\x00\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\x80\x00\x09\x00\x42\x00\x42\x00\x81\x00\x66\x00\x67\x00\x0f\x00\x85\x00\x09\x00\x8a\x00\x8b\x00\x09\x00\x41\x00\x4d\x00\x4f\x00\x4f\x00\x11\x00\x0f\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x86\x00\x09\x00\x52\x00\x09\x00\x3f\x00\x40\x00\x41\x00\x0f\x00\x21\x00\x22\x00\x23\x00\x11\x00\x12\x00\x15\x00\x2a\x00\x05\x00\x43\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x1d\x00\x1e\x00\x1f\x00\x4b\x00\x21\x00\x22\x00\x23\x00\x38\x00\x39\x00\x64\x00\x65\x00\x09\x00\x45\x00\x09\x00\x0c\x00\x2c\x00\x0e\x00\x4a\x00\x55\x00\x0f\x00\x4d\x00\x58\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x22\x00\x09\x00\x4a\x00\x4c\x00\x4c\x00\x4e\x00\x4e\x00\x66\x00\x67\x00\x11\x00\x12\x00\x6a\x00\x6b\x00\x55\x00\x0b\x00\x6e\x00\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\x80\x00\x09\x00\x66\x00\x67\x00\x09\x00\x09\x00\x65\x00\x0f\x00\x09\x00\x09\x00\x8a\x00\x09\x00\x11\x00\x11\x00\x12\x00\x0f\x00\x11\x00\x0f\x00\x10\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x43\x00\x2a\x00\x09\x00\x65\x00\x09\x00\x2a\x00\x60\x00\x0c\x00\x0f\x00\x0e\x00\x4d\x00\x65\x00\x4f\x00\x81\x00\x37\x00\x38\x00\x39\x00\x85\x00\x37\x00\x38\x00\x39\x00\x65\x00\x1d\x00\x1e\x00\x1f\x00\x45\x00\x21\x00\x22\x00\x23\x00\x09\x00\x4a\x00\x09\x00\x0c\x00\x4d\x00\x0e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x0b\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x0b\x00\x09\x00\x46\x00\x09\x00\x0c\x00\x49\x00\x0e\x00\x66\x00\x67\x00\x0f\x00\x10\x00\x6a\x00\x6b\x00\x05\x00\x06\x00\x6e\x00\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\x80\x00\x09\x00\x4a\x00\x18\x00\x4c\x00\x1a\x00\x4e\x00\x0f\x00\x1d\x00\x1e\x00\x8a\x00\x09\x00\x21\x00\x65\x00\x81\x00\x0b\x00\x25\x00\x0f\x00\x85\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x86\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x3b\x00\x05\x00\x06\x00\x09\x00\x09\x00\x40\x00\x0c\x00\x43\x00\x0e\x00\x44\x00\x45\x00\x4d\x00\x11\x00\x4f\x00\x4a\x00\x4a\x00\x4c\x00\x4c\x00\x4e\x00\x4e\x00\x4a\x00\x65\x00\x4c\x00\x45\x00\x4e\x00\x55\x00\x55\x00\x56\x00\x4a\x00\x58\x00\x16\x00\x4d\x00\x19\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x2a\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x19\x00\x37\x00\x38\x00\x39\x00\x64\x00\x65\x00\x09\x00\x66\x00\x67\x00\x0c\x00\x0d\x00\x6a\x00\x6b\x00\x88\x00\x89\x00\x6e\x00\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\x80\x00\x09\x00\x16\x00\x18\x00\x16\x00\x1a\x00\x17\x00\x0f\x00\x1d\x00\x1e\x00\x8a\x00\x09\x00\x21\x00\x88\x00\x89\x00\x16\x00\x25\x00\x0f\x00\x16\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x09\x00\x0a\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x3b\x00\x09\x00\x0a\x00\x09\x00\x09\x00\x40\x00\x0c\x00\x0d\x00\x44\x00\x44\x00\x45\x00\x16\x00\x11\x00\x46\x00\x4a\x00\x4a\x00\x4c\x00\x4c\x00\x4e\x00\x4e\x00\x61\x00\x62\x00\x63\x00\x45\x00\x65\x00\x55\x00\x55\x00\x56\x00\x4a\x00\x58\x00\x0b\x00\x4d\x00\x47\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x2a\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x09\x00\x37\x00\x38\x00\x39\x00\x09\x00\x0a\x00\x09\x00\x66\x00\x67\x00\x0c\x00\x0d\x00\x6a\x00\x6b\x00\x09\x00\x0a\x00\x6e\x00\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\x80\x00\x09\x00\x0b\x00\x18\x00\x06\x00\x1a\x00\x06\x00\x0f\x00\x1d\x00\x1e\x00\x8a\x00\x09\x00\x21\x00\x88\x00\x89\x00\x0b\x00\x25\x00\x0f\x00\x0b\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x88\x00\x89\x00\x05\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x3b\x00\x64\x00\x65\x00\x0b\x00\x09\x00\x40\x00\x64\x00\x65\x00\x44\x00\x44\x00\x45\x00\x49\x00\x11\x00\x47\x00\x4a\x00\x4a\x00\x4c\x00\x4c\x00\x4e\x00\x4e\x00\x09\x00\x62\x00\x63\x00\x45\x00\x65\x00\x55\x00\x55\x00\x56\x00\x4a\x00\x58\x00\x48\x00\x4d\x00\x19\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x2a\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x19\x00\x37\x00\x38\x00\x39\x00\x05\x00\x06\x00\x16\x00\x66\x00\x67\x00\x09\x00\x0a\x00\x6a\x00\x6b\x00\x05\x00\x06\x00\x6e\x00\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\x80\x00\x18\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x8a\x00\x09\x00\x19\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\x09\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0f\x00\x09\x00\x21\x00\x22\x00\x23\x00\x09\x00\x25\x00\x26\x00\x0c\x00\x11\x00\x0e\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x88\x00\x89\x00\x19\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x3b\x00\x3f\x00\x40\x00\x3e\x00\x19\x00\x40\x00\x2a\x00\x29\x00\x2a\x00\x44\x00\x45\x00\x2f\x00\x47\x00\x19\x00\x4c\x00\x4a\x00\x4e\x00\x4c\x00\x19\x00\x4e\x00\x38\x00\x39\x00\x51\x00\x55\x00\x53\x00\x19\x00\x55\x00\x56\x00\x19\x00\x58\x00\x00\x00\x01\x00\x02\x00\x09\x00\x09\x00\x05\x00\x06\x00\x07\x00\x09\x00\x09\x00\x88\x00\x11\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\x46\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x81\x00\x09\x00\x21\x00\x22\x00\x23\x00\x2a\x00\x25\x00\x26\x00\x09\x00\x11\x00\x2f\x00\x88\x00\x3f\x00\x40\x00\x0f\x00\x10\x00\x00\x00\x01\x00\x09\x00\x38\x00\x39\x00\x55\x00\x56\x00\x4a\x00\x09\x00\x4c\x00\x11\x00\x4e\x00\x3b\x00\x55\x00\x56\x00\x3e\x00\x08\x00\x40\x00\x2a\x00\x88\x00\x09\x00\x44\x00\x45\x00\x0c\x00\x47\x00\x0e\x00\x88\x00\x4a\x00\x08\x00\x4c\x00\x36\x00\x4e\x00\x38\x00\x39\x00\x51\x00\x2a\x00\x53\x00\x08\x00\x55\x00\x56\x00\x2f\x00\x58\x00\x01\x00\x02\x00\x09\x00\x83\x00\x05\x00\x06\x00\x07\x00\x38\x00\x39\x00\x09\x00\x11\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\x09\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x88\x00\x09\x00\x21\x00\x22\x00\x23\x00\x2a\x00\x25\x00\x26\x00\x04\x00\x11\x00\x3f\x00\x40\x00\x42\x00\x43\x00\x06\x00\x44\x00\x4e\x00\x46\x00\x37\x00\x38\x00\x39\x00\x4a\x00\x48\x00\x4c\x00\x88\x00\x4e\x00\x0b\x00\x0b\x00\x3b\x00\x09\x00\x09\x00\x3e\x00\x55\x00\x40\x00\x2a\x00\x88\x00\x02\x00\x44\x00\x45\x00\x01\x00\x47\x00\x4b\x00\x03\x00\x4a\x00\x11\x00\x4c\x00\x36\x00\x4e\x00\x38\x00\x39\x00\x51\x00\x50\x00\x53\x00\x55\x00\x55\x00\x56\x00\x4b\x00\x58\x00\x59\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\x01\x00\x02\x00\x09\x00\x04\x00\x05\x00\x06\x00\x07\x00\x24\x00\x41\x00\x4b\x00\x11\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\x55\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x4b\x00\x09\x00\x21\x00\x22\x00\x23\x00\x2a\x00\x25\x00\x26\x00\x41\x00\x11\x00\x3f\x00\x40\x00\x50\x00\x55\x00\x55\x00\x44\x00\x4d\x00\x46\x00\x37\x00\x38\x00\x39\x00\x4a\x00\x55\x00\x4c\x00\x4f\x00\x4e\x00\x54\x00\x46\x00\x3b\x00\x46\x00\x28\x00\x3e\x00\x55\x00\x40\x00\x2a\x00\x55\x00\x28\x00\x44\x00\x45\x00\x2f\x00\x47\x00\x4f\x00\x28\x00\x4a\x00\x4f\x00\x4c\x00\x50\x00\x4e\x00\x38\x00\x39\x00\x28\x00\x28\x00\x53\x00\x50\x00\x55\x00\x56\x00\x55\x00\x58\x00\x01\x00\x02\x00\x09\x00\x4f\x00\x05\x00\x06\x00\x07\x00\x50\x00\x43\x00\x4a\x00\x11\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\x4a\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x4a\x00\x55\x00\x21\x00\x22\x00\x23\x00\x2a\x00\x25\x00\x26\x00\x50\x00\x55\x00\x09\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x0f\x00\x43\x00\x37\x00\x38\x00\x39\x00\x4d\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x55\x00\x3b\x00\x43\x00\x4f\x00\x3e\x00\x54\x00\x40\x00\x21\x00\x22\x00\x23\x00\x44\x00\x45\x00\x07\x00\x47\x00\x54\x00\x54\x00\x4a\x00\x54\x00\x4c\x00\x57\x00\x4e\x00\x10\x00\x54\x00\x54\x00\x54\x00\x53\x00\x29\x00\x55\x00\x56\x00\x18\x00\x58\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x57\x00\x09\x00\x21\x00\x57\x00\x23\x00\x57\x00\x25\x00\x0f\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x15\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x57\x00\x57\x00\x1d\x00\x1e\x00\x1f\x00\x57\x00\x21\x00\x22\x00\x23\x00\x3b\x00\x54\x00\x54\x00\x3e\x00\x3f\x00\x40\x00\x57\x00\x54\x00\x2c\x00\x44\x00\x45\x00\x54\x00\x47\x00\x07\x00\x54\x00\x4a\x00\x54\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x49\x00\x10\x00\x47\x00\x42\x00\x55\x00\x55\x00\x56\x00\x43\x00\x58\x00\x18\x00\x09\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0f\x00\x09\x00\x21\x00\x28\x00\x23\x00\x42\x00\x25\x00\x0f\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x50\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x55\x00\x4f\x00\x46\x00\x20\x00\x21\x00\x22\x00\x23\x00\x3b\x00\x46\x00\x46\x00\x3e\x00\x3f\x00\x40\x00\x31\x00\x32\x00\x33\x00\x44\x00\x45\x00\x4b\x00\x47\x00\x07\x00\x46\x00\x4a\x00\x46\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x46\x00\x10\x00\x4b\x00\x4f\x00\x55\x00\x55\x00\x56\x00\x4f\x00\x58\x00\x18\x00\x09\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0f\x00\x09\x00\x21\x00\x41\x00\x23\x00\x4f\x00\x25\x00\x0f\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x43\x00\x4f\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x29\x00\x55\x00\x43\x00\x20\x00\x21\x00\x22\x00\x23\x00\x3b\x00\x20\x00\x54\x00\x57\x00\x3f\x00\x40\x00\x31\x00\x32\x00\x33\x00\x44\x00\x45\x00\x57\x00\x47\x00\x07\x00\x54\x00\x4a\x00\x54\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x57\x00\x10\x00\x54\x00\x57\x00\x13\x00\x55\x00\x56\x00\x49\x00\x58\x00\x18\x00\x57\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x51\x00\x07\x00\x21\x00\x50\x00\x23\x00\x50\x00\x25\x00\x55\x00\x50\x00\x55\x00\x10\x00\x50\x00\x49\x00\x50\x00\x55\x00\x50\x00\x20\x00\x46\x00\x18\x00\x0a\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0a\x00\x0a\x00\x21\x00\x3b\x00\x23\x00\x55\x00\x25\x00\x3f\x00\x40\x00\x4e\x00\x49\x00\x46\x00\x44\x00\x45\x00\x50\x00\x47\x00\x09\x00\x4b\x00\x4a\x00\x4b\x00\x4c\x00\x4b\x00\x4e\x00\x4b\x00\x42\x00\x59\x00\x4f\x00\x42\x00\x3b\x00\x55\x00\x56\x00\x4f\x00\x58\x00\x40\x00\x4f\x00\x55\x00\x50\x00\x44\x00\x45\x00\x48\x00\x47\x00\x07\x00\x46\x00\x4a\x00\x43\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x59\x00\x10\x00\x59\x00\xff\xff\x13\x00\x55\x00\x56\x00\x50\x00\x58\x00\x18\x00\x09\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0f\x00\x09\x00\x21\x00\xff\xff\x23\x00\xff\xff\x25\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\xff\xff\xff\xff\xff\xff\x20\x00\x21\x00\x22\x00\x23\x00\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x3b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\xff\xff\xff\xff\x2c\x00\x44\x00\x45\x00\x07\x00\x47\x00\xff\xff\xff\xff\x4a\x00\x4b\x00\x4c\x00\xff\xff\x4e\x00\x10\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\x18\x00\x58\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\xff\xff\x09\x00\x21\x00\x0b\x00\x23\x00\xff\xff\x25\x00\x0f\x00\xff\xff\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x3b\x00\xff\xff\xff\xff\xff\xff\x3f\x00\x40\x00\xff\xff\x2b\x00\xff\xff\x44\x00\x45\x00\xff\xff\x47\x00\x07\x00\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\x4e\x00\x4f\x00\xff\xff\x10\x00\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\xff\xff\x58\x00\x18\x00\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\xff\xff\x09\x00\x21\x00\x0b\x00\x23\x00\xff\xff\x25\x00\x0f\x00\xff\xff\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x3b\x00\xff\xff\xff\xff\xff\xff\x3f\x00\x40\x00\xff\xff\x2b\x00\xff\xff\x44\x00\x45\x00\x07\x00\x47\x00\xff\xff\xff\xff\x4a\x00\x4b\x00\x4c\x00\xff\xff\x4e\x00\x10\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\x18\x00\x58\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\xff\xff\x09\x00\x21\x00\xff\xff\x23\x00\xff\xff\x25\x00\x0f\x00\xff\xff\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x3b\x00\xff\xff\xff\xff\xff\xff\x3f\x00\x40\x00\xff\xff\x2b\x00\xff\xff\x44\x00\x45\x00\xff\xff\x47\x00\x07\x00\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\x4e\x00\x4f\x00\xff\xff\x10\x00\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\xff\xff\x58\x00\x18\x00\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\xff\xff\x07\x00\x21\x00\xff\xff\x23\x00\xff\xff\x25\x00\xff\xff\xff\xff\xff\xff\x10\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x18\x00\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\xff\xff\xff\xff\x21\x00\x3b\x00\x23\x00\xff\xff\x25\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\x44\x00\x45\x00\xff\xff\x47\x00\xff\xff\xff\xff\x4a\x00\x4b\x00\x4c\x00\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x55\x00\x56\x00\xff\xff\x58\x00\x40\x00\xff\xff\xff\xff\xff\xff\x44\x00\x45\x00\xff\xff\x47\x00\x07\x00\xff\xff\x4a\x00\xff\xff\x4c\x00\x4d\x00\x4e\x00\x4f\x00\xff\xff\x10\x00\xff\xff\xff\xff\x13\x00\x55\x00\x56\x00\xff\xff\x58\x00\x18\x00\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\xff\xff\x09\x00\x21\x00\xff\xff\x23\x00\xff\xff\x25\x00\x0f\x00\xff\xff\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3f\x00\x40\x00\x1d\x00\x1e\x00\x1f\x00\x44\x00\x21\x00\x22\x00\x23\x00\x3b\x00\xff\xff\x4a\x00\xff\xff\x4c\x00\x40\x00\x4e\x00\x2b\x00\xff\xff\x44\x00\x45\x00\x07\x00\x47\x00\x55\x00\xff\xff\x4a\x00\x4b\x00\x4c\x00\xff\xff\x4e\x00\x10\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\x18\x00\x58\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\xff\xff\x07\x00\x21\x00\xff\xff\x23\x00\xff\xff\x25\x00\xff\xff\xff\xff\xff\xff\x10\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x18\x00\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\xff\xff\xff\xff\x21\x00\x3b\x00\x23\x00\xff\xff\x25\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\x44\x00\x45\x00\xff\xff\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\x4e\x00\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x55\x00\x56\x00\xff\xff\x58\x00\x40\x00\xff\xff\xff\xff\xff\xff\x44\x00\x45\x00\x46\x00\x47\x00\x07\x00\x49\x00\x4a\x00\xff\xff\x4c\x00\xff\xff\x4e\x00\xff\xff\xff\xff\x10\x00\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\xff\xff\x58\x00\x18\x00\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\xff\xff\x07\x00\x21\x00\xff\xff\x23\x00\xff\xff\x25\x00\xff\xff\xff\xff\xff\xff\x10\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x18\x00\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\xff\xff\xff\xff\x21\x00\x3b\x00\x23\x00\xff\xff\x25\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\x44\x00\x45\x00\xff\xff\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x55\x00\x56\x00\xff\xff\x58\x00\x40\x00\xff\xff\xff\xff\xff\xff\x44\x00\x45\x00\xff\xff\x47\x00\x07\x00\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\x4e\x00\x4f\x00\xff\xff\x10\x00\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\xff\xff\x58\x00\x18\x00\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\xff\xff\x07\x00\x21\x00\xff\xff\x23\x00\xff\xff\x25\x00\xff\xff\xff\xff\xff\xff\x10\x00\xff\xff\xff\xff\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\x18\x00\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\xff\xff\xff\xff\x21\x00\x3b\x00\x23\x00\xff\xff\x25\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\x44\x00\x45\x00\xff\xff\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x55\x00\x56\x00\xff\xff\x58\x00\x40\x00\xff\xff\xff\xff\xff\xff\x44\x00\x45\x00\x07\x00\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\x4e\x00\x10\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\x18\x00\x58\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\xff\xff\x07\x00\x21\x00\xff\xff\x23\x00\xff\xff\x25\x00\xff\xff\xff\xff\xff\xff\x10\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x18\x00\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\xff\xff\xff\xff\x21\x00\x3b\x00\x23\x00\xff\xff\x25\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\x44\x00\x45\x00\xff\xff\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x55\x00\x56\x00\xff\xff\x58\x00\x40\x00\xff\xff\xff\xff\xff\xff\x44\x00\x45\x00\xff\xff\x47\x00\x07\x00\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\x4e\x00\x4f\x00\xff\xff\x10\x00\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\xff\xff\x58\x00\x18\x00\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\xff\xff\x07\x00\x21\x00\xff\xff\x23\x00\xff\xff\x25\x00\xff\xff\xff\xff\xff\xff\x10\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x18\x00\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\xff\xff\xff\xff\x21\x00\x3b\x00\x23\x00\xff\xff\x25\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\x44\x00\x45\x00\xff\xff\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x55\x00\x56\x00\xff\xff\x58\x00\x40\x00\xff\xff\xff\xff\xff\xff\x44\x00\x45\x00\xff\xff\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\x18\x00\x58\x00\x1a\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\xff\xff\xff\xff\x21\x00\xff\xff\x3f\x00\x40\x00\x25\x00\xff\xff\xff\xff\x44\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\x18\x00\x4c\x00\x1a\x00\x4e\x00\xff\xff\x1d\x00\x1e\x00\xff\xff\xff\xff\x21\x00\x55\x00\xff\xff\x3b\x00\x25\x00\xff\xff\x3f\x00\x40\x00\x40\x00\xff\xff\xff\xff\x44\x00\x44\x00\x45\x00\xff\xff\xff\xff\xff\xff\x4a\x00\x4a\x00\x4c\x00\x4c\x00\x4e\x00\x4e\x00\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\x55\x00\x55\x00\x56\x00\x40\x00\x58\x00\xff\xff\xff\xff\x44\x00\x45\x00\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\x18\x00\x58\x00\x1a\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\xff\xff\xff\xff\x21\x00\xff\xff\x3f\x00\x40\x00\x25\x00\xff\xff\xff\xff\x44\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\x18\x00\x4c\x00\x1a\x00\x4e\x00\xff\xff\x1d\x00\x1e\x00\xff\xff\xff\xff\x21\x00\x55\x00\xff\xff\x3b\x00\x25\x00\xff\xff\x3f\x00\x40\x00\x40\x00\xff\xff\xff\xff\x44\x00\x44\x00\x45\x00\xff\xff\xff\xff\xff\xff\x4a\x00\x4a\x00\x4c\x00\x4c\x00\x4e\x00\x4e\x00\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\x55\x00\x55\x00\x56\x00\x40\x00\x58\x00\xff\xff\xff\xff\x44\x00\x45\x00\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x55\x00\x56\x00\x18\x00\x58\x00\x1a\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\xff\xff\xff\xff\x21\x00\xff\xff\x3f\x00\x40\x00\x25\x00\xff\xff\xff\xff\x44\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\x18\x00\x4c\x00\x1a\x00\x4e\x00\xff\xff\x1d\x00\x1e\x00\xff\xff\xff\xff\x21\x00\x55\x00\xff\xff\x3b\x00\x25\x00\xff\xff\x3f\x00\x40\x00\x40\x00\xff\xff\xff\xff\x44\x00\x44\x00\x45\x00\xff\xff\xff\xff\xff\xff\x4a\x00\x4a\x00\x4c\x00\x4c\x00\x4e\x00\x4e\x00\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\x55\x00\x55\x00\x56\x00\x40\x00\x58\x00\xff\xff\xff\xff\x44\x00\x45\x00\xff\xff\x09\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\x0f\x00\x4e\x00\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\xff\xff\x55\x00\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0f\x00\x2b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x15\x00\x31\x00\x32\x00\xff\xff\x34\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x09\x00\x2c\x00\x0b\x00\xff\xff\xff\xff\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x09\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x0f\x00\xff\xff\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x09\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x0f\x00\xff\xff\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\x09\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x0f\x00\xff\xff\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x09\x00\xff\xff\xff\xff\xff\xff\x2b\x00\xff\xff\x0f\x00\x09\x00\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x2b\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2b\x00\x0f\x00\x09\x00\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x2b\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2b\x00\x0f\x00\x09\x00\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x2b\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2b\x00\x0f\x00\x09\x00\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x2b\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2b\x00\x0f\x00\x09\x00\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x2b\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2b\x00\x0f\x00\xff\xff\xff\xff\xff\xff\x13\x00\x14\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1d\x00\x1e\x00\x1f\x00\xff\xff\x21\x00\x22\x00\x23\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\x0f\x00\x2b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x09\x00\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\xff\xff\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x3f\x00\x40\x00\xff\xff\x3f\x00\x40\x00\x44\x00\xff\xff\xff\xff\x44\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x4c\x00\x4a\x00\x4e\x00\x4c\x00\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\x55\x00\xff\xff\xff\xff\x55\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x96\x02\x9f\x02\xbd\x01\xbe\x01\x0d\x00\xbd\x01\xbe\x01\x06\x00\xf9\x01\xb3\x01\x0e\x00\x47\x00\x78\x02\x07\x00\x63\x02\xb3\x01\x58\x01\x79\x02\xde\x02\x75\x01\x1c\x02\x58\x01\x7d\x00\x11\x00\x12\x00\x13\x00\x14\x00\x7e\x00\x16\x00\x17\x00\x18\x00\x2e\x02\xcd\x01\x42\x02\x58\x01\xce\x01\x06\x00\xcf\x01\xbd\x01\xbe\x01\x06\x00\x0a\x00\x07\x00\x3b\x01\x49\x02\x5b\x01\x07\x00\x63\x02\xac\x01\x5a\x01\x5b\x01\x13\x02\xcd\x01\x53\x00\x58\x01\xce\x01\xd9\x02\xc8\x02\xfa\x01\xaa\x02\xb3\x01\x59\x01\x5a\x01\x5b\x01\x7f\x00\xe2\x01\xdc\x02\x0d\x00\x5b\x02\x80\x00\x0a\x00\xbf\x01\x81\x00\x0e\x00\x82\x00\x83\x00\x84\x00\x85\x00\x97\x02\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\xb4\x01\x16\x00\x17\x00\xc2\x01\x0a\x00\x2f\x02\xb4\x01\x42\x00\x91\x00\xd0\x01\xd4\x02\x92\x00\x93\x00\xb1\x02\xbf\x01\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\x57\x02\x47\x01\xc0\x01\x94\x01\x0d\x00\x0a\x00\x98\x02\x47\x00\x43\x02\x99\x02\x0e\x00\x3c\x01\x64\x02\x47\x00\xb0\x01\x48\x00\xd7\x02\xb4\x01\x48\x01\x7d\x00\x40\x01\x78\x01\x7d\x00\x11\x00\x12\x00\x13\x00\x14\x00\x7e\x00\x16\x00\x17\x00\x18\x00\xd1\x01\x28\x02\x0d\x00\xb0\x02\xc0\x01\x0d\x00\x2a\x02\xa2\x02\x0e\x00\x7b\x01\x0d\x00\x0e\x00\x90\x01\x47\x00\xe2\x01\xcd\x01\x0e\x00\x3d\x00\xce\x01\x3e\x00\xc9\x02\xd6\x01\x18\x02\x7d\x01\x69\x00\x53\x02\x16\x00\x17\x00\xc2\x01\x16\x00\x17\x00\xc2\x01\x2c\x02\x7f\x00\x16\x00\x17\x00\xc2\x01\xcd\x01\x80\x00\xa5\x02\xce\x01\x81\x00\xcf\x01\x82\x00\x83\x00\x84\x00\x85\x00\xd8\x02\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x0a\x00\x0b\x00\xbb\x01\xe3\x01\xb1\x02\x29\x02\xc1\x02\x42\x00\x91\x00\xa5\x02\x2b\x02\x92\x00\x93\x00\xb5\x02\xbc\x01\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\x0d\x00\xb9\x02\x2d\x02\xa6\x02\x3c\x02\xd5\x02\x0e\x00\x55\x02\xbb\x02\x56\x01\x0d\x00\x70\x02\xc3\x01\x67\x02\xc2\x02\x90\x01\x0e\x00\xbf\x02\x7d\x00\x11\x00\x12\x00\x13\x00\x14\x00\x7e\x00\x16\x00\x17\x00\x18\x00\x3e\x01\x55\x02\xa5\x02\x53\x00\x0d\x00\xa6\x02\xa7\x02\xa8\x02\x38\x01\x54\x01\x0e\x00\x77\x01\xc3\x02\x78\x01\x3e\x01\x47\x01\x3e\x00\x0a\x00\x0b\x00\x92\x02\x0a\x00\x3f\x00\x10\x00\x11\x00\x40\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x0a\x00\x48\x01\x7f\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x80\x00\x41\x00\x3d\x00\x81\x00\x3e\x00\x82\x00\x83\x00\x84\x00\x85\x00\x53\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\xa6\x02\xaa\x02\xa8\x02\xda\x02\xdb\x02\x0a\x00\x67\x02\x42\x00\x91\x00\xab\x02\xc0\x02\x92\x00\x93\x00\xab\x02\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\x0d\x00\x77\xff\xcc\x02\x6a\xff\x42\x00\x43\x00\x0e\x00\xce\x02\x47\x00\xa8\x00\xa9\x00\x6a\xff\x47\x01\x47\x01\x77\xff\x21\x02\x48\x00\x22\x02\x7d\x00\x11\x00\x12\x00\x13\x00\x14\x00\x7e\x00\x16\x00\x17\x00\x18\x00\x9f\x01\x0d\x00\x48\x01\x48\x01\xd6\x02\xad\x02\xae\x02\x0e\x00\xac\x02\xad\x02\xae\x02\x8f\x02\xcd\x01\x3e\x00\x49\x00\x19\x02\x77\x02\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x5f\x01\x13\x00\x14\x00\x90\x01\x16\x00\x17\x00\x52\x01\x4e\x00\x4f\x00\x1f\x02\x94\x02\x20\x02\x7f\x00\x0d\x00\x3d\x00\x41\x00\x3e\x00\x80\x00\x0a\x00\x0e\x00\x81\x00\x61\x02\x82\x00\x83\x00\x84\x00\x85\x00\xd2\x02\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x6d\x00\x47\x00\xdf\x01\x6d\x02\xe0\x01\x75\x02\xe1\x01\x42\x00\x91\x00\xd6\x01\xd7\x01\x92\x00\x93\x00\xe2\x01\x1d\x02\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\x0d\x00\x42\x00\x43\x00\x47\x00\x47\x00\x7a\x02\x0e\x00\x47\x00\x0d\x00\xd3\x02\x06\x00\x48\x00\xd6\x01\xd8\x01\x0e\x00\x48\x00\x07\x00\x92\x01\x7d\x00\x11\x00\x12\x00\x13\x00\x14\x00\x7e\x00\x16\x00\x17\x00\x18\x00\xa7\x01\x12\x00\x13\x00\x14\x00\x7e\x00\x16\x00\x17\x00\x18\x00\x67\x02\x65\x00\x0d\x00\x06\x00\x68\x02\xc5\x01\x47\x00\x67\x02\x0e\x00\x07\x00\x3e\x01\x6b\x02\x66\x00\x67\x00\x48\x00\x68\x00\x69\x00\x7d\x02\x2f\x02\xc7\x01\x69\x00\x84\x02\x77\x00\x13\x00\x14\x00\x7f\x00\x16\x00\x17\x00\x52\x01\xcd\x01\x80\x00\xfc\x01\xce\x01\x81\x00\xca\x02\x82\x00\x83\x00\x84\x00\x85\x00\xc5\x01\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\xfe\x01\x31\x02\xc7\x01\x69\x00\xff\x01\x47\x00\xcd\x01\x42\x00\x91\x00\x19\x02\x1a\x02\x92\x00\x93\x00\xd6\x01\xd9\x01\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\x0d\x00\x6a\xff\x47\x00\x04\x02\x47\x00\x05\x02\x0e\x00\x47\x00\x0d\x00\xdd\x02\x48\x00\x6a\xff\x48\x00\x6a\xff\x0e\x00\x48\x00\xc4\x02\xc5\x02\x7d\x00\x11\x00\x12\x00\x13\x00\x14\x00\x7e\x00\x16\x00\x17\x00\x18\x00\x4f\x01\x12\x00\x13\x00\x14\x00\x7e\x00\x16\x00\x17\x00\x18\x00\xc5\x01\xcd\x01\x7b\x01\x0d\x00\xce\x01\x7b\x01\xcb\x02\x97\x01\xcd\x01\x0e\x00\x98\x01\x19\x02\x1c\x02\x3d\x02\xc7\x01\x69\x00\x7d\x01\x69\x00\xcd\x01\x7d\x01\x69\x00\xce\x01\x08\x02\x90\x02\x09\x02\x7f\x00\xe5\x01\x16\x00\x17\x00\x5f\x00\x80\x00\x16\x02\xdc\x01\x81\x00\xdd\x01\x82\x00\x83\x00\x84\x00\x85\x00\x0a\x02\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\xcd\x01\xcd\x01\x47\x00\xce\x01\xce\x01\x91\x02\x25\x02\x42\x00\x91\x00\x0c\x02\x48\x00\x92\x00\x93\x00\xc6\x02\xc7\x02\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\x0d\x00\xc5\x01\x47\x00\x0d\x02\x33\x01\x47\x00\x0e\x00\x34\x01\x7a\x00\xd1\x02\x48\x00\x7b\x00\x1d\x02\x48\x00\xc6\x01\xc7\x01\x69\x00\x51\x02\x7d\x00\x11\x00\x12\x00\x13\x00\x14\x00\x7e\x00\x16\x00\x17\x00\x18\x00\x06\x00\x2a\x00\x73\x00\x53\x02\x0d\x00\x9d\x01\x07\x00\x08\x00\xc5\x01\xa2\x01\x0e\x00\xc5\x01\x6b\x00\x54\x01\x74\x00\x55\x01\x75\x00\x56\x01\x8a\x02\x8b\x02\x9f\x01\xc8\x01\xc7\x01\x69\x00\xc9\x01\xc7\x01\x69\x00\x78\x00\x16\x00\x17\x00\x5f\x00\x44\x02\xb2\x02\x7f\x00\xa5\x01\x39\x02\x3a\x02\x3b\x02\x80\x00\x3c\x02\xaa\x01\x81\x00\xb1\x01\x82\x00\x83\x00\x84\x00\x85\x00\xb9\x01\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\xb5\x01\x5c\x00\x47\x00\x5d\x00\xc1\x01\x5e\x00\xe6\x01\x42\x00\x91\x00\xe7\x01\x48\x00\x92\x00\x93\x00\x8d\x02\x8b\x02\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\x0d\x00\xc5\x01\x47\x00\xe9\x01\x47\x00\x0d\x00\x0e\x00\xbd\x01\x71\x02\xbc\x01\x48\x00\x0e\x00\x48\x00\xea\x01\xca\x01\xc7\x01\x69\x00\xeb\x01\x7d\x00\x11\x00\x12\x00\x13\x00\x14\x00\x7e\x00\x16\x00\x17\x00\x18\x00\x18\x02\x5e\x00\x16\x00\x17\x00\x5f\x00\xec\x01\x0d\x00\xdf\x01\xc5\x01\xe0\x01\x7b\x01\xe1\x01\x0e\x00\x44\x02\xb3\x02\x7c\x01\x33\x00\x5d\x01\xe2\x01\x44\x02\x62\x02\xcb\x01\xc7\x01\x69\x00\x7d\x01\x69\x00\x51\x01\x13\x00\x14\x00\xed\x01\x16\x00\x17\x00\x52\x01\x7f\x00\x44\x02\x65\x02\x0d\x00\xee\x01\x80\x00\xef\x01\x37\x00\x81\x00\x0e\x00\x82\x00\x83\x00\x84\x00\x85\x00\xf4\x01\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\xfa\x01\x16\x00\x17\x00\x4d\x01\xbd\x01\x72\x02\xf7\x01\x42\x00\x91\x00\xbd\x01\x73\x02\x92\x00\x93\x00\xbd\x01\x74\x02\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\x60\x02\x35\x02\x36\x02\x37\x02\xb3\x01\x1e\x00\x47\x00\x10\x02\x11\x02\x56\x01\xab\x00\xac\x00\xad\x00\xa3\xfe\x48\x00\x13\x02\x14\x02\x22\x02\x23\x02\xae\x00\xaf\x00\xb0\x00\xb1\x00\x9b\x02\x9c\x02\x9d\x02\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\x20\x00\x21\x00\x22\x00\xba\x00\xbb\x00\x65\x00\xb4\x02\x34\x02\x35\x02\x36\x02\x37\x02\xa1\x02\x34\x02\x35\x02\x36\x02\x37\x02\x28\x01\x60\x01\x2a\x01\x68\x00\x69\x00\x2b\x01\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\xbc\x00\x29\x00\xd3\x01\xd4\x01\xbd\x00\x2c\x01\x58\x00\x3e\x02\x3f\x02\x2d\x01\x2c\x00\x2d\x00\x2e\x01\x2e\x00\x2f\x01\xd5\x01\x61\x00\xd6\x01\x62\x00\x30\x01\x63\x00\xbd\x01\x41\x02\xb4\x01\x0a\x00\xbe\x00\x31\x01\x0a\x00\x0b\x00\x34\x01\x32\x00\xb3\x01\x1e\x00\x47\x00\x44\x02\x45\x02\x35\x01\xab\x00\xac\x00\xad\x00\xa3\xfe\x48\x00\x71\x00\x1c\x00\x47\x00\x0d\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\x36\x01\x0e\x00\x48\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\x20\x00\x21\x00\x22\x00\xba\x00\xbb\x00\x65\x00\x32\x00\x05\x00\x16\x00\x17\x00\x56\x00\xa4\x02\x34\x02\x35\x02\x36\x02\x37\x02\x7b\x01\x63\x01\x39\x01\x68\x00\x69\x00\x83\x01\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\xbc\x00\x29\x00\x7d\x01\x69\x00\xbd\x00\x3a\x01\x58\x00\x0a\x00\x0b\x00\x40\x01\x2c\x00\x2d\x00\x42\x01\x2e\x00\x4a\x01\x4b\x01\x61\x00\x43\x01\x62\x00\x48\x01\x63\x00\x0a\x00\x0b\x00\xb4\x01\x45\x01\xbe\x00\x1e\x00\x0a\x00\x0b\x00\x53\x00\x32\x00\xab\x00\xac\x00\xad\x00\x4b\x01\x5c\x00\x84\x01\x7a\x01\x8b\x01\x7b\x01\xae\x00\xaf\x00\xb0\x00\xb1\x00\x8c\x01\x63\x00\x0a\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\x20\x00\x21\x00\x22\x00\xba\x00\xbb\x00\x56\x02\x34\x02\x35\x02\x36\x02\x37\x02\x33\x02\x34\x02\x35\x02\x36\x02\x37\x02\xda\x01\xdb\x01\xdc\x01\x64\x00\xdd\x01\xbe\x00\x6f\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\xbc\x00\x29\x00\x05\x00\x0b\x00\xbd\x00\x0a\x00\x58\x00\xd1\x02\xb0\x02\xb7\x02\x2c\x00\x2d\x00\xb8\x02\x2e\x00\xb9\x02\xbb\x02\x61\x00\xbe\x02\x62\x00\x0a\x00\x63\x00\x0a\x00\x0a\x00\x5a\xfe\xbd\x02\xbe\x00\x6a\x02\x0a\x00\x0b\x00\x8a\x02\x32\x00\x5a\xfe\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\x01\x01\x01\x02\x01\x03\x01\x04\x01\x05\x01\x06\x01\x07\x01\x08\x01\x09\x01\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x1e\x00\x6f\x02\xe2\x01\xce\x02\xe2\x01\xab\x00\xac\x00\xad\x00\xd0\x02\x8d\x02\x8f\x02\x94\x02\xe2\x01\x96\x02\xae\x00\xaf\x00\xb0\x00\xb1\x00\x9b\x02\x9e\x02\x9f\x02\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\x20\x00\x21\x00\x22\x00\xba\x00\xbb\x00\xa1\x02\x47\x02\x59\x02\x5a\x02\x0a\x00\x5d\x02\x5e\x02\x5f\x02\x60\x02\x47\x02\x6a\x02\x6f\x02\x0a\x00\xe2\x01\x77\x02\x7c\x02\x7d\x02\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\xbc\x00\x29\x00\xe2\x01\x7f\x02\xbd\x00\x80\x02\x58\x00\x82\x02\x83\x02\xfc\x01\x2c\x00\x2d\x00\x84\x02\x2e\x00\x86\x02\x87\x02\x61\x00\x1e\x00\x62\x00\x88\x02\x63\x00\x89\x02\xab\x00\xac\x00\xad\x00\xbe\x00\xfc\x01\x0a\x00\x0b\x00\xfe\x01\x32\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xe9\x01\x01\x02\x02\x02\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\x20\x00\x21\x00\x22\x00\xba\x00\xbb\x00\x03\x02\x04\x02\xfc\x01\xb7\x01\x2a\x01\x07\x02\x08\x02\xfc\x01\x0c\x02\x10\x02\x16\x02\x25\x02\x31\x02\x41\x02\x0a\x00\x1e\x00\x47\x02\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\xbc\x00\x29\x00\x0a\x00\x2b\xff\xbd\x00\x4b\x02\x58\x00\x2c\xff\x28\xff\x1f\x00\x2c\x00\x2d\x00\x0a\x00\x2e\x00\x26\xff\x27\xff\x61\x00\xa1\x01\x62\x00\xa4\x01\x63\x00\x20\x00\x21\x00\x22\x00\xa2\x01\xbe\x00\xa5\x01\x0a\x00\x0b\x00\xa7\x01\x32\x00\xac\x01\xae\x01\xaf\x01\xb7\x01\xb0\x01\xe5\x01\x4d\x01\x0a\x00\x2a\x01\xf2\x01\xf3\x01\xe9\x01\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\xf1\x01\x29\x00\xe9\x01\xf7\x01\xbf\x02\x2a\x00\x2b\x00\x1e\x00\xf4\x01\xf6\x01\x2c\x00\x2d\x00\x71\x00\x2e\x00\x0a\x00\xe9\x01\x2f\x00\xfc\x01\x30\x00\x3d\x00\x31\x00\x3e\x00\x45\x01\x38\x01\x1f\x00\x0a\x00\x42\x01\x0a\x00\x0b\x00\x0d\x00\x32\x00\x71\x00\x7b\x00\x4d\x01\x58\x01\x0e\x00\x20\x00\x21\x00\x22\x00\x0a\x00\x5d\x01\x3e\x00\x62\x01\x65\x01\x66\x01\x82\x01\x67\x01\x71\x00\x87\x01\x5f\x01\x13\x00\x14\x00\x86\x01\x16\x00\x17\x00\x52\x01\x8a\x01\x88\x01\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x6c\x01\x29\x00\x89\x01\x8b\x01\x33\x02\x2a\x00\x2b\x00\x1e\x00\x8e\x01\x8f\x01\x2c\x00\x2d\x00\x90\x01\x2e\x00\xff\xff\x71\x00\x2f\x00\x0a\x00\x30\x00\x3d\x00\x31\x00\x3e\x00\x76\x00\xff\xff\x1f\x00\x7c\x00\x0d\x00\x0a\x00\x0b\x00\x7d\x00\x32\x00\x0d\x00\x0e\x00\xff\xff\x00\x00\x00\x00\x20\x00\x21\x00\x22\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x02\x13\x00\x14\x00\x6e\x01\x16\x00\x17\x00\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x29\x00\x4d\x02\x4e\x02\x4f\x02\x2a\x00\x2b\x00\x45\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x46\x00\x00\x00\x2f\x00\x00\x00\x30\x00\x3d\x00\x31\x00\x3e\x00\x00\x00\x00\x00\x1f\x00\x00\x00\x0d\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x20\x00\x21\x00\x22\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x02\x13\x00\x14\x00\x6e\x01\x16\x00\x17\x00\x18\x00\x00\x00\x00\x00\x00\x00\x1e\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x29\x00\x4d\x02\x4e\x02\x50\x02\x2a\x00\x2b\x00\x00\x00\x00\x00\x1f\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x00\x00\x00\x00\x2f\x00\x47\x00\x30\x00\x00\x00\x31\x00\x20\x00\x21\x00\x22\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x29\x00\x00\x00\x00\x00\x00\x00\x45\x00\x58\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x46\x00\x2e\x00\x00\x00\x00\x00\x61\x00\x0d\x00\x62\x00\x3d\x00\x63\x00\x3e\x00\x1f\x00\x0e\x00\x00\x00\x0d\x00\x00\x00\x0a\x00\x0b\x00\x3e\x00\x32\x00\x0e\x00\x00\x00\x00\x00\x20\x00\x21\x00\x22\x00\x5f\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x00\x00\x77\x00\x13\x00\x14\x00\x78\x00\x16\x00\x17\x00\x18\x00\x69\x01\x00\x00\x1e\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x58\x00\x00\x00\x00\x00\x1f\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x00\x00\x00\x00\x61\x00\x97\x01\x62\x00\x00\x00\x63\x00\x20\x00\x21\x00\x22\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x29\x00\x1e\x00\x00\x00\x00\x00\x2a\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x00\x00\x00\x00\x2f\x00\x0d\x00\x30\x00\x1f\x00\x31\x00\x39\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x3e\x00\x32\x00\x20\x00\x21\x00\x22\x00\x3f\x00\x10\x00\x11\x00\x40\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x00\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1e\x00\x6c\x01\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x29\x00\x00\x00\x00\x00\x00\x00\x2a\x00\x2b\x00\x00\x00\x00\x00\x1f\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x00\x00\x00\x00\x2f\x00\x47\x00\x30\x00\x00\x00\x31\x00\x20\x00\x21\x00\x22\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x29\x00\x1e\x00\x00\x00\x00\x00\x2a\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x00\x00\x00\x00\x2f\x00\x0d\x00\x30\x00\x1f\x00\x31\x00\x39\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x20\x00\x21\x00\x22\x00\x5a\x02\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x00\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1e\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x29\x00\x00\x00\x00\x00\x00\x00\x2a\x00\x2b\x00\x00\x00\x00\x00\x1f\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x00\x00\x00\x00\x2f\x00\x47\x00\x30\x00\x00\x00\x31\x00\x20\x00\x21\x00\x22\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x29\x00\x00\x00\x00\x00\x00\x00\x45\x00\x58\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x46\x00\x2e\x00\x00\x00\x00\x00\x61\x00\x00\x00\x62\x00\x3d\x00\x63\x00\x3e\x00\x1f\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x0e\x00\x32\x00\x00\x00\x00\x00\x00\x00\x20\x00\x21\x00\x22\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x01\x11\x00\x12\x00\x13\x00\x14\x00\x7e\x00\x16\x00\x17\x00\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1e\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x58\x00\x00\x00\x00\x00\x1f\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x00\x00\x00\x00\x61\x00\x75\x01\x62\x00\x00\x00\x63\x00\x20\x00\x21\x00\x22\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x29\x00\x1e\x00\x00\x00\x00\x00\x2a\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x00\x00\x00\x00\x2f\x00\x0d\x00\x30\x00\x1f\x00\x31\x00\x39\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x20\x00\x21\x00\x22\x00\x66\x02\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x00\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1e\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x58\x00\x00\x00\x00\x00\x1f\x00\x2c\x00\x2d\x00\x5c\xff\x2e\x00\x00\x00\x5c\xff\x61\x00\x00\x00\x62\x00\x00\x00\x63\x00\x20\x00\x21\x00\x22\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1e\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x29\x00\x00\x00\x00\x00\x00\x00\x2a\x00\x2b\x00\x00\x00\x00\x00\x1f\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x00\x00\x00\x00\x2f\x00\x00\x00\x30\x00\x00\x00\x31\x00\x20\x00\x21\x00\x22\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x29\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x58\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x00\x00\x00\x00\x61\x00\x0d\x00\x62\x00\x1f\x00\x63\x00\x95\x01\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x20\x00\x21\x00\x22\x00\x6a\x02\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x00\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x29\x00\x45\x00\x00\x00\x00\x00\x2a\x00\x2b\x00\x00\x00\x00\x00\x46\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x00\x00\x26\x02\x2f\x00\x00\x00\x30\x00\x1f\x00\x31\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x33\x00\x5d\x01\x0a\x00\x0b\x00\x00\x00\x32\x00\x20\x00\x21\x00\x22\x00\x00\x00\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\xac\x01\x5a\x01\x5b\x01\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x1e\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x58\x00\x00\x00\x00\x00\x1f\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x00\x00\x00\x00\x61\x00\x00\x00\x62\x00\x00\x00\x63\x00\x20\x00\x21\x00\x22\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1e\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x29\x00\x00\x00\x00\x00\x00\x00\x2a\x00\x2b\x00\x00\x00\x00\x00\x1f\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x00\x00\x00\x00\x2f\x00\x00\x00\x30\x00\x00\x00\x31\x00\x20\x00\x21\x00\x22\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x29\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x58\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x00\x00\x00\x00\x61\x00\x0d\x00\x62\x00\x1f\x00\x63\x00\x73\x01\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x20\x00\x21\x00\x22\x00\x6c\x02\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x00\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1e\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x29\x00\x00\x00\x00\x00\x00\x00\x2a\x00\x2b\x00\x00\x00\x00\x00\x1f\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x00\x00\x00\x00\x2f\x00\x00\x00\x30\x00\x00\x00\x31\x00\x20\x00\x21\x00\x22\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x29\x00\x1f\x00\x00\x00\x00\x00\x00\x00\x58\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x20\x00\x21\x00\x61\x00\x00\x00\x62\x00\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x25\x00\x26\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x00\x00\x51\x00\x52\x00\x58\x00\x20\x00\x21\x00\x53\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x6b\x00\x61\x00\x6c\x00\xa4\x02\x6d\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x25\x00\x26\x00\x00\x00\x28\x00\x1f\x00\x29\x00\x00\x00\x00\x00\x51\x00\x52\x00\x58\x00\x00\x00\x00\x00\x53\x00\x2c\x00\x2d\x00\x20\x00\x21\x00\x00\x00\x7f\x01\x61\x00\x80\x01\x62\x00\x81\x01\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x25\x00\x26\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x00\x00\x51\x00\x52\x00\x58\x00\x20\x00\x21\x00\x53\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x6b\x00\x61\x00\x6c\x00\xc5\x01\x6d\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x25\x00\x26\x00\x00\x00\x28\x00\x1f\x00\x29\x00\x00\x00\x00\x00\x51\x00\x52\x00\x58\x00\x00\x00\x00\x00\x53\x00\x2c\x00\x2d\x00\x20\x00\x21\x00\x00\x00\x6b\x00\x61\x00\x6c\x00\x62\x00\xcd\x01\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x25\x00\x26\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x00\x00\x51\x00\x52\x00\x58\x00\x20\x00\x21\x00\x53\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x7f\x01\x61\x00\x80\x01\x62\x00\x81\x01\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x25\x00\x26\x00\x00\x00\x28\x00\x1f\x00\x29\x00\x00\x00\x00\x00\x51\x00\x52\x00\x58\x00\x00\x00\x00\x00\x53\x00\x2c\x00\x2d\x00\x20\x00\x21\x00\x00\x00\x6b\x00\x61\x00\x6c\x00\x62\x00\x6d\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x25\x00\x26\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x00\x00\x51\x00\x52\x00\x58\x00\x20\x00\x21\x00\x53\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x7f\x01\x59\x00\x80\x01\x5a\x00\x81\x01\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x25\x00\x26\x00\x00\x00\x28\x00\x1f\x00\x29\x00\x00\x00\x00\x00\x51\x00\x52\x00\x58\x00\x00\x00\x00\x00\x53\x00\x2c\x00\x2d\x00\x20\x00\x21\x00\x00\x00\x54\x00\x61\x00\x55\x00\x62\x00\x56\x00\x63\x00\x00\x00\x00\x00\x0d\x00\x00\x00\x95\x01\x0a\x00\x0a\x00\x0b\x00\x0e\x00\x32\x00\x00\x00\x00\x00\x5e\x01\x34\x00\x00\x00\x25\x00\x26\x00\x00\x00\x28\x00\x00\x00\x29\x00\x00\x00\x51\x01\x13\x00\x14\x00\x58\x00\x16\x00\x17\x00\x52\x01\x2c\x00\x2d\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x61\x00\x3b\x00\x62\x00\x0e\x00\x6f\x00\x00\x00\x00\x00\x33\x00\x5d\x01\x00\x00\x00\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x00\x00\x00\x00\x6d\x01\x13\x00\x14\x00\x6e\x01\x16\x00\x17\x00\x18\x00\x0d\x00\x00\x00\x39\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x37\x00\x00\x00\x00\x00\x33\x00\x34\x00\x00\x00\x6f\x01\x70\x01\x00\x00\x71\x01\x3a\x00\x10\x00\x11\x00\x36\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x00\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x6b\x01\x0d\x00\x00\x00\x39\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x33\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x10\x00\x11\x00\x36\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x00\x00\x0d\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x3b\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x33\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x35\x00\x10\x00\x11\x00\x36\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x00\x00\x0d\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x6a\x01\x0e\x00\x00\x00\x00\x00\x00\x00\x33\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x35\x00\x10\x00\x11\x00\x36\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x00\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x37\x00\x0d\x00\x00\x00\x73\x01\x00\x00\x00\x00\x00\x00\x0e\x00\x0d\x00\x00\x00\x00\x00\x5e\x01\x34\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x99\x01\x34\x00\x00\x00\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x3b\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x67\x01\x0e\x00\x0d\x00\x00\x00\x00\x00\x9a\x01\x34\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x9b\x01\x34\x00\x00\x00\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x68\x01\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6a\x01\x0e\x00\x0d\x00\x00\x00\x00\x00\x9c\x01\x34\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x33\x00\x34\x00\x00\x00\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x6b\x01\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6a\x01\x0e\x00\x0d\x00\x00\x00\x00\x00\x33\x00\x34\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x33\x00\x34\x00\x00\x00\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x6b\x01\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x0e\x00\x0d\x00\x00\x00\x00\x00\x33\x00\x34\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x33\x00\x5d\x01\x00\x00\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x3b\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x0e\x00\x0d\x00\x00\x00\x00\x00\x5e\x01\x34\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x33\x00\x34\x00\x00\x00\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x3b\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x67\x01\x0e\x00\x00\x00\x00\x00\x00\x00\x33\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x0d\x00\x00\x00\x39\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x68\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x02\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x02\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x02\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x47\x02\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x48\x02\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x02\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x90\x01\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x91\x01\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x01\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa9\x01\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x01\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x01\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x01\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x01\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x50\x01\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x62\x01\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x35\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x01\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x76\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x00\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0f\xff\x0f\xff\x00\x00\x51\x00\x52\x00\x0f\xff\x00\x00\x0f\xff\x53\x00\x00\x00\x29\xff\x0f\xff\x00\x00\x0f\xff\x7f\x01\x0f\xff\x80\x01\x00\x00\x81\x01\x51\x00\x52\x00\x00\x00\x0f\xff\x00\x00\x53\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6b\x00\x00\x00\x6c\x00\x00\x00\x6d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01\x20\x01\x21\x01\x22\x01\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\x28\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#
+happyTable = HappyA# "\x00\x00\x90\x02\xb0\x02\x9e\x02\x5f\x01\x0d\x00\xd6\x01\xd7\x01\x06\x00\xa3\x02\xb1\x01\x0e\x00\x47\x00\x5b\x02\x07\x00\x6a\x02\xb1\x01\xb4\x02\xfb\x01\x2c\x02\x48\x00\x32\x02\x61\x01\x7d\x00\x11\x00\x12\x00\x13\x00\x14\x00\x7e\x00\x16\x00\x17\x00\x18\x00\xbb\x01\xc1\x01\x45\x02\x26\x02\xc2\x01\x06\x00\xc3\x01\xd6\x01\xd7\x01\x06\x00\x0a\x00\x07\x00\x35\x01\x69\x00\x2d\x02\x07\x00\x6a\x02\xfc\x01\x49\x02\x64\x01\x27\x02\xda\x02\xdb\x02\xbc\x01\x6a\x00\x6b\x00\x28\x02\x6c\x00\x6d\x00\xb1\x01\xd6\x01\xd7\x01\xd6\x02\x7f\x00\x29\x02\xa4\x02\x0d\x00\x94\x01\x80\x00\x0a\x00\xd8\x01\x81\x00\x0e\x00\x82\x00\x83\x00\x84\x00\x85\x00\x91\x02\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\xb2\x01\x16\x00\x17\x00\xd1\x01\x0a\x00\xac\x01\xb2\x01\x42\x00\x91\x00\xc4\x01\x7d\x00\x92\x00\x93\x00\xa5\x02\xd8\x01\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\x59\x02\x47\x01\xd9\x01\x75\x02\x0d\x00\x47\x00\x92\x02\x47\x00\x46\x02\x93\x02\x0e\x00\x36\x01\x6b\x02\xca\x01\x2e\x02\x48\x00\xde\x02\xb2\x01\x48\x01\x90\x01\x19\x02\x61\x01\x7d\x00\x11\x00\x12\x00\x13\x00\x14\x00\x7e\x00\x16\x00\x17\x00\x18\x00\xc5\x01\x53\x02\x0d\x00\x38\x01\xd9\x01\x0d\x00\x99\x02\xa7\x02\x0e\x00\x7b\x01\x0d\x00\x0e\x00\x90\x01\xd9\x02\xd4\x01\x1a\x02\x0e\x00\xa8\x01\x63\x01\x64\x01\x0a\x00\x0b\x00\xdc\x02\x7d\x01\x6d\x00\x55\x02\x16\x00\x17\x00\xd1\x01\x16\x00\x17\x00\xd1\x01\x61\x01\x7f\x00\x16\x00\x17\x00\xd1\x01\xc1\x01\x80\x00\x34\x01\xc2\x01\x81\x00\xc3\x01\x82\x00\x83\x00\x84\x00\x85\x00\x3d\x02\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x62\x01\x63\x01\x64\x01\xd5\x01\x9a\x02\x9b\x02\x9c\x02\x42\x00\x91\x00\x99\x02\x40\x02\x92\x00\x93\x00\x99\x02\x3e\x02\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\x0d\x00\xd7\x02\x41\x02\x12\x02\x29\x02\x47\x00\x0e\x00\x55\x02\xd8\x02\x5d\x01\x0d\x00\x61\x02\xd2\x01\x75\x01\x0a\x00\x0b\x00\x0e\x00\xe4\x01\x7d\x00\x11\x00\x12\x00\x13\x00\x14\x00\x7e\x00\x16\x00\x17\x00\x18\x00\x47\x01\x53\x00\x38\x01\x9e\x02\x0d\x00\x9a\x02\xa4\x02\x9c\x02\x2c\x01\x9a\x02\x0e\x00\xd4\x02\x47\x00\xbd\x02\x9f\x01\x47\x01\x3e\x00\x48\x01\x0a\x00\x0a\x00\x78\x01\x3f\x00\x10\x00\x11\x00\x40\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\xc1\x02\x48\x01\x7f\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x80\x00\x41\x00\x3d\x00\x81\x00\x3e\x00\x82\x00\x83\x00\x84\x00\x85\x00\x53\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\xd5\x02\xa0\x02\xa1\x02\xc2\x02\x35\x02\x0a\x00\x36\x02\x42\x00\x91\x00\x9e\x02\xc6\x02\x92\x00\x93\x00\x0a\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\x0d\x00\x77\xff\x90\x01\x5b\x02\x42\x00\x43\x00\x0e\x00\xb5\x02\x47\x00\xa8\x00\xa9\x00\x0d\x00\x47\x01\x3d\x00\x77\xff\x3e\x00\x48\x00\x0e\x00\x7d\x00\x11\x00\x12\x00\x13\x00\x14\x00\x7e\x00\x16\x00\x17\x00\x18\x00\xc5\x02\x0d\x00\x48\x01\x47\x00\x9f\x02\xa0\x02\xa1\x02\x0e\x00\x16\x00\x17\x00\x4d\x01\xca\x01\xcb\x01\x3e\x00\x49\x00\xc7\x02\x6a\xff\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x58\x01\x13\x00\x14\x00\x6a\xff\x16\x00\x17\x00\x52\x01\x4e\x00\x4f\x00\x8a\x02\x8b\x02\xc1\x01\x7f\x00\x0d\x00\xc2\x01\x41\x00\xb6\x02\x80\x00\x3b\x01\x0e\x00\x81\x00\x3c\x01\x82\x00\x83\x00\x84\x00\x85\x00\xd2\x02\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x63\x00\x47\x00\xe1\x01\x37\x02\xe2\x01\x38\x02\xe3\x01\x42\x00\x91\x00\xca\x01\xcc\x01\x92\x00\x93\x00\xe4\x01\xab\x02\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\x0d\x00\x42\x00\x43\x00\x47\x00\x47\x00\xcc\x02\x0e\x00\x47\x00\x0d\x00\xd3\x02\x06\x00\x48\x00\xca\x01\xcd\x01\x0e\x00\x48\x00\x07\x00\x92\x01\x7d\x00\x11\x00\x12\x00\x13\x00\x14\x00\x7e\x00\x16\x00\x17\x00\x18\x00\xa7\x01\x12\x00\x13\x00\x14\x00\x7e\x00\x16\x00\x17\x00\x18\x00\x6a\xff\xbd\x01\x0d\x00\xce\x02\xc1\x01\xbd\x01\x79\x02\xc2\x01\x0e\x00\xb7\x02\x6a\xff\x7a\x02\x6a\xff\x5b\x02\x2a\x02\xbf\x01\x6d\x00\x5c\x02\x3e\x02\xbf\x01\x6d\x00\x8f\x02\x77\x00\x13\x00\x14\x00\x7f\x00\x16\x00\x17\x00\x52\x01\xc1\x01\x80\x00\x33\x02\xc2\x01\x81\x00\xb8\x02\x82\x00\x83\x00\x84\x00\x85\x00\xad\x02\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x66\x02\xc1\x01\x7a\x00\x06\x00\xc2\x01\x7b\x00\xb9\x02\x42\x00\x91\x00\x07\x00\x32\x01\x92\x00\x93\x00\xc8\x02\xc9\x02\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\x0d\x00\x54\x01\x20\x00\x55\x01\x21\x00\x56\x01\x0e\x00\x24\x00\x25\x00\xdd\x02\x0d\x00\x26\x00\x7b\x02\x5b\x02\x72\x02\x28\x00\x0e\x00\x5f\x02\x7d\x00\x11\x00\x12\x00\x13\x00\x14\x00\x7e\x00\x16\x00\x17\x00\x18\x00\x77\x02\xb4\x01\x11\x00\x12\x00\x13\x00\x14\x00\x7e\x00\x16\x00\x17\x00\x18\x00\x29\x00\xca\x02\xcb\x02\xc1\x01\x47\x00\x58\x00\xc2\x01\x17\x02\xa9\x02\x2c\x00\x2d\x00\x3d\x00\x48\x00\x3e\x00\xe1\x01\x61\x00\xe2\x01\xa9\x02\xe3\x01\x63\x00\x5c\x00\x7e\x02\x5d\x00\x7f\x00\x5e\x00\xe4\x01\x0a\x00\x0b\x00\x80\x00\x32\x00\x85\x02\x81\x00\xfc\x01\x82\x00\x83\x00\x84\x00\x85\x00\xbd\x01\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\xfd\x01\x41\x02\xbf\x01\x6d\x00\x8d\x02\x8b\x02\xc1\x01\x42\x00\x91\x00\x2f\x02\x68\x02\x92\x00\x93\x00\x42\x02\xb2\x02\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\x0d\x00\xfe\x01\x20\x00\x00\x02\x21\x00\x01\x02\x0e\x00\x24\x00\x25\x00\xd1\x02\x0d\x00\x26\x00\x42\x02\xb3\x02\x03\x02\x28\x00\x0e\x00\x04\x02\x7d\x00\x11\x00\x12\x00\x13\x00\x14\x00\x7e\x00\x16\x00\x17\x00\x18\x00\xd6\x01\x62\x02\x4f\x01\x12\x00\x13\x00\x14\x00\x7e\x00\x16\x00\x17\x00\x18\x00\x29\x00\xd6\x01\x63\x02\xc1\x01\x47\x00\x58\x00\x2f\x02\x30\x02\x53\x00\x2c\x00\x2d\x00\x08\x02\x48\x00\x0d\x02\x54\x01\x61\x00\x77\x01\x62\x00\x78\x01\x63\x00\xdc\x01\xdd\x01\xde\x01\x7f\x00\xdf\x01\x0a\x00\x0a\x00\x0b\x00\x80\x00\x32\x00\x51\x02\x81\x00\x0c\x02\x82\x00\x83\x00\x84\x00\x85\x00\xbd\x01\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x33\x02\xbe\x01\xbf\x01\x6d\x00\xd6\x01\x64\x02\xc1\x01\x42\x00\x91\x00\x2f\x02\x32\x02\x92\x00\x93\x00\xd6\x01\x65\x02\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\x0d\x00\x53\x02\x20\x00\x9d\x01\x21\x00\x9f\x01\x0e\x00\x24\x00\x25\x00\xbc\x01\x0d\x00\x26\x00\x42\x02\x69\x02\xa2\x01\x28\x00\x0e\x00\xa5\x01\x7d\x00\x11\x00\x12\x00\x13\x00\x14\x00\x7e\x00\x16\x00\x17\x00\x18\x00\x42\x02\x6c\x02\xaf\x01\x77\x00\x13\x00\x14\x00\x78\x00\x16\x00\x17\x00\x18\x00\x29\x00\x0f\x02\x10\x02\xb2\x01\x47\x00\x58\x00\x12\x02\x13\x02\x53\x00\x2c\x00\x2d\x00\xb9\x01\x48\x00\xb5\x01\x5c\x00\x61\x00\x7a\x01\xd4\x01\x7b\x01\x63\x00\xd0\x01\x15\x02\xde\x01\x7f\x00\xdf\x01\x0a\x00\x0a\x00\x0b\x00\x80\x00\x32\x00\xe6\x01\x81\x00\xe8\x01\x82\x00\x83\x00\x84\x00\x85\x00\xbd\x01\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\xea\x01\xc0\x01\xbf\x01\x6d\x00\x1a\x02\x1b\x02\xeb\x01\x42\x00\x91\x00\xd6\x01\x1d\x02\x92\x00\x93\x00\x38\x02\x39\x02\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\xef\x01\xb1\x01\xab\x00\xac\x00\x95\x02\x96\x02\xad\x00\xae\x00\x1e\x00\x5d\x01\xa3\xfe\xf3\x01\x97\x02\xaf\x00\xb0\x00\xb1\x00\xb2\x00\x1f\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\x20\x00\x0d\x00\x21\x00\x22\x00\x23\x00\x24\x00\xba\x00\x0e\x00\x47\x00\x26\x00\xbb\x00\x27\x00\xc1\x01\x28\x00\xbc\x00\xc2\x01\x48\x00\xaa\x02\x5a\x02\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x42\x02\x43\x02\xf4\x01\x19\x00\x1a\x00\x1b\x00\x1c\x00\x29\x00\xc7\x01\xc8\x01\xbd\x00\xf5\x01\x58\x00\x7b\x01\x71\x00\x1c\x00\x2c\x00\x2d\x00\x97\x01\x2e\x00\xf6\x01\xc9\x01\x61\x00\xca\x01\x62\x00\xf7\x01\x63\x00\x7d\x01\x6d\x00\xb2\x01\x0a\x00\xbe\x00\xf8\x01\x0a\x00\x0b\x00\xf9\x01\x32\x00\xb1\x01\xab\x00\xac\x00\x47\x00\x2a\x01\xad\x00\xae\x00\x1e\x00\x2b\x01\xa3\xfe\x2d\x01\x48\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\x1f\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\x20\x00\x28\x01\x21\x00\x22\x00\x23\x00\x24\x00\xba\x00\x2e\x01\x47\x00\x26\x00\xbb\x00\x27\x00\x7b\x01\x28\x00\xbc\x00\x06\x00\x48\x00\x98\x01\x30\x01\x2a\x00\x73\x00\x07\x00\x08\x00\x32\x00\x05\x00\x47\x00\x7d\x01\x6d\x00\x0a\x00\x0b\x00\x6f\x00\x31\x01\x74\x00\x48\x00\x75\x00\x29\x00\x0a\x00\x0b\x00\xbd\x00\x39\x01\x58\x00\x69\x00\x34\x01\xc1\x01\x2c\x00\x2d\x00\xc2\x01\x2e\x00\x3b\x02\x38\x01\x61\x00\x3c\x01\x62\x00\x59\x01\x63\x00\x6c\x00\x6d\x00\xb2\x01\x7b\x01\xbe\x00\x3d\x01\x0a\x00\x0b\x00\x7c\x01\x32\x00\xab\x00\xac\x00\x47\x00\x3e\x01\xad\x00\xae\x00\x1e\x00\x7d\x01\x6d\x00\x40\x01\x48\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\x1f\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\x20\x00\x41\x01\x21\x00\x22\x00\x23\x00\x24\x00\xba\x00\x42\x01\x47\x00\x26\x00\xbb\x00\x27\x00\xbd\x01\x28\x00\xbc\x00\x43\x01\x48\x00\x0f\xff\x0f\xff\x4a\x01\x4b\x01\x45\x01\x0f\xff\x48\x01\x0f\xff\xce\x01\xbf\x01\x6d\x00\x0f\xff\x4b\x01\x0f\xff\x84\x01\x0f\xff\x8b\x01\x8c\x01\x29\x00\x65\x00\x66\x00\xbd\x00\x0f\xff\x58\x00\x69\x00\x67\x00\xbe\x00\x2c\x00\x2d\x00\x05\x00\x2e\x00\xd1\x02\x0b\x00\x61\x00\xa3\x02\x62\x00\x5c\x01\x63\x00\x6c\x00\x6d\x00\x5a\xfe\x5e\x02\xbe\x00\x0a\x00\x0a\x00\x0b\x00\xbd\x02\x32\x00\x5a\xfe\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\x01\x01\x01\x02\x01\x03\x01\x04\x01\x05\x01\x06\x01\x07\x01\x08\x01\x09\x01\x0a\x01\x0b\x01\x0c\x01\x0d\x01\x0e\x01\x0f\x01\x10\x01\x11\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\xab\x00\xac\x00\x47\x00\x96\x02\xad\x00\xae\x00\x1e\x00\xbf\x02\xc0\x02\xc1\x02\x48\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\x1f\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\x20\x00\x0a\x00\x21\x00\x22\x00\x23\x00\x24\x00\xba\x00\xc4\x02\x47\x00\x26\x00\xbb\x00\x27\x00\xbd\x01\x28\x00\xbc\x00\xc5\x02\x48\x00\x51\x00\x52\x00\x79\x02\x0a\x00\xe4\x01\x53\x00\xce\x02\x29\xff\xcf\x01\xbf\x01\x6d\x00\x7f\x01\xe4\x01\x80\x01\xd0\x02\x81\x01\x8a\x02\x8d\x02\x29\x00\x8f\x02\x98\x02\xbd\x00\x0a\x00\x58\x00\x7b\x01\xe4\x01\xb0\x02\x2c\x00\x2d\x00\x83\x01\x2e\x00\xad\x02\xb2\x02\x61\x00\xaf\x02\x62\x00\x45\x02\x63\x00\x7d\x01\x6d\x00\x58\x02\x59\x02\xbe\x00\x5e\x02\x0a\x00\x0b\x00\x0a\x00\x32\x00\xab\x00\xac\x00\x47\x00\x68\x02\xad\x00\xae\x00\x1e\x00\x45\x02\x6e\x02\x6f\x02\x48\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\x1f\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\x20\x00\x70\x02\x21\x00\x22\x00\x23\x00\x24\x00\xba\x00\x71\x02\x0a\x00\x26\x00\xbb\x00\x27\x00\xbd\x01\x28\x00\xbc\x00\x79\x02\xe4\x01\x0d\x00\xbb\x02\x21\x02\x22\x02\x23\x02\x24\x02\x0e\x00\x7d\x02\xda\x01\xbf\x01\x6d\x00\x7e\x02\x98\x02\x21\x02\x22\x02\x23\x02\x24\x02\xe4\x01\x29\x00\x80\x02\x81\x02\xbd\x00\x82\x02\x58\x00\x16\x00\x17\x00\x56\x00\x2c\x00\x2d\x00\x1e\x00\x2e\x00\x83\x02\x84\x02\x61\x00\x85\x02\x62\x00\xed\x01\x63\x00\x1f\x00\x87\x02\x88\x02\x89\x02\xbe\x00\xb7\x01\x0a\x00\x0b\x00\x20\x00\x32\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\xea\x01\x0d\x00\x26\x00\xed\x01\x27\x00\x00\x02\x28\x00\x0e\x00\xa6\x02\x21\x02\x22\x02\x23\x02\x24\x02\x3e\x00\x56\x02\x21\x02\x22\x02\x23\x02\x24\x02\xed\x01\x03\x02\x58\x01\x13\x00\x14\x00\xed\x01\x16\x00\x17\x00\x52\x01\x29\x00\x06\x02\x07\x02\xbb\x02\x2a\x00\x2b\x00\xed\x01\x08\x02\x6c\x01\x2c\x00\x2d\x00\x0a\x02\x2e\x00\x1e\x00\x0b\x02\x2f\x00\x0c\x02\x30\x00\x3d\x00\x31\x00\x3e\x00\x2a\x01\x1f\x00\x15\x02\x1d\x02\x0a\x00\x0a\x00\x0b\x00\x1f\x02\x32\x00\x20\x00\x0d\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x0e\x00\x0d\x00\x26\x00\x2e\x02\x27\x00\x3b\x02\x28\x00\x0e\x00\x20\x02\x21\x02\x22\x02\x23\x02\x24\x02\x45\x02\x4c\x02\x13\x00\x14\x00\x6e\x01\x16\x00\x17\x00\x18\x00\x0a\x00\x4b\x02\x2b\xff\xe5\x01\x16\x00\x17\x00\x5f\x00\x29\x00\x2c\xff\x28\xff\x20\x02\x2a\x00\x2b\x00\x4d\x02\x4e\x02\x4f\x02\x2c\x00\x2d\x00\xa2\x01\x2e\x00\x1e\x00\x26\xff\x2f\x00\x27\xff\x30\x00\x3d\x00\x31\x00\x3e\x00\xa1\x01\x1f\x00\xa5\x01\xa4\x01\x0a\x00\x0a\x00\x0b\x00\xa7\x01\x32\x00\x20\x00\x0d\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x0e\x00\x0d\x00\x26\x00\xaa\x01\x27\x00\xab\x01\x28\x00\x0e\x00\x71\x02\x22\x02\x23\x02\x24\x02\xac\x01\xb4\x01\x4c\x02\x13\x00\x14\x00\x6e\x01\x16\x00\x17\x00\x18\x00\xb7\x01\x0a\x00\xe5\x01\x78\x00\x16\x00\x17\x00\x5f\x00\x29\x00\x4d\x01\xe8\x01\xea\x01\x2a\x00\x2b\x00\x4d\x02\x4e\x02\x50\x02\x2c\x00\x2d\x00\xed\x01\x2e\x00\x1e\x00\xee\x01\x2f\x00\xef\x01\x30\x00\x3d\x00\x31\x00\x3e\x00\xf1\x01\x45\x00\xf2\x01\xf3\x01\x46\x00\x0a\x00\x0b\x00\x2a\x01\x32\x00\x20\x00\xea\x01\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x45\x01\x1e\x00\x26\x00\x69\x00\x27\x00\x30\x01\x28\x00\x0a\x00\x69\x00\x0a\x00\x1f\x00\x69\x00\x7b\x00\x40\x01\x0a\x00\x69\x00\x4d\x01\x5b\x01\x20\x00\x5f\x01\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x60\x01\x61\x01\x26\x00\x29\x00\x27\x00\x0a\x00\x28\x00\x2a\x00\x2b\x00\x66\x01\x67\x01\x82\x01\x2c\x00\x2d\x00\x69\x00\x2e\x00\x87\x01\x86\x01\x2f\x00\x47\x00\x30\x00\x88\x01\x31\x00\x89\x01\x8a\x01\xff\xff\x8b\x01\x90\x01\x29\x00\x0a\x00\x0b\x00\x8e\x01\x32\x00\x58\x00\x8f\x01\x0a\x00\x69\x00\x2c\x00\x2d\x00\x7d\x00\x2e\x00\x1e\x00\x76\x00\x61\x00\x7c\x00\x62\x00\x3d\x00\x63\x00\x3e\x00\xff\xff\x45\x00\xff\xff\x00\x00\x46\x00\x0a\x00\x0b\x00\x0d\x00\x32\x00\x20\x00\x0d\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x0e\x00\x0d\x00\x26\x00\x00\x00\x27\x00\x00\x00\x28\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3e\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x16\x00\x17\x00\x5f\x00\x58\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x58\x00\x00\x00\x00\x00\x69\x01\x2c\x00\x2d\x00\x1e\x00\x2e\x00\x00\x00\x00\x00\x61\x00\x97\x01\x62\x00\x00\x00\x63\x00\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x20\x00\x32\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x00\x00\x0d\x00\x26\x00\x95\x01\x27\x00\x00\x00\x28\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x57\x01\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x29\x00\x00\x00\x00\x00\x00\x00\x2a\x00\x2b\x00\x00\x00\x3b\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x1e\x00\x00\x00\x2f\x00\x00\x00\x30\x00\x00\x00\x31\x00\x39\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x20\x00\x00\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x00\x00\x0d\x00\x26\x00\x73\x01\x27\x00\x00\x00\x28\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x57\x01\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x29\x00\x00\x00\x00\x00\x00\x00\x2a\x00\x2b\x00\x00\x00\x3b\x00\x00\x00\x2c\x00\x2d\x00\x1e\x00\x2e\x00\x00\x00\x00\x00\x2f\x00\x47\x00\x30\x00\x00\x00\x31\x00\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x20\x00\x32\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x00\x00\x0d\x00\x26\x00\x00\x00\x27\x00\x00\x00\x28\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x33\x00\x56\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x29\x00\x00\x00\x00\x00\x00\x00\x2a\x00\x2b\x00\x00\x00\x37\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x1e\x00\x00\x00\x2f\x00\x00\x00\x30\x00\x00\x00\x31\x00\x39\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x20\x00\x00\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x00\x00\x1e\x00\x26\x00\x00\x00\x27\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x00\x00\x00\x00\x26\x00\x29\x00\x27\x00\x00\x00\x28\x00\x2a\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x00\x00\x00\x00\x2f\x00\x47\x00\x30\x00\x00\x00\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x29\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x58\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x1e\x00\x00\x00\x61\x00\x00\x00\x62\x00\x3d\x00\x63\x00\x3e\x00\x00\x00\x45\x00\x00\x00\x00\x00\x46\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x20\x00\x00\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x00\x00\x0d\x00\x26\x00\x00\x00\x27\x00\x00\x00\x28\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x99\x01\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x51\x00\x52\x00\x51\x01\x13\x00\x14\x00\x53\x00\x16\x00\x17\x00\x52\x01\x29\x00\x00\x00\x6f\x00\x00\x00\x70\x00\x58\x00\x71\x00\x67\x01\x00\x00\x2c\x00\x2d\x00\x1e\x00\x2e\x00\x0a\x00\x00\x00\x61\x00\x75\x01\x62\x00\x00\x00\x63\x00\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x20\x00\x32\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x00\x00\x1e\x00\x26\x00\x00\x00\x27\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x00\x00\x00\x00\x26\x00\x29\x00\x27\x00\x00\x00\x28\x00\x2a\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x00\x00\x00\x00\x2f\x00\x00\x00\x30\x00\x00\x00\x31\x00\x39\x00\x00\x00\x00\x00\x00\x00\x00\x00\x29\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x58\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x5c\xff\x2e\x00\x1e\x00\x5c\xff\x61\x00\x00\x00\x62\x00\x00\x00\x63\x00\x00\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x20\x00\x00\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x00\x00\x1e\x00\x26\x00\x00\x00\x27\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x00\x00\x00\x00\x26\x00\x29\x00\x27\x00\x00\x00\x28\x00\x2a\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x00\x00\x00\x00\x2f\x00\x00\x00\x30\x00\x00\x00\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x29\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x58\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x1e\x00\x00\x00\x61\x00\x00\x00\x62\x00\x00\x00\x63\x00\x95\x01\x00\x00\x1f\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x20\x00\x00\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x00\x00\x1e\x00\x26\x00\x00\x00\x27\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x45\x00\x00\x00\x00\x00\x46\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x00\x00\x00\x00\x26\x00\x29\x00\x27\x00\x00\x00\x28\x00\x2a\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x00\x00\x00\x00\x2f\x00\x00\x00\x30\x00\x00\x00\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x29\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x58\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x1e\x00\x2e\x00\x00\x00\x00\x00\x61\x00\x00\x00\x62\x00\x00\x00\x63\x00\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x20\x00\x32\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x00\x00\x1e\x00\x26\x00\x00\x00\x27\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x00\x00\x00\x00\x26\x00\x29\x00\x27\x00\x00\x00\x28\x00\x2a\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x00\x00\x00\x00\x2f\x00\x00\x00\x30\x00\x00\x00\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x29\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x58\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x1e\x00\x00\x00\x61\x00\x00\x00\x62\x00\x00\x00\x63\x00\x73\x01\x00\x00\x1f\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x20\x00\x00\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x00\x00\x1e\x00\x26\x00\x00\x00\x27\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x00\x00\x00\x00\x26\x00\x29\x00\x27\x00\x00\x00\x28\x00\x2a\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x00\x00\x00\x00\x2f\x00\x00\x00\x30\x00\x00\x00\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x29\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x58\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x2e\x00\x00\x00\x00\x00\x61\x00\x00\x00\x62\x00\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x20\x00\x32\x00\x21\x00\x00\x00\x00\x00\x24\x00\x25\x00\x00\x00\x00\x00\x26\x00\x00\x00\x51\x00\x52\x00\x28\x00\x00\x00\x00\x00\x53\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7f\x01\x20\x00\x80\x01\x21\x00\x81\x01\x00\x00\x24\x00\x25\x00\x00\x00\x00\x00\x26\x00\x0a\x00\x00\x00\x29\x00\x28\x00\x00\x00\x51\x00\x52\x00\x58\x00\x00\x00\x00\x00\x53\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x61\x00\x70\x00\x62\x00\x71\x00\x63\x00\x00\x00\x00\x00\x00\x00\x29\x00\x00\x00\x0a\x00\x0a\x00\x0b\x00\x58\x00\x32\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x00\x00\x62\x00\x00\x00\x65\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x20\x00\x32\x00\x21\x00\x00\x00\x00\x00\x24\x00\x25\x00\x00\x00\x00\x00\x26\x00\x00\x00\x51\x00\x52\x00\x28\x00\x00\x00\x00\x00\x53\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7f\x01\x20\x00\x80\x01\x21\x00\x81\x01\x00\x00\x24\x00\x25\x00\x00\x00\x00\x00\x26\x00\x0a\x00\x00\x00\x29\x00\x28\x00\x00\x00\x51\x00\x52\x00\x58\x00\x00\x00\x00\x00\x53\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x61\x00\x70\x00\x62\x00\xdc\x01\x63\x00\x00\x00\x00\x00\x00\x00\x29\x00\x00\x00\x0a\x00\x0a\x00\x0b\x00\x58\x00\x32\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x20\x00\x32\x00\x21\x00\x00\x00\x00\x00\x24\x00\x25\x00\x00\x00\x00\x00\x26\x00\x00\x00\x51\x00\x52\x00\x28\x00\x00\x00\x00\x00\x53\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x20\x00\x70\x00\x21\x00\x71\x00\x00\x00\x24\x00\x25\x00\x00\x00\x00\x00\x26\x00\x0a\x00\x00\x00\x29\x00\x28\x00\x00\x00\x51\x00\x52\x00\x58\x00\x00\x00\x00\x00\x53\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x7f\x01\x61\x00\x80\x01\x62\x00\x81\x01\x63\x00\x00\x00\x00\x00\x00\x00\x29\x00\x00\x00\x0a\x00\x0a\x00\x0b\x00\x58\x00\x32\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x61\x00\x00\x00\x62\x00\x0e\x00\x65\x00\x00\x00\x00\x00\x33\x00\x56\x01\x00\x00\x00\x00\x0a\x00\x0b\x00\x00\x00\x32\x00\x00\x00\x00\x00\x6d\x01\x13\x00\x14\x00\x6e\x01\x16\x00\x17\x00\x18\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3e\x00\x6f\x01\x70\x01\x00\x00\x71\x01\x3f\x00\x10\x00\x11\x00\x40\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x00\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0d\x00\x6c\x01\x39\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x33\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x10\x00\x11\x00\x36\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x00\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x6b\x01\x0d\x00\x00\x00\x39\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x33\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x10\x00\x11\x00\x36\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x00\x00\x0d\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x3b\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x33\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x35\x00\x10\x00\x11\x00\x36\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x00\x00\x0d\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x6a\x01\x0e\x00\x00\x00\x00\x00\x00\x00\x33\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x35\x00\x10\x00\x11\x00\x36\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x00\x00\x17\x02\x19\x00\x1a\x00\x1b\x00\x1c\x00\x37\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x33\x00\x56\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\xa8\x01\x63\x01\x64\x01\x0d\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x0e\x00\x0d\x00\x00\x00\x00\x00\x9a\x01\x34\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x9b\x01\x34\x00\x00\x00\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x68\x01\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6a\x01\x0e\x00\x0d\x00\x00\x00\x00\x00\x9c\x01\x34\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x33\x00\x34\x00\x00\x00\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x6b\x01\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6a\x01\x0e\x00\x0d\x00\x00\x00\x00\x00\x33\x00\x34\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x33\x00\x34\x00\x00\x00\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x6b\x01\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x0e\x00\x0d\x00\x00\x00\x00\x00\x33\x00\x34\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x33\x00\x56\x01\x00\x00\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x3b\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x0e\x00\x0d\x00\x00\x00\x00\x00\x57\x01\x34\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x33\x00\x34\x00\x00\x00\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x3b\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x67\x01\x0e\x00\x00\x00\x00\x00\x00\x00\x33\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x51\x01\x13\x00\x14\x00\x00\x00\x16\x00\x17\x00\x52\x01\x0d\x00\x00\x00\x39\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x68\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5e\x02\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x02\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x73\x02\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x74\x02\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x76\x02\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x02\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x47\x02\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x48\x02\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x02\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x90\x01\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x91\x01\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xac\x01\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x01\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x01\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x01\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x01\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x01\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x50\x01\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x01\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x35\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x01\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x76\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x00\x00\x00\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x51\x00\x52\x00\x00\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x53\x00\x00\x00\x00\x00\x54\x00\x00\x00\x55\x00\x6f\x00\x56\x00\x70\x00\x00\x00\x71\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x00\x00\x0a\x00\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01\x20\x01\x21\x01\x22\x01\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\x28\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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 (4, 422) [
(4 , happyReduce_4),
@@ -1377,58 +1377,58 @@ happyReduction_6 = happyIn8
happyReduce_7 = happySpecReduce_1 2# happyReduction_7
happyReduction_7 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwLet happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwAbstract happy_var_1) ->
happyIn9
- (TokKeyword KwLet happy_var_1
+ (TokKeyword KwAbstract happy_var_1
)}
happyReduce_8 = happySpecReduce_1 2# happyReduction_8
happyReduction_8 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwIn happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwCoData happy_var_1) ->
happyIn9
- (TokKeyword KwIn happy_var_1
+ (TokKeyword KwCoData happy_var_1
)}
happyReduce_9 = happySpecReduce_1 2# happyReduction_9
happyReduction_9 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwWhere happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwCoInductive happy_var_1) ->
happyIn9
- (TokKeyword KwWhere happy_var_1
+ (TokKeyword KwCoInductive happy_var_1
)}
happyReduce_10 = happySpecReduce_1 2# happyReduction_10
happyReduction_10 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwWith happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwConstructor happy_var_1) ->
happyIn9
- (TokKeyword KwWith happy_var_1
+ (TokKeyword KwConstructor happy_var_1
)}
happyReduce_11 = happySpecReduce_1 2# happyReduction_11
happyReduction_11 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwRewrite happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwData happy_var_1) ->
happyIn9
- (TokKeyword KwRewrite happy_var_1
+ (TokKeyword KwData happy_var_1
)}
happyReduce_12 = happySpecReduce_1 2# happyReduction_12
happyReduction_12 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwPostulate happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwField happy_var_1) ->
happyIn9
- (TokKeyword KwPostulate happy_var_1
+ (TokKeyword KwField happy_var_1
)}
happyReduce_13 = happySpecReduce_1 2# happyReduction_13
happyReduction_13 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwPrimitive happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwForall happy_var_1) ->
happyIn9
- (TokKeyword KwPrimitive happy_var_1
+ (TokKeyword KwForall happy_var_1
)}
happyReduce_14 = happySpecReduce_1 2# happyReduction_14
happyReduction_14 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwOpen happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwHiding happy_var_1) ->
happyIn9
- (TokKeyword KwOpen happy_var_1
+ (TokKeyword KwHiding happy_var_1
)}
happyReduce_15 = happySpecReduce_1 2# happyReduction_15
@@ -1440,345 +1440,345 @@ happyReduction_15 happy_x_1
happyReduce_16 = happySpecReduce_1 2# happyReduction_16
happyReduction_16 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwUsing happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwIn happy_var_1) ->
happyIn9
- (TokKeyword KwUsing happy_var_1
+ (TokKeyword KwIn happy_var_1
)}
happyReduce_17 = happySpecReduce_1 2# happyReduction_17
happyReduction_17 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwHiding happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwInductive happy_var_1) ->
happyIn9
- (TokKeyword KwHiding happy_var_1
+ (TokKeyword KwInductive happy_var_1
)}
happyReduce_18 = happySpecReduce_1 2# happyReduction_18
happyReduction_18 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwRenaming happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwInfix happy_var_1) ->
happyIn9
- (TokKeyword KwRenaming happy_var_1
+ (TokKeyword KwInfix happy_var_1
)}
happyReduce_19 = happySpecReduce_1 2# happyReduction_19
happyReduction_19 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwTo happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwInfixL happy_var_1) ->
happyIn9
- (TokKeyword KwTo happy_var_1
+ (TokKeyword KwInfixL happy_var_1
)}
happyReduce_20 = happySpecReduce_1 2# happyReduction_20
happyReduction_20 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwPublic happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwInfixR happy_var_1) ->
happyIn9
- (TokKeyword KwPublic happy_var_1
+ (TokKeyword KwInfixR happy_var_1
)}
happyReduce_21 = happySpecReduce_1 2# happyReduction_21
happyReduction_21 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwModule happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwInstance happy_var_1) ->
happyIn9
- (TokKeyword KwModule happy_var_1
+ (TokKeyword KwInstance happy_var_1
)}
happyReduce_22 = happySpecReduce_1 2# happyReduction_22
happyReduction_22 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwData happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwLet happy_var_1) ->
happyIn9
- (TokKeyword KwData happy_var_1
+ (TokKeyword KwLet happy_var_1
)}
happyReduce_23 = happySpecReduce_1 2# happyReduction_23
happyReduction_23 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwCoData happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwModule happy_var_1) ->
happyIn9
- (TokKeyword KwCoData happy_var_1
+ (TokKeyword KwModule happy_var_1
)}
happyReduce_24 = happySpecReduce_1 2# happyReduction_24
happyReduction_24 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwRecord happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwMutual happy_var_1) ->
happyIn9
- (TokKeyword KwRecord happy_var_1
+ (TokKeyword KwMutual happy_var_1
)}
happyReduce_25 = happySpecReduce_1 2# happyReduction_25
happyReduction_25 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwConstructor happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwOpen happy_var_1) ->
happyIn9
- (TokKeyword KwConstructor happy_var_1
+ (TokKeyword KwOpen happy_var_1
)}
happyReduce_26 = happySpecReduce_1 2# happyReduction_26
happyReduction_26 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwInductive happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwPatternSyn happy_var_1) ->
happyIn9
- (TokKeyword KwInductive happy_var_1
+ (TokKeyword KwPatternSyn happy_var_1
)}
happyReduce_27 = happySpecReduce_1 2# happyReduction_27
happyReduction_27 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwCoInductive happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwPostulate happy_var_1) ->
happyIn9
- (TokKeyword KwCoInductive happy_var_1
+ (TokKeyword KwPostulate happy_var_1
)}
happyReduce_28 = happySpecReduce_1 2# happyReduction_28
happyReduction_28 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwField happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwPrimitive happy_var_1) ->
happyIn9
- (TokKeyword KwField happy_var_1
+ (TokKeyword KwPrimitive happy_var_1
)}
happyReduce_29 = happySpecReduce_1 2# happyReduction_29
happyReduction_29 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwInfix happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwPrivate happy_var_1) ->
happyIn9
- (TokKeyword KwInfix happy_var_1
+ (TokKeyword KwPrivate happy_var_1
)}
happyReduce_30 = happySpecReduce_1 2# happyReduction_30
happyReduction_30 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwInfixL happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwProp happy_var_1) ->
happyIn9
- (TokKeyword KwInfixL happy_var_1
+ (TokKeyword KwProp happy_var_1
)}
happyReduce_31 = happySpecReduce_1 2# happyReduction_31
happyReduction_31 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwInfixR happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwPublic happy_var_1) ->
happyIn9
- (TokKeyword KwInfixR happy_var_1
+ (TokKeyword KwPublic happy_var_1
)}
happyReduce_32 = happySpecReduce_1 2# happyReduction_32
happyReduction_32 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwMutual happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwQuote happy_var_1) ->
happyIn9
- (TokKeyword KwMutual happy_var_1
+ (TokKeyword KwQuote happy_var_1
)}
happyReduce_33 = happySpecReduce_1 2# happyReduction_33
happyReduction_33 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwAbstract happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwQuoteContext happy_var_1) ->
happyIn9
- (TokKeyword KwAbstract happy_var_1
+ (TokKeyword KwQuoteContext happy_var_1
)}
happyReduce_34 = happySpecReduce_1 2# happyReduction_34
happyReduction_34 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwPrivate happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwQuoteGoal happy_var_1) ->
happyIn9
- (TokKeyword KwPrivate happy_var_1
+ (TokKeyword KwQuoteGoal happy_var_1
)}
happyReduce_35 = happySpecReduce_1 2# happyReduction_35
happyReduction_35 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwInstance happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwQuoteTerm happy_var_1) ->
happyIn9
- (TokKeyword KwInstance happy_var_1
+ (TokKeyword KwQuoteTerm happy_var_1
)}
happyReduce_36 = happySpecReduce_1 2# happyReduction_36
happyReduction_36 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwProp happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwRecord happy_var_1) ->
happyIn9
- (TokKeyword KwProp happy_var_1
+ (TokKeyword KwRecord happy_var_1
)}
happyReduce_37 = happySpecReduce_1 2# happyReduction_37
happyReduction_37 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwSet happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwRenaming happy_var_1) ->
happyIn9
- (TokKeyword KwSet happy_var_1
+ (TokKeyword KwRenaming happy_var_1
)}
happyReduce_38 = happySpecReduce_1 2# happyReduction_38
happyReduction_38 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwForall happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwRewrite happy_var_1) ->
happyIn9
- (TokKeyword KwForall happy_var_1
+ (TokKeyword KwRewrite happy_var_1
)}
happyReduce_39 = happySpecReduce_1 2# happyReduction_39
happyReduction_39 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwSyntax happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwSet happy_var_1) ->
happyIn9
- (TokKeyword KwSyntax happy_var_1
+ (TokKeyword KwSet happy_var_1
)}
happyReduce_40 = happySpecReduce_1 2# happyReduction_40
happyReduction_40 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwPatternSyn happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwSyntax happy_var_1) ->
happyIn9
- (TokKeyword KwPatternSyn happy_var_1
+ (TokKeyword KwSyntax happy_var_1
)}
happyReduce_41 = happySpecReduce_1 2# happyReduction_41
happyReduction_41 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwOPTIONS happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwTactic happy_var_1) ->
happyIn9
- (TokKeyword KwOPTIONS happy_var_1
+ (TokKeyword KwTactic happy_var_1
)}
happyReduce_42 = happySpecReduce_1 2# happyReduction_42
happyReduction_42 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwBUILTIN happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwTo happy_var_1) ->
happyIn9
- (TokKeyword KwBUILTIN happy_var_1
+ (TokKeyword KwTo happy_var_1
)}
happyReduce_43 = happySpecReduce_1 2# happyReduction_43
happyReduction_43 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwREWRITE happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwUnquote happy_var_1) ->
happyIn9
- (TokKeyword KwREWRITE happy_var_1
+ (TokKeyword KwUnquote happy_var_1
)}
happyReduce_44 = happySpecReduce_1 2# happyReduction_44
happyReduction_44 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwIMPORT happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwUnquoteDecl happy_var_1) ->
happyIn9
- (TokKeyword KwIMPORT happy_var_1
+ (TokKeyword KwUnquoteDecl happy_var_1
)}
happyReduce_45 = happySpecReduce_1 2# happyReduction_45
happyReduction_45 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwCOMPILED happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwUsing happy_var_1) ->
happyIn9
- (TokKeyword KwCOMPILED happy_var_1
+ (TokKeyword KwUsing happy_var_1
)}
happyReduce_46 = happySpecReduce_1 2# happyReduction_46
happyReduction_46 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwCOMPILED_EXPORT happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwWhere happy_var_1) ->
happyIn9
- (TokKeyword KwCOMPILED_EXPORT happy_var_1
+ (TokKeyword KwWhere happy_var_1
)}
happyReduce_47 = happySpecReduce_1 2# happyReduction_47
happyReduction_47 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwCOMPILED_DATA happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwWith happy_var_1) ->
happyIn9
- (TokKeyword KwCOMPILED_DATA happy_var_1
+ (TokKeyword KwWith happy_var_1
)}
happyReduce_48 = happySpecReduce_1 2# happyReduction_48
happyReduction_48 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwCOMPILED_TYPE happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwBUILTIN happy_var_1) ->
happyIn9
- (TokKeyword KwCOMPILED_TYPE happy_var_1
+ (TokKeyword KwBUILTIN happy_var_1
)}
happyReduce_49 = happySpecReduce_1 2# happyReduction_49
happyReduction_49 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwCOMPILED_EPIC happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwCOMPILED happy_var_1) ->
happyIn9
- (TokKeyword KwCOMPILED_EPIC happy_var_1
+ (TokKeyword KwCOMPILED happy_var_1
)}
happyReduce_50 = happySpecReduce_1 2# happyReduction_50
happyReduction_50 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwCOMPILED_JS happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwCOMPILED_DATA happy_var_1) ->
happyIn9
- (TokKeyword KwCOMPILED_JS happy_var_1
+ (TokKeyword KwCOMPILED_DATA happy_var_1
)}
happyReduce_51 = happySpecReduce_1 2# happyReduction_51
happyReduction_51 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwSTATIC happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwCOMPILED_EPIC happy_var_1) ->
happyIn9
- (TokKeyword KwSTATIC happy_var_1
+ (TokKeyword KwCOMPILED_EPIC happy_var_1
)}
happyReduce_52 = happySpecReduce_1 2# happyReduction_52
happyReduction_52 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwIMPOSSIBLE happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwCOMPILED_EXPORT happy_var_1) ->
happyIn9
- (TokKeyword KwIMPOSSIBLE happy_var_1
+ (TokKeyword KwCOMPILED_EXPORT happy_var_1
)}
happyReduce_53 = happySpecReduce_1 2# happyReduction_53
happyReduction_53 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwETA happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwCOMPILED_JS happy_var_1) ->
happyIn9
- (TokKeyword KwETA happy_var_1
+ (TokKeyword KwCOMPILED_JS happy_var_1
)}
happyReduce_54 = happySpecReduce_1 2# happyReduction_54
happyReduction_54 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwNO_TERMINATION_CHECK happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwCOMPILED_TYPE happy_var_1) ->
happyIn9
- (TokKeyword KwNO_TERMINATION_CHECK happy_var_1
+ (TokKeyword KwCOMPILED_TYPE happy_var_1
)}
happyReduce_55 = happySpecReduce_1 2# happyReduction_55
happyReduction_55 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwNON_TERMINATING happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwETA happy_var_1) ->
happyIn9
- (TokKeyword KwNON_TERMINATING happy_var_1
+ (TokKeyword KwETA happy_var_1
)}
happyReduce_56 = happySpecReduce_1 2# happyReduction_56
happyReduction_56 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwTERMINATING happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwIMPORT happy_var_1) ->
happyIn9
- (TokKeyword KwTERMINATING happy_var_1
+ (TokKeyword KwIMPORT happy_var_1
)}
happyReduce_57 = happySpecReduce_1 2# happyReduction_57
happyReduction_57 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwMEASURE happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwIMPOSSIBLE happy_var_1) ->
happyIn9
- (TokKeyword KwMEASURE happy_var_1
+ (TokKeyword KwIMPOSSIBLE happy_var_1
)}
happyReduce_58 = happySpecReduce_1 2# happyReduction_58
happyReduction_58 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwQuoteGoal happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwMEASURE happy_var_1) ->
happyIn9
- (TokKeyword KwQuoteGoal happy_var_1
+ (TokKeyword KwMEASURE happy_var_1
)}
happyReduce_59 = happySpecReduce_1 2# happyReduction_59
happyReduction_59 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwQuoteContext happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwNO_TERMINATION_CHECK happy_var_1) ->
happyIn9
- (TokKeyword KwQuoteContext happy_var_1
+ (TokKeyword KwNO_TERMINATION_CHECK happy_var_1
)}
happyReduce_60 = happySpecReduce_1 2# happyReduction_60
happyReduction_60 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwQuote happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwNON_TERMINATING happy_var_1) ->
happyIn9
- (TokKeyword KwQuote happy_var_1
+ (TokKeyword KwNON_TERMINATING happy_var_1
)}
happyReduce_61 = happySpecReduce_1 2# happyReduction_61
happyReduction_61 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwQuoteTerm happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwOPTIONS happy_var_1) ->
happyIn9
- (TokKeyword KwQuoteTerm happy_var_1
+ (TokKeyword KwOPTIONS happy_var_1
)}
happyReduce_62 = happySpecReduce_1 2# happyReduction_62
happyReduction_62 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwTactic happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwREWRITE happy_var_1) ->
happyIn9
- (TokKeyword KwTactic happy_var_1
+ (TokKeyword KwREWRITE happy_var_1
)}
happyReduce_63 = happySpecReduce_1 2# happyReduction_63
happyReduction_63 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwUnquote happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwSTATIC happy_var_1) ->
happyIn9
- (TokKeyword KwUnquote happy_var_1
+ (TokKeyword KwSTATIC happy_var_1
)}
happyReduce_64 = happySpecReduce_1 2# happyReduction_64
happyReduction_64 happy_x_1
- = case happyOutTok happy_x_1 of { (TokKeyword KwUnquoteDecl happy_var_1) ->
+ = case happyOutTok happy_x_1 of { (TokKeyword KwTERMINATING happy_var_1) ->
happyIn9
- (TokKeyword KwUnquoteDecl happy_var_1
+ (TokKeyword KwTERMINATING happy_var_1
)}
happyReduce_65 = happySpecReduce_1 2# happyReduction_65
@@ -5218,64 +5218,64 @@ happyNewToken action sts stk
let cont i = happyDoAction i tk action sts stk in
case tk of {
TokEOF -> happyDoAction 89# tk action sts stk;
- TokKeyword KwLet happy_dollar_dollar -> cont 1#;
- TokKeyword KwIn happy_dollar_dollar -> cont 2#;
- TokKeyword KwWhere happy_dollar_dollar -> cont 3#;
- TokKeyword KwWith happy_dollar_dollar -> cont 4#;
- TokKeyword KwRewrite happy_dollar_dollar -> cont 5#;
- TokKeyword KwPostulate happy_dollar_dollar -> cont 6#;
- TokKeyword KwPrimitive happy_dollar_dollar -> cont 7#;
- TokKeyword KwOpen happy_dollar_dollar -> cont 8#;
+ TokKeyword KwAbstract happy_dollar_dollar -> cont 1#;
+ TokKeyword KwCoData happy_dollar_dollar -> cont 2#;
+ TokKeyword KwCoInductive happy_dollar_dollar -> cont 3#;
+ TokKeyword KwConstructor happy_dollar_dollar -> cont 4#;
+ TokKeyword KwData happy_dollar_dollar -> cont 5#;
+ TokKeyword KwField happy_dollar_dollar -> cont 6#;
+ TokKeyword KwForall happy_dollar_dollar -> cont 7#;
+ TokKeyword KwHiding happy_dollar_dollar -> cont 8#;
TokKeyword KwImport happy_dollar_dollar -> cont 9#;
- TokKeyword KwUsing happy_dollar_dollar -> cont 10#;
- TokKeyword KwHiding happy_dollar_dollar -> cont 11#;
- TokKeyword KwRenaming happy_dollar_dollar -> cont 12#;
- TokKeyword KwTo happy_dollar_dollar -> cont 13#;
- TokKeyword KwPublic happy_dollar_dollar -> cont 14#;
- TokKeyword KwModule happy_dollar_dollar -> cont 15#;
- TokKeyword KwData happy_dollar_dollar -> cont 16#;
- TokKeyword KwCoData happy_dollar_dollar -> cont 17#;
- TokKeyword KwRecord happy_dollar_dollar -> cont 18#;
- TokKeyword KwConstructor happy_dollar_dollar -> cont 19#;
- TokKeyword KwInductive happy_dollar_dollar -> cont 20#;
- TokKeyword KwCoInductive happy_dollar_dollar -> cont 21#;
- TokKeyword KwField happy_dollar_dollar -> cont 22#;
- TokKeyword KwInfix happy_dollar_dollar -> cont 23#;
- TokKeyword KwInfixL happy_dollar_dollar -> cont 24#;
- TokKeyword KwInfixR happy_dollar_dollar -> cont 25#;
- TokKeyword KwMutual happy_dollar_dollar -> cont 26#;
- TokKeyword KwAbstract happy_dollar_dollar -> cont 27#;
- TokKeyword KwPrivate happy_dollar_dollar -> cont 28#;
- TokKeyword KwInstance happy_dollar_dollar -> cont 29#;
- TokKeyword KwProp happy_dollar_dollar -> cont 30#;
- TokKeyword KwSet happy_dollar_dollar -> cont 31#;
- TokKeyword KwForall happy_dollar_dollar -> cont 32#;
- TokKeyword KwSyntax happy_dollar_dollar -> cont 33#;
- TokKeyword KwPatternSyn happy_dollar_dollar -> cont 34#;
- TokKeyword KwOPTIONS happy_dollar_dollar -> cont 35#;
- TokKeyword KwBUILTIN happy_dollar_dollar -> cont 36#;
- TokKeyword KwREWRITE happy_dollar_dollar -> cont 37#;
- TokKeyword KwIMPORT happy_dollar_dollar -> cont 38#;
- TokKeyword KwIMPOSSIBLE happy_dollar_dollar -> cont 39#;
- TokKeyword KwETA happy_dollar_dollar -> cont 40#;
- TokKeyword KwNO_TERMINATION_CHECK happy_dollar_dollar -> cont 41#;
- TokKeyword KwNON_TERMINATING happy_dollar_dollar -> cont 42#;
- TokKeyword KwTERMINATING happy_dollar_dollar -> cont 43#;
- TokKeyword KwMEASURE happy_dollar_dollar -> cont 44#;
- TokKeyword KwCOMPILED happy_dollar_dollar -> cont 45#;
+ TokKeyword KwIn happy_dollar_dollar -> cont 10#;
+ TokKeyword KwInductive happy_dollar_dollar -> cont 11#;
+ TokKeyword KwInfix happy_dollar_dollar -> cont 12#;
+ TokKeyword KwInfixL happy_dollar_dollar -> cont 13#;
+ TokKeyword KwInfixR happy_dollar_dollar -> cont 14#;
+ TokKeyword KwInstance happy_dollar_dollar -> cont 15#;
+ TokKeyword KwLet happy_dollar_dollar -> cont 16#;
+ TokKeyword KwModule happy_dollar_dollar -> cont 17#;
+ TokKeyword KwMutual happy_dollar_dollar -> cont 18#;
+ TokKeyword KwOpen happy_dollar_dollar -> cont 19#;
+ TokKeyword KwPatternSyn happy_dollar_dollar -> cont 20#;
+ TokKeyword KwPostulate happy_dollar_dollar -> cont 21#;
+ TokKeyword KwPrimitive happy_dollar_dollar -> cont 22#;
+ TokKeyword KwPrivate happy_dollar_dollar -> cont 23#;
+ TokKeyword KwProp happy_dollar_dollar -> cont 24#;
+ TokKeyword KwPublic happy_dollar_dollar -> cont 25#;
+ TokKeyword KwQuote happy_dollar_dollar -> cont 26#;
+ TokKeyword KwQuoteContext happy_dollar_dollar -> cont 27#;
+ TokKeyword KwQuoteGoal happy_dollar_dollar -> cont 28#;
+ TokKeyword KwQuoteTerm happy_dollar_dollar -> cont 29#;
+ TokKeyword KwRecord happy_dollar_dollar -> cont 30#;
+ TokKeyword KwRenaming happy_dollar_dollar -> cont 31#;
+ TokKeyword KwRewrite happy_dollar_dollar -> cont 32#;
+ TokKeyword KwSet happy_dollar_dollar -> cont 33#;
+ TokKeyword KwSyntax happy_dollar_dollar -> cont 34#;
+ TokKeyword KwTactic happy_dollar_dollar -> cont 35#;
+ TokKeyword KwTo happy_dollar_dollar -> cont 36#;
+ TokKeyword KwUnquote happy_dollar_dollar -> cont 37#;
+ TokKeyword KwUnquoteDecl happy_dollar_dollar -> cont 38#;
+ TokKeyword KwUsing happy_dollar_dollar -> cont 39#;
+ TokKeyword KwWhere happy_dollar_dollar -> cont 40#;
+ TokKeyword KwWith happy_dollar_dollar -> cont 41#;
+ TokKeyword KwBUILTIN happy_dollar_dollar -> cont 42#;
+ TokKeyword KwCOMPILED happy_dollar_dollar -> cont 43#;
+ TokKeyword KwCOMPILED_DATA happy_dollar_dollar -> cont 44#;
+ TokKeyword KwCOMPILED_EPIC happy_dollar_dollar -> cont 45#;
TokKeyword KwCOMPILED_EXPORT happy_dollar_dollar -> cont 46#;
- TokKeyword KwCOMPILED_DATA happy_dollar_dollar -> cont 47#;
+ TokKeyword KwCOMPILED_JS happy_dollar_dollar -> cont 47#;
TokKeyword KwCOMPILED_TYPE happy_dollar_dollar -> cont 48#;
- TokKeyword KwCOMPILED_EPIC happy_dollar_dollar -> cont 49#;
- TokKeyword KwCOMPILED_JS happy_dollar_dollar -> cont 50#;
- TokKeyword KwSTATIC happy_dollar_dollar -> cont 51#;
- TokKeyword KwQuoteGoal happy_dollar_dollar -> cont 52#;
- TokKeyword KwQuoteContext happy_dollar_dollar -> cont 53#;
- TokKeyword KwQuote happy_dollar_dollar -> cont 54#;
- TokKeyword KwQuoteTerm happy_dollar_dollar -> cont 55#;
- TokKeyword KwTactic happy_dollar_dollar -> cont 56#;
- TokKeyword KwUnquote happy_dollar_dollar -> cont 57#;
- TokKeyword KwUnquoteDecl happy_dollar_dollar -> cont 58#;
+ TokKeyword KwETA happy_dollar_dollar -> cont 49#;
+ TokKeyword KwIMPORT happy_dollar_dollar -> cont 50#;
+ TokKeyword KwIMPOSSIBLE happy_dollar_dollar -> cont 51#;
+ TokKeyword KwMEASURE happy_dollar_dollar -> cont 52#;
+ TokKeyword KwNO_TERMINATION_CHECK happy_dollar_dollar -> cont 53#;
+ TokKeyword KwNON_TERMINATING happy_dollar_dollar -> cont 54#;
+ TokKeyword KwOPTIONS happy_dollar_dollar -> cont 55#;
+ TokKeyword KwREWRITE happy_dollar_dollar -> cont 56#;
+ TokKeyword KwSTATIC happy_dollar_dollar -> cont 57#;
+ TokKeyword KwTERMINATING happy_dollar_dollar -> cont 58#;
TokSetN happy_dollar_dollar -> cont 59#;
TokTeX happy_dollar_dollar -> cont 60#;
TokComment happy_dollar_dollar -> cont 61#;
@@ -5634,7 +5634,7 @@ tests = runTests "Agda.Syntax.Parser.Parser"
{-# LINE 1 "<built-in>" #-}
{-# LINE 1 "<command-line>" #-}
{-# LINE 11 "<command-line>" #-}
-{-# LINE 1 "/usr/local/stow/ghc-7.10.2/lib/ghc-7.10.2/include/ghcversion.h" #-}
+{-# LINE 1 "/usr/local/stow/ghc-7.10.3/lib/ghc-7.10.3/include/ghcversion.h" #-}
diff --git a/src/data/agda.sty b/src/data/agda.sty
index be21d8f..18045d1 100644
--- a/src/data/agda.sty
+++ b/src/data/agda.sty
@@ -313,6 +313,7 @@
{\AgdaNoSpaceMath{\AgdaFontStyle{\textcolor{AgdaArgument}{\AgdaLink{#1}}}}}
% Other aspect commands.
+\newcommand{\AgdaFixityOp} [1]{\AgdaNoSpaceMath{$#1$}}
\newcommand{\AgdaDottedPattern} [1]{\textcolor{AgdaDottedPattern}{#1}}
\newcommand{\AgdaUnsolvedMeta} [1]
{\AgdaFontStyle{\colorbox{AgdaUnsolvedMeta}{#1}}}
diff --git a/src/data/emacs-mode/agda2-mode.el b/src/data/emacs-mode/agda2-mode.el
index 994689e..cece0fc 100644
--- a/src/data/emacs-mode/agda2-mode.el
+++ b/src/data/emacs-mode/agda2-mode.el
@@ -10,7 +10,7 @@
;;; Code:
-(defvar agda2-version "2.4.2.4"
+(defvar agda2-version "2.4.2.5"
"The version of the Agda mode.
Note that the same version of the Agda executable must be used.")
@@ -20,6 +20,7 @@ Note that the same version of the Agda executable must be used.")
(require 'time-date)
(require 'eri)
(require 'annotation)
+(require 'fontset)
(require 'agda-input)
(require 'agda2)
(require 'agda2-highlight)
diff --git a/src/full/Agda/Auto/Auto.hs b/src/full/Agda/Auto/Auto.hs
index 16e99b2..b81054c 100644
--- a/src/full/Agda/Auto/Auto.hs
+++ b/src/full/Agda/Auto/Auto.hs
@@ -399,8 +399,8 @@ auto ii rng argstr = do
hits <- if elem "-a" hints then do
st <- liftTCM $ join $ pureTCM $ \st _ -> return st
- let defs = sigDefinitions $ st^.stSignature
- idefs = sigDefinitions $ st^.stImports
+ let defs = st^.stSignature.sigDefinitions
+ idefs = st^.stImports.sigDefinitions
alldefs = HMap.keys defs ++ HMap.keys idefs
liftM catMaybes $ mapM (\n ->
case thisdefinfo of
diff --git a/src/full/Agda/Auto/Convert.hs b/src/full/Agda/Auto/Convert.hs
index 13718e4..2d8d462 100644
--- a/src/full/Agda/Auto/Convert.hs
+++ b/src/full/Agda/Auto/Convert.hs
@@ -45,6 +45,7 @@ import Agda.Utils.Except
, ExceptT
, MonadError(catchError, throwError)
)
+import Agda.Utils.Lens
import Agda.Utils.Impossible
#include "undefined.h"
@@ -753,7 +754,7 @@ findClauseDeep :: I.MetaId -> MB.TCM (Maybe (AN.QName, I.Clause, Bool))
findClauseDeep m = do
sig <- getImportedSignature
let res = do
- def <- HMap.elems $ MB.sigDefinitions sig
+ def <- HMap.elems $ sig ^. MB.sigDefinitions
MB.Function{MB.funClauses = cs} <- [MB.theDef def]
c <- cs
unless (peelbinds False findMeta $ I.clauseBody c) []
diff --git a/src/full/Agda/Compiler/Epic/CompileState.hs b/src/full/Agda/Compiler/Epic/CompileState.hs
index 7f7bf69..9cfb117 100644
--- a/src/full/Agda/Compiler/Epic/CompileState.hs
+++ b/src/full/Agda/Compiler/Epic/CompileState.hs
@@ -67,7 +67,7 @@ getsEI f = gets (f . curModule)
-- | Returns the type of a definition given its name
getType :: QName -> Compile TCM Type
getType q = do
- map <- lift (sigDefinitions <$> use stImports)
+ map <- lift $ use $ stImports . sigDefinitions
return $ maybe __IMPOSSIBLE__ defType (HM.lookup q map)
-- | Create a name which can be used in Epic code from a QName.
@@ -109,7 +109,7 @@ assignConstrTag' constr constrs = do
getConData :: QName -> Compile TCM QName
getConData con = do
- lmap <- lift (TM.sigDefinitions <$> use TM.stImports)
+ lmap <- lift $ use $ TM.stImports . TM.sigDefinitions
case HM.lookup con lmap of
Just def -> case theDef def of
c@(TM.Constructor{}) -> return $ TM.conData c
@@ -118,7 +118,7 @@ getConData con = do
getDataCon :: QName -> Compile TCM [QName]
getDataCon con = do
- lmap <- lift (TM.sigDefinitions <$> use TM.stImports)
+ lmap <- lift $ use $ TM.stImports . TM.sigDefinitions
case HM.lookup con lmap of
Just def -> case theDef def of
d@(TM.Datatype{}) -> return $ TM.dataCons d
diff --git a/src/full/Agda/Compiler/Epic/Compiler.hs b/src/full/Agda/Compiler/Epic/Compiler.hs
index 6af3220..223d475 100644
--- a/src/full/Agda/Compiler/Epic/Compiler.hs
+++ b/src/full/Agda/Compiler/Epic/Compiler.hs
@@ -53,6 +53,7 @@ import qualified Agda.Compiler.Epic.Smashing as Smash
import Agda.Utils.FileName
import qualified Agda.Utils.HashMap as HMap
+import Agda.Utils.Lens
import Agda.Utils.List
import Agda.Utils.Pretty ( prettyShow )
@@ -134,7 +135,7 @@ compileModule i = do
"Compiling: " ++ (prettyShow . iModuleName) i
resetNameSupply
initialAnalysis i
- let defns = HMap.toList $ sigDefinitions $ iSignature i
+ let defns = HMap.toList $ iSignature i ^. sigDefinitions
-- Epic cannot parse files with no definitions
if (not $ null defns) then do
code <- compileDefns defns
@@ -156,7 +157,7 @@ initialAnalysis :: Interface -> Compile TCM ()
initialAnalysis inter = do
Prim.initialPrims
modify $ \s -> s {curModule = mempty}
- let defs = HMap.toList $ sigDefinitions $ iSignature inter
+ let defs = HMap.toList $ iSignature inter ^. sigDefinitions
forM_ defs $ \(q, def) -> do
addDefName q
case theDef def of
diff --git a/src/full/Agda/Compiler/Epic/Forcing.hs b/src/full/Agda/Compiler/Epic/Forcing.hs
index e1dce35..4e67ad2 100644
--- a/src/full/Agda/Compiler/Epic/Forcing.hs
+++ b/src/full/Agda/Compiler/Epic/Forcing.hs
@@ -47,7 +47,7 @@ dataParameters = lift . dataParametersTCM
-- | Returns how many parameters a datatype has
dataParametersTCM :: QName -> TCM Nat
dataParametersTCM name = do
- m <- (sigDefinitions <$> use stImports)
+ m <- use $ stImports . sigDefinitions
return $ maybe __IMPOSSIBLE__ (defnPars . theDef) (HM.lookup name m)
where
defnPars :: Defn -> Nat
@@ -154,7 +154,7 @@ takeTele _ _ = __IMPOSSIBLE__
-- | Main function for removing pattern matching on forced variables
remForced :: [Fun] -> Compile TCM [Fun]
remForced fs = do
- defs <- lift (sigDefinitions <$> use stImports)
+ defs <- lift $ use $ stImports . sigDefinitions
forM fs $ \f -> case f of
Fun{} -> case funQName f >>= flip HM.lookup defs of
Nothing -> __IMPOSSIBLE__
diff --git a/src/full/Agda/Compiler/Epic/NatDetection.hs b/src/full/Agda/Compiler/Epic/NatDetection.hs
index 705b007..4621086 100644
--- a/src/full/Agda/Compiler/Epic/NatDetection.hs
+++ b/src/full/Agda/Compiler/Epic/NatDetection.hs
@@ -31,7 +31,7 @@ import Agda.Utils.Lens
-- form [zeroConstr, sucConstr]
getNatish :: Compile TCM [(ForcedArgs, [QName])]
getNatish = do
- sig <- lift (sigDefinitions <$> use stImports)
+ sig <- lift $ use $ stImports . sigDefinitions
let defs = HM.toList sig
fmap catMaybes $ forM defs $ \(q, def) ->
case theDef def of
@@ -49,7 +49,7 @@ isNatish q d = do -- A datatype ...
z <- zip constrs <$> mapM getForcedArgs constrs
case sortBy (compare `on` nrRel . snd) z of
[(cz,fz), (cs,fs)] -> do
- sig <- lift (sigDefinitions <$> use stImports)
+ sig <- lift $ use $ stImports . sigDefinitions
let ts = defType $ sig HM.! cs
nr = dataPars d
return $ do
diff --git a/src/full/Agda/Compiler/Epic/Smashing.hs b/src/full/Agda/Compiler/Epic/Smashing.hs
index 1d923b3..8c29557 100644
--- a/src/full/Agda/Compiler/Epic/Smashing.hs
+++ b/src/full/Agda/Compiler/Epic/Smashing.hs
@@ -41,7 +41,7 @@ defnPars d = 0
-- | Main function, smash as much as possible
smash'em :: [Fun] -> Compile TCM [Fun]
smash'em funs = do
- defs <- lift (sigDefinitions <$> use stImports)
+ defs <- lift $ use $ stImports . sigDefinitions
funs' <- forM funs $ \f -> case f of
AA.Fun{} -> case funQName f >>= flip HM.lookup defs of
Nothing -> do
@@ -75,7 +75,7 @@ inferable :: Set QName -> QName -> [SI.Arg Term] -> Compile TCM (Maybe Expr)
inferable visited dat args | dat `Set.member` visited = return Nothing
inferable visited dat args = do
lift $ reportSLn "epic.smashing" 10 $ " inferring:" ++ (show dat)
- defs <- lift (sigDefinitions <$> use stImports)
+ defs <- lift $ use $ stImports . sigDefinitions
let def = fromMaybe __IMPOSSIBLE__ $ HM.lookup dat defs
case theDef def of
d@Datatype{} -> do
@@ -91,7 +91,7 @@ inferable visited dat args = do
return Nothing
where
inferableArgs c pars = do
- defs <- lift (sigDefinitions <$> use stImports)
+ defs <- lift $ use $ stImports . sigDefinitions
let def = fromMaybe __IMPOSSIBLE__ $ HM.lookup c defs
forc <- getForcedArgs c
TelV tel _ <- lift $ telView (defType def `apply` genericTake pars args)
@@ -120,7 +120,7 @@ inferableTerm visited t = do
-- | Find the only possible value for a certain type. If we fail return Nothing
smashable :: Int -> Type -> Compile TCM (Maybe Expr)
smashable origArity typ = do
- defs <- lift (sigDefinitions <$> use stImports)
+ defs <- lift $ use $ stImports . sigDefinitions
TelV tele retType <- lift $ telView typ
retType' <- return retType -- lift $ reduce retType
diff --git a/src/full/Agda/Compiler/Epic/Static.hs b/src/full/Agda/Compiler/Epic/Static.hs
index 3f78d7e..f90d71b 100644
--- a/src/full/Agda/Compiler/Epic/Static.hs
+++ b/src/full/Agda/Compiler/Epic/Static.hs
@@ -54,7 +54,7 @@ evaluateCC ccs = case ccs of
etaExpand :: Term -> Compile TCM Term
etaExpand def@(Def n ts) = do
- defs <- lift (sigDefinitions <$> use stImports)
+ defs <- lift $ use $ stImports . sigDefinitions
let f = maybe __IMPOSSIBLE__ theDef (HM.lookup n defs)
len = length . clausePats . head . funClauses $ f
toEta :: Num a => a
@@ -115,7 +115,7 @@ instance Evaluate Term where
-}
isStatic :: QName -> Compile TCM Bool
isStatic q = do
- defs <- lift (sigDefinitions <$> use stImports)
+ defs <- lift $ use $ stImports . sigDefinitions
return $ case fmap theDef $ HM.lookup q defs of
Nothing -> False
Just (f@Function{}) -> funStatic f
diff --git a/src/full/Agda/Compiler/MAlonzo/Compiler.hs b/src/full/Agda/Compiler/MAlonzo/Compiler.hs
index 654b80a..74c5323 100644
--- a/src/full/Agda/Compiler/MAlonzo/Compiler.hs
+++ b/src/full/Agda/Compiler/MAlonzo/Compiler.hs
@@ -1,6 +1,6 @@
-{-# LANGUAGE CPP #-}
-{-# LANGUAGE FlexibleContexts #-}
-{-# LANGUAGE PatternGuards #-}
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Agda.Compiler.MAlonzo.Compiler where
@@ -197,7 +197,7 @@ definition kit Defn{defName = q, defType = ty, defCompiledRep = compiled, theDef
, HS.FunBind [HS.Match dummy infV
(List.map HS.PVar vars) Nothing
(HS.UnGuardedRhs HS.unit_con)
- (HS.BDecls [])]
+ emptyBinds]
]
Constructor{} | Just q == (nameOfSharp <$> kit) -> do
let sharp = unqhname "d" q
@@ -209,7 +209,7 @@ definition kit Defn{defName = q, defType = ty, defCompiledRep = compiled, theDef
[HS.PVar x]
Nothing
(HS.UnGuardedRhs (HS.Var (HS.UnQual x)))
- (HS.BDecls [])]
+ emptyBinds]
]
Function{} | Just q == (nameOfFlat <$> kit) -> do
let flat = unqhname "d" q
@@ -221,7 +221,7 @@ definition kit Defn{defName = q, defType = ty, defCompiledRep = compiled, theDef
[HS.PVar x]
Nothing
(HS.UnGuardedRhs (HS.Var (HS.UnQual x)))
- (HS.BDecls [])]
+ emptyBinds]
]
Axiom{} -> return $ fb axiomErr
@@ -264,7 +264,7 @@ definition kit Defn{defName = q, defType = ty, defCompiledRep = compiled, theDef
tsig = HS.TypeSig dummy [HS.Ident name] (fakeType t)
def :: HS.Decl
- def = HS.FunBind [HS.Match dummy (HS.Ident name) [] Nothing (HS.UnGuardedRhs (hsVarUQ $ dsubname q 0)) (HS.BDecls [])]
+ def = HS.FunBind [HS.Match dummy (HS.Ident name) [] Nothing (HS.UnGuardedRhs (hsVarUQ $ dsubname q 0)) emptyBinds]
return ([tsig,def] ++ ccls)
functionFromClauses :: [Clause] -> TCM [HS.Decl]
@@ -273,7 +273,7 @@ definition kit Defn{defName = q, defType = ty, defCompiledRep = compiled, theDef
functionFromCaseTree :: QName -> CompiledClauses -> TCM [HS.Decl]
functionFromCaseTree q cc = do
e <- casetree cc `runReaderT` initCCEnv (Just q)
- return $ [HS.FunBind [HS.Match dummy (dsubname q 0) [] Nothing (HS.UnGuardedRhs e) (HS.BDecls [])]]
+ return $ [HS.FunBind [HS.Match dummy (dsubname q 0) [] Nothing (HS.UnGuardedRhs e) emptyBinds]]
tag :: Nat -> [Clause] -> [(Nat, Bool, Clause)]
tag _ [] = []
@@ -281,9 +281,17 @@ definition kit Defn{defName = q, defType = ty, defCompiledRep = compiled, theDef
tag i (cl:cls) = (i, False, cl) : tag (i + 1) cls
mkwhere :: [HS.Decl] -> [HS.Decl]
- mkwhere (HS.FunBind [m0, HS.Match _ dn ps mt rhs (HS.BDecls [])] :
+ mkwhere (HS.FunBind [m0, HS.Match _ dn ps mt rhs emptyBinds] :
fbs@(_:_)) =
- [HS.FunBind [m0, HS.Match dummy dn ps mt rhs (HS.BDecls fbs)]]
+ [HS.FunBind [m0, HS.Match dummy dn ps mt rhs bindsAux]]
+ where
+#if MIN_VERSION_haskell_src_exts(1,17,0)
+ bindsAux :: Maybe HS.Binds
+ bindsAux = Just $ HS.BDecls fbs
+#else
+ bindsAux :: HS.Binds
+ bindsAux = HS.BDecls fbs
+#endif
mkwhere fbs = fbs
fbWithType :: HaskellType -> HS.Exp -> [HS.Decl]
@@ -292,7 +300,7 @@ definition kit Defn{defName = q, defType = ty, defCompiledRep = compiled, theDef
fb :: HS.Exp -> [HS.Decl]
fb e = [HS.FunBind [HS.Match dummy (unqhname "d" q) [] Nothing
- (HS.UnGuardedRhs $ e) (HS.BDecls [])]]
+ (HS.UnGuardedRhs $ e) emptyBinds]]
axiomErr :: HS.Exp
axiomErr = rtmError $ "postulate evaluated: " ++ show (A.qnameToConcrete q)
@@ -377,12 +385,12 @@ catchAllAlts :: Maybe CompiledClauses -> CC [HS.Alt]
catchAllAlts (Just cc) = mapM (branch HS.PWildCard) [cc]
catchAllAlts Nothing = do
q <- fromMaybe __IMPOSSIBLE__ <$> asks ccFunName
- return [ HS.Alt dummy HS.PWildCard (HS.UnGuardedRhs $ rtmIncompleteMatch q) (HS.BDecls []) ]
+ return [ HS.Alt dummy HS.PWildCard (HS.UnGuardedRhs $ rtmIncompleteMatch q) emptyBinds ]
branch :: HS.Pat -> CompiledClauses -> CC HS.Alt
branch pat cc = do
e <- casetree cc
- return $ HS.Alt dummy pat (HS.UnGuardedRhs e) (HS.BDecls [])
+ return $ HS.Alt dummy pat (HS.UnGuardedRhs e) emptyBinds
-- | Replace de Bruijn Level @x@ by @n@ new variables.
replaceVar :: Int -> Int -> ([HS.Name] -> CC a) -> CC a
@@ -466,7 +474,7 @@ checkConstructorType q = do
Just (HsDefn ty hs) <- compiledHaskell . defCompiledRep <$> getConstInfo q
return [ HS.TypeSig dummy [unqhname "check" q] $ fakeType ty
, HS.FunBind [HS.Match dummy (unqhname "check" q) [] Nothing
- (HS.UnGuardedRhs $ fakeExp hs) (HS.BDecls [])]
+ (HS.UnGuardedRhs $ fakeExp hs) emptyBinds]
]
checkCover :: QName -> HaskellType -> Nat -> [QName] -> TCM [HS.Decl]
@@ -476,7 +484,7 @@ checkCover q ty n cs = do
(a, _) <- conArityAndPars c
Just (HsDefn _ hsc) <- compiledHaskell . defCompiledRep <$> getConstInfo c
let pat = HS.PApp (HS.UnQual $ HS.Ident hsc) $ replicate a HS.PWildCard
- return $ HS.Alt dummy pat (HS.UnGuardedRhs $ HS.unit_con) (HS.BDecls [])
+ return $ HS.Alt dummy pat (HS.UnGuardedRhs $ HS.unit_con) emptyBinds
cs <- mapM makeClause cs
let rhs = case cs of
@@ -485,7 +493,7 @@ checkCover q ty n cs = do
return [ HS.TypeSig dummy [unqhname "cover" q] $ fakeType $ unwords (ty : tvs) ++ " -> ()"
, HS.FunBind [HS.Match dummy (unqhname "cover" q) [HS.PVar $ HS.Ident "x"]
- Nothing (HS.UnGuardedRhs rhs) (HS.BDecls [])]
+ Nothing (HS.UnGuardedRhs rhs) emptyBinds]
]
-- | Move somewhere else!
@@ -509,7 +517,7 @@ clause q maybeName (i, isLast, Clause{ namedClausePats = ps, clauseBody = b }) =
failrhs = rtmIncompleteMatch q -- Andreas, 2011-11-16 call to RTE instead of inlined error
-- failrhs = rtmError $ "incomplete pattern matching: " ++ show q
match hps rhs = HS.Match dummy (maybe (dsubname q i) HS.Ident maybeName) hps Nothing
- (HS.UnGuardedRhs rhs) (HS.BDecls [])
+ (HS.UnGuardedRhs rhs) emptyBinds
bvars (Body _) _ = []
bvars (Bind (Abs _ b')) n = HS.PVar (ihname "v" n) : bvars b' (n + 1)
bvars (Bind (NoAbs _ b)) n = HS.PWildCard : bvars b n
@@ -676,7 +684,7 @@ tvaldecl :: QName
-> Nat -> Nat -> [HS.ConDecl] -> Maybe Clause -> [HS.Decl]
tvaldecl q ind ntv npar cds cl =
HS.FunBind [HS.Match dummy vn pvs Nothing
- (HS.UnGuardedRhs HS.unit_con) (HS.BDecls [])] :
+ (HS.UnGuardedRhs HS.unit_con) emptyBinds] :
maybe [HS.DataDecl dummy kind [] tn tvs
(List.map (HS.QualConDecl dummy [] []) cds) []]
(const []) cl
diff --git a/src/full/Agda/Compiler/MAlonzo/Misc.hs b/src/full/Agda/Compiler/MAlonzo/Misc.hs
index 280e832..0d67aa3 100644
--- a/src/full/Agda/Compiler/MAlonzo/Misc.hs
+++ b/src/full/Agda/Compiler/MAlonzo/Misc.hs
@@ -54,10 +54,10 @@ curHsMod :: TCM HS.ModuleName
curHsMod = mazMod <$> curMName
curDefs :: TCM Definitions
-curDefs = sigDefinitions <$> curSig
+curDefs = (^. sigDefinitions) <$> curSig
sigMName :: Signature -> ModuleName
-sigMName sig = case Map.keys (sigSections sig) of
+sigMName sig = case Map.keys (sig ^. sigSections) of
[] -> __IMPOSSIBLE__
m : _ -> m
@@ -203,7 +203,7 @@ unsafeCoerceMod = HS.ModuleName "Unsafe.Coerce"
fakeD :: HS.Name -> String -> HS.Decl
fakeD v s = HS.FunBind [ HS.Match dummy v [] Nothing
(HS.UnGuardedRhs $ hsVarUQ $ HS.Ident $ s)
- (HS.BDecls [])
+ emptyBinds
]
fakeDS :: String -> String -> HS.Decl
@@ -220,3 +220,15 @@ fakeExp = HS.Var . HS.UnQual . HS.Ident
dummy :: a
dummy = error "MAlonzo : this dummy value should not have been eval'ed."
+
+--------------------------------------------------
+-- Auxiliary definitions
+--------------------------------------------------
+
+#if MIN_VERSION_haskell_src_exts(1,17,0)
+emptyBinds :: Maybe HS.Binds
+emptyBinds = Nothing
+#else
+emptyBinds :: HS.Binds
+emptyBinds = HS.BDecls []
+#endif
diff --git a/src/full/Agda/Compiler/MAlonzo/Pretty.hs b/src/full/Agda/Compiler/MAlonzo/Pretty.hs
index 379589e..db08a8d 100644
--- a/src/full/Agda/Compiler/MAlonzo/Pretty.hs
+++ b/src/full/Agda/Compiler/MAlonzo/Pretty.hs
@@ -1,7 +1,7 @@
-{-# LANGUAGE FlexibleContexts #-}
-{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
-{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TemplateHaskell #-}
------------------------------------------------------------------------
-- Pretty-printing of Haskell modules
diff --git a/src/full/Agda/Compiler/MAlonzo/Primitives.hs b/src/full/Agda/Compiler/MAlonzo/Primitives.hs
index 57ae9f2..34ca90d 100644
--- a/src/full/Agda/Compiler/MAlonzo/Primitives.hs
+++ b/src/full/Agda/Compiler/MAlonzo/Primitives.hs
@@ -56,7 +56,7 @@ checkTypeOfMain q ty ret
[prettyTCM io] ++ pwords " A, for some A. The given type is" ++ [prettyTCM ty]
typeError $ GenericError $ show err
where
- mainAlias = HS.FunBind [HS.Match dummy mainLHS [] Nothing mainRHS $ HS.BDecls [] ]
+ mainAlias = HS.FunBind [HS.Match dummy mainLHS [] Nothing mainRHS emptyBinds ]
mainLHS = HS.Ident "main"
mainRHS = HS.UnGuardedRhs $ HS.Var $ HS.UnQual $ unqhname "d" q
diff --git a/src/full/Agda/Interaction/BasicOps.hs b/src/full/Agda/Interaction/BasicOps.hs
index e247dea..6a96448 100644
--- a/src/full/Agda/Interaction/BasicOps.hs
+++ b/src/full/Agda/Interaction/BasicOps.hs
@@ -510,15 +510,9 @@ metaHelperType norm ii rng s = case words s of
-- Remember the arity of a
TelV atel _ <- telView a
let arity = size atel
- fv = allFreeVars (vs, as)
- SplitTel delta1 delta2 perm = splitTelescope fv tel
- a' = renameP (reverseP perm) a
- (vs, as) <- do
- let -- We know that as does not depend on Δ₂
- rho = compactS __IMPOSSIBLE__ (replicate (size delta2) Nothing)
- return $ applySubst rho $ renameP (reverseP perm) (vs, as)
+ (delta1, delta2, _, a', as', vs') = splitTelForWith tel a as vs
a <- local (\e -> e { envPrintDomainFreePi = True }) $ do
- reify =<< cleanupType arity args =<< normalForm norm =<< withFunctionType delta1 vs as delta2 a'
+ reify =<< cleanupType arity args =<< normalForm norm =<< withFunctionType delta1 vs' as' delta2 a'
return (OfType' h a)
where
cleanupType arity args t = do
diff --git a/src/full/Agda/Interaction/Highlighting/Generate.hs b/src/full/Agda/Interaction/Highlighting/Generate.hs
index 151fa6f..6947917 100644
--- a/src/full/Agda/Interaction/Highlighting/Generate.hs
+++ b/src/full/Agda/Interaction/Highlighting/Generate.hs
@@ -387,7 +387,7 @@ nameKinds hlLevel decl = do
let merged = HMap.unions [local, imported, syntax]
return (\n -> HMap.lookup n merged)
where
- fix = HMap.map (defnToKind . theDef) . sigDefinitions
+ fix = HMap.map (defnToKind . theDef) . (^. sigDefinitions)
-- | The 'M.Axiom' constructor is used to represent various things
-- which are not really axioms, so when maps are merged 'Postulate's
diff --git a/src/full/Agda/Interaction/Highlighting/LaTeX.hs b/src/full/Agda/Interaction/Highlighting/LaTeX.hs
index 2adf0c6..e6a9805 100644
--- a/src/full/Agda/Interaction/Highlighting/LaTeX.hs
+++ b/src/full/Agda/Interaction/Highlighting/LaTeX.hs
@@ -413,7 +413,7 @@ fixity = do
-- Operations followed by newlines.
(ops, nls) | otherwise -> do
- output $ escape ops
+ output $ (T.pack " " <+>) $ T.unwords $ map ((cmdPrefix <+> T.pack "FixityOp" <+>) . cmdArg . escape) $ T.words ops
spaces (T.group nls)
diff --git a/src/full/Agda/Interaction/InteractionTop.hs b/src/full/Agda/Interaction/InteractionTop.hs
index ac7a2a7..ee47a48 100644
--- a/src/full/Agda/Interaction/InteractionTop.hs
+++ b/src/full/Agda/Interaction/InteractionTop.hs
@@ -719,15 +719,15 @@ interpret (Cmd_make_case ii rng s) = do
render = renderStyle (style { mode = OneLineMode })
makeCaseVariant :: CaseContext -> MakeCaseVariant
- makeCaseVariant FunctionDef = R.Function
- makeCaseVariant (ExtendedLambda _ _) = R.ExtendedLambda
+ makeCaseVariant Nothing = R.Function
+ makeCaseVariant Just{} = R.ExtendedLambda
-- very dirty hack, string manipulation by dropping the function name
-- and replacing the last " = " with " -> ". It's important not to replace
-- the equal sign in named implicit with an arrow!
extlam_dropName :: CaseContext -> String -> String
- extlam_dropName FunctionDef x = x
- extlam_dropName (ExtendedLambda _ _) x
+ extlam_dropName Nothing x = x
+ extlam_dropName Just{} x
= unwords $ reverse $ replEquals $ reverse $ drop 1 $ words x
where
replEquals ("=" : ws) = "→" : ws
@@ -736,9 +736,9 @@ interpret (Cmd_make_case ii rng s) = do
-- Drops pattern added to extended lambda functions when lambda lifting them
extlam_dropLLifted :: CaseContext -> Bool -> A.Clause -> A.Clause
- extlam_dropLLifted FunctionDef _ x = x
- extlam_dropLLifted (ExtendedLambda h nh) hidden (A.Clause (A.LHS info (A.LHSProj{}) ps) rhs decl) = __IMPOSSIBLE__
- extlam_dropLLifted (ExtendedLambda h nh) hidden (A.Clause (A.LHS info (A.LHSHead name nps) ps) rhs decl)
+ extlam_dropLLifted Nothing _ x = x
+ extlam_dropLLifted (Just (ExtLamInfo h nh)) hidden (A.Clause (A.LHS info A.LHSProj{} ps) rhs decl) = __IMPOSSIBLE__
+ extlam_dropLLifted (Just (ExtLamInfo h nh)) hidden (A.Clause (A.LHS info (A.LHSHead name nps) ps) rhs decl)
= let n = if hidden then h + nh else nh
in
(A.Clause (A.LHS info (A.LHSHead name (drop n nps)) ps) rhs decl)
diff --git a/src/full/Agda/Interaction/MakeCase.hs b/src/full/Agda/Interaction/MakeCase.hs
index 3dce9f4..51ce3a6 100644
--- a/src/full/Agda/Interaction/MakeCase.hs
+++ b/src/full/Agda/Interaction/MakeCase.hs
@@ -34,6 +34,7 @@ import Agda.Interaction.Options
import Agda.Interaction.BasicOps
import Agda.Utils.Functor
+import Agda.Utils.Lens
import Agda.Utils.List
import Agda.Utils.Monad
import Agda.Utils.Null
@@ -45,10 +46,7 @@ import qualified Agda.Utils.HashMap as HMap
#include "undefined.h"
import Agda.Utils.Impossible
-data CaseContext
- = FunctionDef
- | ExtendedLambda Int Int
- deriving (Eq)
+type CaseContext = Maybe ExtLamInfo
-- | Find the clause whose right hand side is the given meta
-- BY SEARCHING THE WHOLE SIGNATURE. Returns
@@ -64,11 +62,11 @@ findClause :: MetaId -> TCM (CaseContext, QName, Clause)
findClause m = do
sig <- getImportedSignature
let res = do
- def <- HMap.elems $ sigDefinitions sig
+ def <- HMap.elems $ sig ^. sigDefinitions
Function{funClauses = cs, funExtLam = extlam} <- [theDef def]
c <- cs
unless (rhsIsm $ clauseBody c) []
- return (defName def, c, extlam)
+ return (extlam, defName def, c)
case res of
[] -> do
reportSDoc "interaction.case" 10 $ vcat $
@@ -76,7 +74,7 @@ findClause m = do
, text "expected rhs to be meta var" <+> (text $ show m)
, text "but could not find it in the signature"
]
- reportSDoc "interaction.case" 100 $ vcat $ map (text . show) (HMap.elems $ sigDefinitions sig) -- you asked for it!
+ reportSDoc "interaction.case" 100 $ vcat $ map (text . show) (HMap.elems $ sig ^. sigDefinitions) -- you asked for it!
ifM (isInstantiatedMeta m)
-- Andreas, 2012-03-22 If the goal has been solved by eta expansion, further
-- case splitting is pointless and `smart-ass Agda' will refuse.
@@ -84,8 +82,7 @@ findClause m = do
-- SUPER UGLY HACK.
(typeError $ GenericError "Since goal is solved, further case distinction is not supported; try `Solve constraints' instead")
(typeError $ GenericError "Right hand side must be a single hole when making a case distinction")
- [(n,c, Just (h, nh))] -> return (ExtendedLambda h nh , n , c)
- [(n,c, Nothing)] -> return (FunctionDef , n , c)
+ [triple] -> return triple
_ -> __IMPOSSIBLE__
where
rhsIsm (Bind b) = rhsIsm $ unAbs b
@@ -113,7 +110,7 @@ parseVariables ii rng ss = do
(,i) . P.render <$> prettyTCM (var i)
-- Get number of module parameters. These cannot be split on.
- fv <- getModuleFreeVars =<< currentModule
+ fv <- getCurrentModuleFreeVars
let numSplittableVars = n - fv
-- Resolve each string to a variable.
diff --git a/src/full/Agda/Syntax/Abstract/Name.hs b/src/full/Agda/Syntax/Abstract/Name.hs
index 7328671..295fe1d 100644
--- a/src/full/Agda/Syntax/Abstract/Name.hs
+++ b/src/full/Agda/Syntax/Abstract/Name.hs
@@ -32,6 +32,7 @@ import {-# SOURCE #-} Agda.Syntax.Fixity
import Agda.Syntax.Concrete.Name (IsNoName(..))
import qualified Agda.Syntax.Concrete.Name as C
+import Agda.Utils.List
import Agda.Utils.Monad
import Agda.Utils.Pretty
import Agda.Utils.Size
@@ -123,6 +124,10 @@ mnameFromList = MName
noModuleName :: ModuleName
noModuleName = mnameFromList []
+commonParentModule :: ModuleName -> ModuleName -> ModuleName
+commonParentModule m1 m2 =
+ mnameFromList $ commonPrefix (mnameToList m1) (mnameToList m2)
+
-- | Make a 'Name' from some kind of string.
class MkName a where
-- | The 'Range' sets the /definition site/ of the name, not the use site.
diff --git a/src/full/Agda/Syntax/Common.hs b/src/full/Agda/Syntax/Common.hs
index 65a44ee..29cfca5 100644
--- a/src/full/Agda/Syntax/Common.hs
+++ b/src/full/Agda/Syntax/Common.hs
@@ -720,6 +720,19 @@ instance Arbitrary NameId where
instance CoArbitrary NameId
+-- | A meta variable identifier is just a natural number.
+--
+newtype MetaId = MetaId { metaId :: Nat }
+ deriving (Eq, Ord, Num, Real, Enum, Integral, Typeable)
+
+instance Pretty MetaId where
+ pretty (MetaId n) = text $ "_" ++ show n
+
+-- | Show non-record version of this newtype.
+instance Show MetaId where
+ showsPrec p (MetaId n) = showParen (p > 0) $
+ showString "MetaId " . shows n
+
newtype Constr a = Constr a
---------------------------------------------------------------------------
diff --git a/src/full/Agda/Syntax/Concrete/Definitions.hs b/src/full/Agda/Syntax/Concrete/Definitions.hs
index 7ffd24b..3460d9f 100644
--- a/src/full/Agda/Syntax/Concrete/Definitions.hs
+++ b/src/full/Agda/Syntax/Concrete/Definitions.hs
@@ -39,6 +39,7 @@ module Agda.Syntax.Concrete.Definitions
, Nice, runNice
, niceDeclarations
, notSoNiceDeclaration
+ , niceHasAbstract
, Measure
) where
@@ -157,7 +158,7 @@ data DeclarationException
| UselessPrivate Range
| UselessAbstract Range
| UselessInstance Range
- | WrongContentPostulateBlock Range
+ | WrongContentBlock KindOfBlock Range
| AmbiguousFunClauses LHS [Name] -- ^ in a mutual block, a clause could belong to any of the @[Name]@ type signatures
| InvalidTerminationCheckPragma Range
| InvalidMeasureMutual Range
@@ -168,6 +169,16 @@ data DeclarationException
-- by {-# TERMINATING #-} and {-# NON_TERMINATING #-}.
deriving (Typeable)
+-- | Several declarations expect only type signatures as sub-declarations. These are:
+data KindOfBlock
+ = PostulateBlock -- ^ @postulate@
+ | PrimitiveBlock -- ^ @primitive@. Ensured by parser.
+ | InstanceBlock -- ^ @instance@. Actually, here all kinds of sub-declarations are allowed a priori.
+ | FieldBlock -- ^ @field@. Ensured by parser.
+ | DataBlock -- ^ @data ... where@. Here we got a bad error message for Agda-2.4.3 (Issue 1698).
+ deriving (Typeable, Eq, Ord, Show)
+
+
instance HasRange DeclarationException where
getRange (MultipleFixityDecls xs) = getRange (fst $ head xs)
getRange (InvalidName x) = getRange x
@@ -186,7 +197,7 @@ instance HasRange DeclarationException where
getRange (UselessPrivate r) = r
getRange (UselessAbstract r) = r
getRange (UselessInstance r) = r
- getRange (WrongContentPostulateBlock r) = r
+ getRange (WrongContentBlock _ r) = r
getRange (InvalidTerminationCheckPragma r) = r
getRange (InvalidMeasureMutual r) = r
getRange (PragmaNoTerminationCheck r) = r
@@ -254,7 +265,7 @@ instance Pretty DeclarationException where
pwords "Using abstract here has no effect. Abstract applies only definitions like data definitions, record type definitions and function clauses."
pretty (UselessInstance _) = fsep $
pwords "Using instance here has no effect. Instance applies only to declarations that introduce new identifiers into the module, like type signatures and axioms."
- pretty (WrongContentPostulateBlock _) = fsep $
+ pretty (WrongContentBlock b _) = fsep $
pwords "A postulate block can only contain type signatures or instance blocks"
pretty (PragmaNoTerminationCheck _) = fsep $
pwords "Pragma {-# NO_TERMINATION_CHECK #-} has been removed. To skip the termination check, label your definitions either as {-# TERMINATING #-} or {-# NON_TERMINATING #-}."
@@ -561,16 +572,16 @@ niceDeclarations ds = do
case d of
TypeSig{} -> niceTypeSig TerminationCheck d ds
FunClause{} -> niceFunClause TerminationCheck d ds
- Field x t -> (++) <$> niceAxioms [ d ] <*> nice ds
+ Field x t -> (++) <$> niceAxioms FieldBlock [ d ] <*> nice ds
DataSig r CoInductive x tel t -> throwError (Codata r)
Data r CoInductive x tel t cs -> throwError (Codata r)
DataSig r Inductive x tel t -> do
addLoneSig x (DataName $ parameters tel)
- (++) <$> dataOrRec DataDef NiceDataSig niceAxioms r x tel (Just t) Nothing
+ (++) <$> dataOrRec DataDef NiceDataSig (niceAxioms DataBlock) r x tel (Just t) Nothing
<*> nice ds
Data r Inductive x tel t cs -> do
t <- defaultTypeSig (DataName $ parameters tel) x t
- (++) <$> dataOrRec DataDef NiceDataSig niceAxioms r x tel t (Just cs)
+ (++) <$> dataOrRec DataDef NiceDataSig (niceAxioms DataBlock) r x tel t (Just cs)
<*> nice ds
RecordSig r x tel t -> do
addLoneSig x (RecName $ parameters tel)
@@ -594,9 +605,9 @@ niceDeclarations ds = do
InstanceB r ds' ->
(++) <$> (instanceBlock r =<< nice ds') <*> nice ds
- Postulate _ ds' -> (++) <$> niceAxioms ds' <*> nice ds
+ Postulate _ ds' -> (++) <$> niceAxioms PostulateBlock ds' <*> nice ds
- Primitive _ ds' -> (++) <$> (map toPrim <$> niceAxioms ds') <*> nice ds
+ Primitive _ ds' -> (++) <$> (map toPrim <$> niceAxioms PrimitiveBlock ds') <*> nice ds
Module r x tel ds' ->
(NiceModule r PublicAccess ConcreteDef x tel ds' :) <$> nice ds
@@ -702,18 +713,22 @@ niceDeclarations ds = do
dropType b@DomainFree{} = [b]
-- Translate axioms
- niceAxioms :: [TypeSignatureOrInstanceBlock] -> Nice [NiceDeclaration]
- niceAxioms ds = liftM List.concat $ mapM niceAxiom ds
-
- niceAxiom :: TypeSignatureOrInstanceBlock -> Nice [NiceDeclaration]
- niceAxiom d@(TypeSig rel x t) = do
- fx <- getFixity x
- return $ [ Axiom (getRange d) fx PublicAccess NotInstanceDef rel x t ]
- niceAxiom d@(Field x argt) = do
- fx <- getFixity x
- return $ [ NiceField (getRange d) fx PublicAccess ConcreteDef x argt ]
- niceAxiom d@(InstanceB r decls) = instanceBlock r =<< niceAxioms decls
- niceAxiom d = throwError $ WrongContentPostulateBlock $ getRange d
+ niceAxioms :: KindOfBlock -> [TypeSignatureOrInstanceBlock] -> Nice [NiceDeclaration]
+ niceAxioms b ds = liftM List.concat $ mapM (niceAxiom b) ds
+
+ niceAxiom :: KindOfBlock -> TypeSignatureOrInstanceBlock -> Nice [NiceDeclaration]
+ niceAxiom b d = case d of
+ TypeSig rel x t -> do
+ fx <- getFixity x
+ return [ Axiom (getRange d) fx PublicAccess NotInstanceDef rel x t ]
+ Field x argt -> do
+ fx <- getFixity x
+ return [ NiceField (getRange d) fx PublicAccess ConcreteDef x argt ]
+ InstanceB r decls -> do
+ instanceBlock r =<< niceAxioms InstanceBlock decls
+ Pragma p@(RewritePragma r _) -> do
+ return [ NicePragma r p ]
+ _ -> throwError $ WrongContentBlock b $ getRange d
toPrim :: NiceDeclaration -> NiceDeclaration
toPrim (Axiom r f a i rel x t) = PrimitiveFunction r f a ConcreteDef x t
@@ -820,8 +835,11 @@ niceDeclarations ds = do
-- isFunClauseOf _ _ = False
removeSingletonRawAppP :: Pattern -> Pattern
- removeSingletonRawAppP (RawAppP _ [p]) = removeSingletonRawAppP p
- removeSingletonRawAppP p = p
+ removeSingletonRawAppP p =
+ case p of
+ RawAppP _ [p'] -> removeSingletonRawAppP p'
+ ParenP _ p' -> removeSingletonRawAppP p'
+ _ -> p
-- Make an old style mutual block from a list of mutual declarations
mkOldMutual :: Range -> [NiceDeclaration] -> Nice NiceDeclaration
@@ -1092,3 +1110,26 @@ notSoNiceDeclaration d =
where unThing (ThingWithFixity c _) = c
NicePatternSyn r _ n as p -> PatternSyn r n as p
NiceUnquoteDecl r _ _ _ _ _ x e -> UnquoteDecl r x e
+
+-- | Has the 'NiceDeclaration' a field of type 'IsAbstract'?
+niceHasAbstract :: NiceDeclaration -> Maybe IsAbstract
+niceHasAbstract d =
+ case d of
+ Axiom{} -> Nothing
+ NiceField _ _ _ a _ _ -> Just a
+ PrimitiveFunction _ _ _ a _ _ -> Just a
+ NiceMutual{} -> Nothing
+ NiceModule _ _ a _ _ _ -> Just a
+ NiceModuleMacro{} -> Nothing
+ NiceOpen{} -> Nothing
+ NiceImport{} -> Nothing
+ NicePragma{} -> Nothing
+ NiceRecSig{} -> Nothing
+ NiceDataSig{} -> Nothing
+ NiceFunClause _ _ a _ _ -> Just a
+ FunSig{} -> Nothing
+ FunDef _ _ _ a _ _ _ -> Just a
+ DataDef _ _ a _ _ _ -> Just a
+ RecDef _ _ a _ _ _ _ _ -> Just a
+ NicePatternSyn{} -> Nothing
+ NiceUnquoteDecl _ _ _ _ a _ _ _ -> Just a
diff --git a/src/full/Agda/Syntax/Concrete/Operators.hs b/src/full/Agda/Syntax/Concrete/Operators.hs
index 8581cda..e47f40e 100644
--- a/src/full/Agda/Syntax/Concrete/Operators.hs
+++ b/src/full/Agda/Syntax/Concrete/Operators.hs
@@ -369,11 +369,6 @@ classifyPattern conf p =
-- | Parses a left-hand side, and makes sure that it defined the expected name.
--- TODO: check the arities of constructors. There is a possible ambiguity with
--- postfix constructors:
--- Assume _ * is a constructor. Then 'true *' can be parsed as either the
--- intended _* applied to true, or as true applied to a variable *. If we
--- check arities this problem won't appear.
parseLHS :: Name -> Pattern -> ScopeM LHSCore
parseLHS top p = billToParser $ do
res <- parseLHS' IsLHS (Just top) p
@@ -382,11 +377,6 @@ parseLHS top p = billToParser $ do
_ -> typeError $ NoParseForLHS IsLHS p
-- | Parses a pattern.
--- TODO: check the arities of constructors. There is a possible ambiguity with
--- postfix constructors:
--- Assume _ * is a constructor. Then 'true *' can be parsed as either the
--- intended _* applied to true, or as true applied to a variable *. If we
--- check arities this problem won't appear.
parsePattern :: Pattern -> ScopeM Pattern
parsePattern = parsePatternOrSyn IsLHS
diff --git a/src/full/Agda/Syntax/Info.hs b/src/full/Agda/Syntax/Info.hs
index fc4e16b..00d1460 100644
--- a/src/full/Agda/Syntax/Info.hs
+++ b/src/full/Agda/Syntax/Info.hs
@@ -33,7 +33,7 @@ import Agda.Utils.Null
data MetaInfo = MetaInfo
{ metaRange :: Range
, metaScope :: ScopeInfo
- , metaNumber :: Maybe Nat -- ^ The 'MetaId', not the 'InteractionId'.
+ , metaNumber :: Maybe MetaId
, metaNameSuggestion :: String
}
deriving (Typeable, Show)
diff --git a/src/full/Agda/Syntax/Internal.hs b/src/full/Agda/Syntax/Internal.hs
index 403fb33..bf9c1bd 100644
--- a/src/full/Agda/Syntax/Internal.hs
+++ b/src/full/Agda/Syntax/Internal.hs
@@ -14,6 +14,7 @@ module Agda.Syntax.Internal
( module Agda.Syntax.Internal
, module Agda.Syntax.Abstract.Name
, module Agda.Utils.Pointer
+ , MetaId(..)
) where
import Prelude hiding (foldr, mapM, null)
@@ -56,11 +57,12 @@ import Agda.Utils.Functor
import Agda.Utils.Geniplate
import Agda.Utils.Lens
import Agda.Utils.List
+import Agda.Utils.Maybe
import Agda.Utils.Null
import Agda.Utils.Permutation
import Agda.Utils.Pointer
import Agda.Utils.Size
-import Agda.Utils.Pretty
+import Agda.Utils.Pretty as P
#include "undefined.h"
import Agda.Utils.Impossible
@@ -271,11 +273,6 @@ data LevelAtom
-- ^ Introduced by 'instantiate', removed by 'reduce'.
deriving (Show, Typeable)
--- | A meta variable identifier is just a natural number.
---
-newtype MetaId = MetaId { metaId :: Nat }
- deriving (Eq, Ord, Num, Real, Enum, Integral, Typeable)
-
-- | Even if we are not stuck on a meta during reduction
-- we can fail to reduce a definition by pattern matching
-- for another reason.
@@ -909,11 +906,6 @@ instance Show a => Show (Abs a) where
showsPrec p (NoAbs x a) = showParen (p > 0) $
showString "NoAbs " . shows x . showString " " . showsPrec 10 a
--- | Show non-record version of this newtype.
-instance Show MetaId where
- showsPrec p (MetaId n) = showParen (p > 0) $
- showString "MetaId " . shows n
-
-- instance Show t => Show (Blocked t) where
-- showsPrec p (Blocked m x) = showParen (p > 0) $
-- showString "Blocked " . shows m . showString " " . showsPrec 10 x
@@ -1094,9 +1086,6 @@ instanceUniverseBiT' [] [t| ([Term], Term) |]
-- * Simple pretty printing
-----------------------------------------------------------------------------
-instance Pretty MetaId where
- pretty (MetaId n) = text $ "_" ++ show n
-
instance Pretty Substitution where
prettyPrec p rho = brackets $ pr rho
where
@@ -1193,3 +1182,24 @@ instance Pretty a => Pretty (Arg a) where
NotHidden -> prettyPrec p
Hidden -> braces . pretty
Instance -> braces . braces . pretty
+
+instance Pretty a => Pretty (Pattern' a) where
+ prettyPrec n (VarP x) = prettyPrec n x
+ prettyPrec _ (DotP t) = text "." P.<> prettyPrec 10 t
+ prettyPrec n (ConP c i ps) = mparens (n > 0) $
+ text (show $ conName c) <+> fsep (map (pretty . namedArg) ps)
+ -- -- Version with printing record type:
+ -- prettyPrec _ (ConP c i ps) = (if b then braces else parens) $ prTy $
+ -- text (show $ conName c) <+> fsep (map (pretty . namedArg) ps)
+ -- where
+ -- b = maybe False (== ConPImplicit) $ conPRecord i
+ -- prTy d = caseMaybe (conPType i) d $ \ t -> d <+> text ":" <+> pretty t
+ prettyPrec _ (LitP l) = text (show l)
+ prettyPrec _ (ProjP q) = text (show q)
+
+instance Pretty a => Pretty (ClauseBodyF a) where
+ pretty b = case b of
+ Bind (NoAbs _ b) -> pretty b
+ Bind (Abs x b) -> text (show x ++ ".") <+> pretty b
+ Body t -> pretty t
+ NoBody -> text "()"
diff --git a/src/full/Agda/Syntax/Parser/Parser.y b/src/full/Agda/Syntax/Parser/Parser.y
index 991a3e2..b0bab13 100644
--- a/src/full/Agda/Syntax/Parser/Parser.y
+++ b/src/full/Agda/Syntax/Parser/Parser.y
@@ -74,99 +74,100 @@ import Agda.Utils.Tuple
%nonassoc '->'
%token
- 'let' { TokKeyword KwLet $$ }
- 'in' { TokKeyword KwIn $$ }
- 'where' { TokKeyword KwWhere $$ }
- 'with' { TokKeyword KwWith $$ }
- 'rewrite' { TokKeyword KwRewrite $$ }
- 'postulate' { TokKeyword KwPostulate $$ }
- 'primitive' { TokKeyword KwPrimitive $$ }
- 'open' { TokKeyword KwOpen $$ }
- 'import' { TokKeyword KwImport $$ }
- 'using' { TokKeyword KwUsing $$ }
- 'hiding' { TokKeyword KwHiding $$ }
- 'renaming' { TokKeyword KwRenaming $$ }
- 'to' { TokKeyword KwTo $$ }
- 'public' { TokKeyword KwPublic $$ }
- 'module' { TokKeyword KwModule $$ }
- 'data' { TokKeyword KwData $$ }
- 'codata' { TokKeyword KwCoData $$ }
- 'record' { TokKeyword KwRecord $$ }
- 'constructor' { TokKeyword KwConstructor $$ }
- 'inductive' { TokKeyword KwInductive $$ }
- 'coinductive' { TokKeyword KwCoInductive $$ }
- 'field' { TokKeyword KwField $$ }
- 'infix' { TokKeyword KwInfix $$ }
- 'infixl' { TokKeyword KwInfixL $$ }
- 'infixr' { TokKeyword KwInfixR $$ }
- 'mutual' { TokKeyword KwMutual $$ }
- 'abstract' { TokKeyword KwAbstract $$ }
- 'private' { TokKeyword KwPrivate $$ }
- 'instance' { TokKeyword KwInstance $$ }
- 'Prop' { TokKeyword KwProp $$ }
- 'Set' { TokKeyword KwSet $$ }
- 'forall' { TokKeyword KwForall $$ }
- 'syntax' { TokKeyword KwSyntax $$ }
- 'pattern' { TokKeyword KwPatternSyn $$ }
- 'OPTIONS' { TokKeyword KwOPTIONS $$ }
- 'BUILTIN' { TokKeyword KwBUILTIN $$ }
- 'REWRITE' { TokKeyword KwREWRITE $$ }
- 'IMPORT' { TokKeyword KwIMPORT $$ }
- 'IMPOSSIBLE' { TokKeyword KwIMPOSSIBLE $$ }
- 'ETA' { TokKeyword KwETA $$ }
- 'NO_TERMINATION_CHECK' { TokKeyword KwNO_TERMINATION_CHECK $$ }
- 'NON_TERMINATING' { TokKeyword KwNON_TERMINATING $$ }
- 'TERMINATING' { TokKeyword KwTERMINATING $$ }
- 'MEASURE' { TokKeyword KwMEASURE $$ }
- 'COMPILED' { TokKeyword KwCOMPILED $$ }
- 'COMPILED_EXPORT' { TokKeyword KwCOMPILED_EXPORT $$ }
- 'COMPILED_DATA' { TokKeyword KwCOMPILED_DATA $$ }
- 'COMPILED_TYPE' { TokKeyword KwCOMPILED_TYPE $$ }
- 'COMPILED_EPIC' { TokKeyword KwCOMPILED_EPIC $$ }
- 'COMPILED_JS' { TokKeyword KwCOMPILED_JS $$ }
- 'STATIC' { TokKeyword KwSTATIC $$ }
- 'quoteGoal' { TokKeyword KwQuoteGoal $$ }
- 'quoteContext' { TokKeyword KwQuoteContext $$ }
- 'quote' { TokKeyword KwQuote $$ }
- 'quoteTerm' { TokKeyword KwQuoteTerm $$ }
- 'tactic' { TokKeyword KwTactic $$ }
- 'unquote' { TokKeyword KwUnquote $$ }
- 'unquoteDecl' { TokKeyword KwUnquoteDecl $$ }
-
- setN { TokSetN $$ }
- tex { TokTeX $$ }
- comment { TokComment $$ }
-
- '...' { TokSymbol SymEllipsis $$ }
- '..' { TokSymbol SymDotDot $$ }
- '.' { TokSymbol SymDot $$ }
- ';' { TokSymbol SymSemi $$ }
- ':' { TokSymbol SymColon $$ }
- '=' { TokSymbol SymEqual $$ }
- '_' { TokSymbol SymUnderscore $$ }
- '?' { TokSymbol SymQuestionMark $$ }
- '->' { TokSymbol SymArrow $$ }
- '\\' { TokSymbol SymLambda $$ }
- '@' { TokSymbol SymAs $$ }
- '|' { TokSymbol SymBar $$ }
- '(' { TokSymbol SymOpenParen $$ }
- ')' { TokSymbol SymCloseParen $$ }
- '{{' { TokSymbol SymDoubleOpenBrace $$ }
- '}}' { TokSymbol SymDoubleCloseBrace $$ }
- '{' { TokSymbol SymOpenBrace $$ }
- '}' { TokSymbol SymCloseBrace $$ }
--- ':{' { TokSymbol SymColonBrace $$ }
- vopen { TokSymbol SymOpenVirtualBrace $$ }
- vclose { TokSymbol SymCloseVirtualBrace $$ }
- vsemi { TokSymbol SymVirtualSemi $$ }
- '{-#' { TokSymbol SymOpenPragma $$ }
- '#-}' { TokSymbol SymClosePragma $$ }
-
- id { TokId $$ }
- q_id { TokQId $$ }
-
- string { TokString $$ }
- literal { TokLiteral $$ }
+ 'abstract' { TokKeyword KwAbstract $$ }
+ 'codata' { TokKeyword KwCoData $$ }
+ 'coinductive' { TokKeyword KwCoInductive $$ }
+ 'constructor' { TokKeyword KwConstructor $$ }
+ 'data' { TokKeyword KwData $$ }
+ 'field' { TokKeyword KwField $$ }
+ 'forall' { TokKeyword KwForall $$ }
+ 'hiding' { TokKeyword KwHiding $$ }
+ 'import' { TokKeyword KwImport $$ }
+ 'in' { TokKeyword KwIn $$ }
+ 'inductive' { TokKeyword KwInductive $$ }
+ 'infix' { TokKeyword KwInfix $$ }
+ 'infixl' { TokKeyword KwInfixL $$ }
+ 'infixr' { TokKeyword KwInfixR $$ }
+ 'instance' { TokKeyword KwInstance $$ }
+ 'let' { TokKeyword KwLet $$ }
+ 'module' { TokKeyword KwModule $$ }
+ 'mutual' { TokKeyword KwMutual $$ }
+ 'open' { TokKeyword KwOpen $$ }
+ 'pattern' { TokKeyword KwPatternSyn $$ }
+ 'postulate' { TokKeyword KwPostulate $$ }
+ 'primitive' { TokKeyword KwPrimitive $$ }
+ 'private' { TokKeyword KwPrivate $$ }
+ 'Prop' { TokKeyword KwProp $$ }
+ 'public' { TokKeyword KwPublic $$ }
+ 'quote' { TokKeyword KwQuote $$ }
+ 'quoteContext' { TokKeyword KwQuoteContext $$ }
+ 'quoteGoal' { TokKeyword KwQuoteGoal $$ }
+ 'quoteTerm' { TokKeyword KwQuoteTerm $$ }
+ 'record' { TokKeyword KwRecord $$ }
+ 'renaming' { TokKeyword KwRenaming $$ }
+ 'rewrite' { TokKeyword KwRewrite $$ }
+ 'Set' { TokKeyword KwSet $$ }
+ 'syntax' { TokKeyword KwSyntax $$ }
+ 'tactic' { TokKeyword KwTactic $$ }
+ 'to' { TokKeyword KwTo $$ }
+ 'unquote' { TokKeyword KwUnquote $$ }
+ 'unquoteDecl' { TokKeyword KwUnquoteDecl $$ }
+ 'using' { TokKeyword KwUsing $$ }
+ 'where' { TokKeyword KwWhere $$ }
+ 'with' { TokKeyword KwWith $$ }
+
+ 'BUILTIN' { TokKeyword KwBUILTIN $$ }
+ 'COMPILED' { TokKeyword KwCOMPILED $$ }
+ 'COMPILED_DATA' { TokKeyword KwCOMPILED_DATA $$ }
+ 'COMPILED_EPIC' { TokKeyword KwCOMPILED_EPIC $$ }
+ 'COMPILED_EXPORT' { TokKeyword KwCOMPILED_EXPORT $$ }
+ 'COMPILED_JS' { TokKeyword KwCOMPILED_JS $$ }
+ 'COMPILED_TYPE' { TokKeyword KwCOMPILED_TYPE $$ }
+ 'ETA' { TokKeyword KwETA $$ }
+ 'IMPORT' { TokKeyword KwIMPORT $$ }
+ 'IMPOSSIBLE' { TokKeyword KwIMPOSSIBLE $$ }
+ 'MEASURE' { TokKeyword KwMEASURE $$ }
+ 'NO_TERMINATION_CHECK' { TokKeyword KwNO_TERMINATION_CHECK $$ }
+ 'NON_TERMINATING' { TokKeyword KwNON_TERMINATING $$ }
+ 'OPTIONS' { TokKeyword KwOPTIONS $$ }
+ 'REWRITE' { TokKeyword KwREWRITE $$ }
+ 'STATIC' { TokKeyword KwSTATIC $$ }
+ 'TERMINATING' { TokKeyword KwTERMINATING $$ }
+
+ setN { TokSetN $$ }
+ tex { TokTeX $$ }
+ comment { TokComment $$ }
+
+ '...' { TokSymbol SymEllipsis $$ }
+ '..' { TokSymbol SymDotDot $$ }
+ '.' { TokSymbol SymDot $$ }
+ ';' { TokSymbol SymSemi $$ }
+ ':' { TokSymbol SymColon $$ }
+ '=' { TokSymbol SymEqual $$ }
+ '_' { TokSymbol SymUnderscore $$ }
+ '?' { TokSymbol SymQuestionMark $$ }
+ '->' { TokSymbol SymArrow $$ }
+ '\\' { TokSymbol SymLambda $$ }
+ '@' { TokSymbol SymAs $$ }
+ '|' { TokSymbol SymBar $$ }
+ '(' { TokSymbol SymOpenParen $$ }
+ ')' { TokSymbol SymCloseParen $$ }
+ '{{' { TokSymbol SymDoubleOpenBrace $$ }
+ '}}' { TokSymbol SymDoubleCloseBrace $$ }
+ '{' { TokSymbol SymOpenBrace $$ }
+ '}' { TokSymbol SymCloseBrace $$ }
+-- ':{' { TokSymbol SymColonBrace $$ }
+ vopen { TokSymbol SymOpenVirtualBrace $$ }
+ vclose { TokSymbol SymCloseVirtualBrace $$ }
+ vsemi { TokSymbol SymVirtualSemi $$ }
+ '{-#' { TokSymbol SymOpenPragma $$ }
+ '#-}' { TokSymbol SymClosePragma $$ }
+
+ id { TokId $$ }
+ q_id { TokQId $$ }
+
+ string { TokString $$ }
+ literal { TokLiteral $$ }
%%
@@ -187,98 +188,99 @@ TokensR : TokensR Token { $2 : $1 }
-- Parse single token.
Token :: { Token }
Token
- : 'let' { TokKeyword KwLet $1 }
- | 'in' { TokKeyword KwIn $1 }
- | 'where' { TokKeyword KwWhere $1 }
- | 'with' { TokKeyword KwWith $1 }
- | 'rewrite' { TokKeyword KwRewrite $1 }
- | 'postulate' { TokKeyword KwPostulate $1 }
- | 'primitive' { TokKeyword KwPrimitive $1 }
- | 'open' { TokKeyword KwOpen $1 }
- | 'import' { TokKeyword KwImport $1 }
- | 'using' { TokKeyword KwUsing $1 }
- | 'hiding' { TokKeyword KwHiding $1 }
- | 'renaming' { TokKeyword KwRenaming $1 }
- | 'to' { TokKeyword KwTo $1 }
- | 'public' { TokKeyword KwPublic $1 }
- | 'module' { TokKeyword KwModule $1 }
- | 'data' { TokKeyword KwData $1 }
- | 'codata' { TokKeyword KwCoData $1 }
- | 'record' { TokKeyword KwRecord $1 }
- | 'constructor' { TokKeyword KwConstructor $1 }
- | 'inductive' { TokKeyword KwInductive $1 }
- | 'coinductive' { TokKeyword KwCoInductive $1 }
- | 'field' { TokKeyword KwField $1 }
- | 'infix' { TokKeyword KwInfix $1 }
- | 'infixl' { TokKeyword KwInfixL $1 }
- | 'infixr' { TokKeyword KwInfixR $1 }
- | 'mutual' { TokKeyword KwMutual $1 }
- | 'abstract' { TokKeyword KwAbstract $1 }
- | 'private' { TokKeyword KwPrivate $1 }
- | 'instance' { TokKeyword KwInstance $1 }
- | 'Prop' { TokKeyword KwProp $1 }
- | 'Set' { TokKeyword KwSet $1 }
- | 'forall' { TokKeyword KwForall $1 }
- | 'syntax' { TokKeyword KwSyntax $1 }
- | 'pattern' { TokKeyword KwPatternSyn $1 }
- | 'OPTIONS' { TokKeyword KwOPTIONS $1 }
- | 'BUILTIN' { TokKeyword KwBUILTIN $1 }
- | 'REWRITE' { TokKeyword KwREWRITE $1 }
- | 'IMPORT' { TokKeyword KwIMPORT $1 }
- | 'COMPILED' { TokKeyword KwCOMPILED $1 }
- | 'COMPILED_EXPORT' { TokKeyword KwCOMPILED_EXPORT $1 }
- | 'COMPILED_DATA'{ TokKeyword KwCOMPILED_DATA $1 }
- | 'COMPILED_TYPE'{ TokKeyword KwCOMPILED_TYPE $1 }
- | 'COMPILED_EPIC'{ TokKeyword KwCOMPILED_EPIC $1 }
- | 'COMPILED_JS' { TokKeyword KwCOMPILED_JS $1 }
- | 'STATIC' { TokKeyword KwSTATIC $1 }
- | 'IMPOSSIBLE' { TokKeyword KwIMPOSSIBLE $1 }
- | 'ETA' { TokKeyword KwETA $1 }
- | 'NO_TERMINATION_CHECK' { TokKeyword KwNO_TERMINATION_CHECK $1 }
- | 'NON_TERMINATING' { TokKeyword KwNON_TERMINATING $1 }
- | 'TERMINATING' { TokKeyword KwTERMINATING $1 }
- | 'MEASURE' { TokKeyword KwMEASURE $1 }
- | 'quoteGoal' { TokKeyword KwQuoteGoal $1 }
- | 'quoteContext' { TokKeyword KwQuoteContext $1 }
- | 'quote' { TokKeyword KwQuote $1 }
- | 'quoteTerm' { TokKeyword KwQuoteTerm $1 }
- | 'tactic' { TokKeyword KwTactic $1 }
- | 'unquote' { TokKeyword KwUnquote $1 }
- | 'unquoteDecl' { TokKeyword KwUnquoteDecl $1 }
-
- | setN { TokSetN $1 }
- | tex { TokTeX $1 }
- | comment { TokComment $1 }
-
- | '...' { TokSymbol SymEllipsis $1 }
- | '..' { TokSymbol SymDotDot $1 }
- | '.' { TokSymbol SymDot $1 }
- | ';' { TokSymbol SymSemi $1 }
- | ':' { TokSymbol SymColon $1 }
- | '=' { TokSymbol SymEqual $1 }
- | '_' { TokSymbol SymUnderscore $1 }
- | '?' { TokSymbol SymQuestionMark $1 }
- | '->' { TokSymbol SymArrow $1 }
- | '\\' { TokSymbol SymLambda $1 }
- | '@' { TokSymbol SymAs $1 }
- | '|' { TokSymbol SymBar $1 }
- | '(' { TokSymbol SymOpenParen $1 }
- | ')' { TokSymbol SymCloseParen $1 }
- | '{{' { TokSymbol SymDoubleOpenBrace $1 }
- | '}}' { TokSymbol SymDoubleCloseBrace $1 }
- | '{' { TokSymbol SymOpenBrace $1 }
- | '}' { TokSymbol SymCloseBrace $1 }
- | vopen { TokSymbol SymOpenVirtualBrace $1 }
- | vclose { TokSymbol SymCloseVirtualBrace $1 }
- | vsemi { TokSymbol SymVirtualSemi $1 }
- | '{-#' { TokSymbol SymOpenPragma $1 }
- | '#-}' { TokSymbol SymClosePragma $1 }
-
- | id { TokId $1 }
- | q_id { TokQId $1 }
- | string { TokString $1 }
-
- | literal { TokLiteral $1 }
+ : 'abstract' { TokKeyword KwAbstract $1 }
+ | 'codata' { TokKeyword KwCoData $1 }
+ | 'coinductive' { TokKeyword KwCoInductive $1 }
+ | 'constructor' { TokKeyword KwConstructor $1 }
+ | 'data' { TokKeyword KwData $1 }
+ | 'field' { TokKeyword KwField $1 }
+ | 'forall' { TokKeyword KwForall $1 }
+ | 'hiding' { TokKeyword KwHiding $1 }
+ | 'import' { TokKeyword KwImport $1 }
+ | 'in' { TokKeyword KwIn $1 }
+ | 'inductive' { TokKeyword KwInductive $1 }
+ | 'infix' { TokKeyword KwInfix $1 }
+ | 'infixl' { TokKeyword KwInfixL $1 }
+ | 'infixr' { TokKeyword KwInfixR $1 }
+ | 'instance' { TokKeyword KwInstance $1 }
+ | 'let' { TokKeyword KwLet $1 }
+ | 'module' { TokKeyword KwModule $1 }
+ | 'mutual' { TokKeyword KwMutual $1 }
+ | 'open' { TokKeyword KwOpen $1 }
+ | 'pattern' { TokKeyword KwPatternSyn $1 }
+ | 'postulate' { TokKeyword KwPostulate $1 }
+ | 'primitive' { TokKeyword KwPrimitive $1 }
+ | 'private' { TokKeyword KwPrivate $1 }
+ | 'Prop' { TokKeyword KwProp $1 }
+ | 'public' { TokKeyword KwPublic $1 }
+ | 'quote' { TokKeyword KwQuote $1 }
+ | 'quoteContext' { TokKeyword KwQuoteContext $1 }
+ | 'quoteGoal' { TokKeyword KwQuoteGoal $1 }
+ | 'quoteTerm' { TokKeyword KwQuoteTerm $1 }
+ | 'record' { TokKeyword KwRecord $1 }
+ | 'renaming' { TokKeyword KwRenaming $1 }
+ | 'rewrite' { TokKeyword KwRewrite $1 }
+ | 'Set' { TokKeyword KwSet $1 }
+ | 'syntax' { TokKeyword KwSyntax $1 }
+ | 'tactic' { TokKeyword KwTactic $1 }
+ | 'to' { TokKeyword KwTo $1 }
+ | 'unquote' { TokKeyword KwUnquote $1 }
+ | 'unquoteDecl' { TokKeyword KwUnquoteDecl $1 }
+ | 'using' { TokKeyword KwUsing $1 }
+ | 'where' { TokKeyword KwWhere $1 }
+ | 'with' { TokKeyword KwWith $1 }
+
+ | 'BUILTIN' { TokKeyword KwBUILTIN $1 }
+ | 'COMPILED' { TokKeyword KwCOMPILED $1 }
+ | 'COMPILED_DATA' { TokKeyword KwCOMPILED_DATA $1 }
+ | 'COMPILED_EPIC' { TokKeyword KwCOMPILED_EPIC $1 }
+ | 'COMPILED_EXPORT' { TokKeyword KwCOMPILED_EXPORT $1 }
+ | 'COMPILED_JS' { TokKeyword KwCOMPILED_JS $1 }
+ | 'COMPILED_TYPE' { TokKeyword KwCOMPILED_TYPE $1 }
+ | 'ETA' { TokKeyword KwETA $1 }
+ | 'IMPORT' { TokKeyword KwIMPORT $1 }
+ | 'IMPOSSIBLE' { TokKeyword KwIMPOSSIBLE $1 }
+ | 'MEASURE' { TokKeyword KwMEASURE $1 }
+ | 'NO_TERMINATION_CHECK' { TokKeyword KwNO_TERMINATION_CHECK $1 }
+ | 'NON_TERMINATING' { TokKeyword KwNON_TERMINATING $1 }
+ | 'OPTIONS' { TokKeyword KwOPTIONS $1 }
+ | 'REWRITE' { TokKeyword KwREWRITE $1 }
+ | 'STATIC' { TokKeyword KwSTATIC $1 }
+ | 'TERMINATING' { TokKeyword KwTERMINATING $1 }
+
+ | setN { TokSetN $1 }
+ | tex { TokTeX $1 }
+ | comment { TokComment $1 }
+
+ | '...' { TokSymbol SymEllipsis $1 }
+ | '..' { TokSymbol SymDotDot $1 }
+ | '.' { TokSymbol SymDot $1 }
+ | ';' { TokSymbol SymSemi $1 }
+ | ':' { TokSymbol SymColon $1 }
+ | '=' { TokSymbol SymEqual $1 }
+ | '_' { TokSymbol SymUnderscore $1 }
+ | '?' { TokSymbol SymQuestionMark $1 }
+ | '->' { TokSymbol SymArrow $1 }
+ | '\\' { TokSymbol SymLambda $1 }
+ | '@' { TokSymbol SymAs $1 }
+ | '|' { TokSymbol SymBar $1 }
+ | '(' { TokSymbol SymOpenParen $1 }
+ | ')' { TokSymbol SymCloseParen $1 }
+ | '{{' { TokSymbol SymDoubleOpenBrace $1 }
+ | '}}' { TokSymbol SymDoubleCloseBrace $1 }
+ | '{' { TokSymbol SymOpenBrace $1 }
+ | '}' { TokSymbol SymCloseBrace $1 }
+ | vopen { TokSymbol SymOpenVirtualBrace $1 }
+ | vclose { TokSymbol SymCloseVirtualBrace $1 }
+ | vsemi { TokSymbol SymVirtualSemi $1 }
+ | '{-#' { TokSymbol SymOpenPragma $1 }
+ | '#-}' { TokSymbol SymClosePragma $1 }
+
+ | id { TokId $1 }
+ | q_id { TokQId $1 }
+ | string { TokString $1 }
+
+ | literal { TokLiteral $1 }
{--------------------------------------------------------------------------
Top level
diff --git a/src/full/Agda/Syntax/Scope/Base.hs b/src/full/Agda/Syntax/Scope/Base.hs
index 40047f9..9d643bc 100644
--- a/src/full/Agda/Syntax/Scope/Base.hs
+++ b/src/full/Agda/Syntax/Scope/Base.hs
@@ -449,7 +449,11 @@ setScopeAccess a s = (`updateScopeNameSpaces` s) $ AssocList.mapWithKey $ const
-- | Update a particular name space.
setNameSpace :: NameSpaceId -> NameSpace -> Scope -> Scope
-setNameSpace nsid ns = updateScopeNameSpaces $ AssocList.update nsid ns
+setNameSpace nsid ns = modifyNameSpace nsid $ const ns
+
+-- | Modify a particular name space.
+modifyNameSpace :: NameSpaceId -> (NameSpace -> NameSpace) -> Scope -> Scope
+modifyNameSpace nsid f = updateScopeNameSpaces $ AssocList.updateAt nsid f
-- | Add names to a scope.
addNamesToScope :: NameSpaceId -> C.Name -> [AbstractName] -> Scope -> Scope
diff --git a/src/full/Agda/Syntax/Translation/AbstractToConcrete.hs b/src/full/Agda/Syntax/Translation/AbstractToConcrete.hs
index 2eec7f3..70dddc6 100644
--- a/src/full/Agda/Syntax/Translation/AbstractToConcrete.hs
+++ b/src/full/Agda/Syntax/Translation/AbstractToConcrete.hs
@@ -369,7 +369,7 @@ instance ToConcrete A.Expr C.Expr where
toConcrete (A.Underscore i) = return $
C.Underscore (getRange i) $
- prettyShow . NamedMeta (metaNameSuggestion i) . MetaId <$> metaNumber i
+ prettyShow . NamedMeta (metaNameSuggestion i) . MetaId . metaId <$> metaNumber i
toConcrete e@(A.App i e1 e2) =
tryToRecoverOpApp e
diff --git a/src/full/Agda/Syntax/Translation/ConcreteToAbstract.hs b/src/full/Agda/Syntax/Translation/ConcreteToAbstract.hs
index c65be23..e6e7b5e 100644
--- a/src/full/Agda/Syntax/Translation/ConcreteToAbstract.hs
+++ b/src/full/Agda/Syntax/Translation/ConcreteToAbstract.hs
@@ -1,12 +1,12 @@
-{-# LANGUAGE CPP #-}
-{-# LANGUAGE DoAndIfThenElse #-}
-{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE DoAndIfThenElse #-}
+{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
-{-# LANGUAGE MultiParamTypeClasses #-}
-{-# LANGUAGE PatternGuards #-}
-{-# LANGUAGE ScopedTypeVariables #-}
-{-# LANGUAGE TupleSections #-}
-{-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE PatternGuards #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE TupleSections #-}
+{-# LANGUAGE UndecidableInstances #-}
#if __GLASGOW_HASKELL__ <= 708
{-# LANGUAGE OverlappingInstances #-}
@@ -63,6 +63,7 @@ import Agda.Syntax.Translation.AbstractToConcrete (ToConcrete)
import Agda.TypeChecking.Monad.Base
( TypeError(..) , Call(..) , typeError , genericError , TCErr(..)
, fresh , freshName , freshName_ , freshNoName , extendedLambdaName
+ , envAbstractMode , AbstractMode(..)
)
import qualified Agda.TypeChecking.Monad.Benchmark as Bench
import Agda.TypeChecking.Monad.Builtin
@@ -596,12 +597,13 @@ scopeCheckExtendedLam r cs = do
bindName PrivateAccess DefName cname qname
-- Compose a function definition an scope check it.
+ a <- aModeToDef <$> asks envAbstractMode
let
insertApp (C.RawAppP r es) = C.RawAppP r $ IdentP (C.QName cname) : es
insertApp (C.IdentP q ) = C.RawAppP r $ IdentP (C.QName cname) : [C.IdentP q]
where r = getRange q
insertApp _ = __IMPOSSIBLE__
- d = C.FunDef r [] defaultFixity' ConcreteDef TerminationCheck cname $
+ d = C.FunDef r [] defaultFixity' {-'-} a __IMPOSSIBLE__ cname $
for cs $ \ (lhs, rhs, wh) -> -- wh == NoWhere, see parser for more info
C.Clause cname (mapLhsOriginalPattern insertApp lhs) rhs wh []
scdef <- toAbstract d
@@ -643,7 +645,7 @@ instance ToAbstract C.Expr A.Expr where
let info = MetaInfo
{ metaRange = r
, metaScope = scope
- , metaNumber = n
+ , metaNumber = Nothing
, metaNameSuggestion = ""
}
return $ A.QuestionMark info ii
@@ -842,7 +844,10 @@ telHasOpenStmsOrModuleMacros = any yesBinds
yesBind (C.TLet _ ds) = any yes ds
yes C.ModuleMacro{} = True
yes C.Open{} = True
- yes C.Import{} = __IMPOSSIBLE__
+ yes C.Import{} = True -- not __IMPOSSIBLE__, see Issue #1718
+ -- However, it does not matter what we return here, as this will
+ -- become an error later: "Not a valid let-declaration".
+ -- (Andreas, 2015-11-17)
yes (C.Mutual _ ds) = any yes ds
yes (C.Abstract _ ds) = any yes ds
yes (C.Private _ ds) = any yes ds
@@ -1114,12 +1119,26 @@ newtype Blind a = Blind { unBlind :: a }
instance ToAbstract (Blind a) (Blind a) where
toAbstract = return
+aDefToMode :: IsAbstract -> AbstractMode
+aDefToMode AbstractDef = AbstractMode
+aDefToMode ConcreteDef = ConcreteMode
+
+aModeToDef :: AbstractMode -> IsAbstract
+aModeToDef AbstractMode = AbstractDef
+aModeToDef ConcreteMode = ConcreteDef
+aModeToDef _ = __IMPOSSIBLE__
+
-- The only reason why we return a list is that open declarations disappears.
-- For every other declaration we get a singleton list.
instance ToAbstract NiceDeclaration A.Declaration where
toAbstract d = annotateDecls $
traceCall (ScopeCheckDeclaration d) $
+ -- Andreas, 2015-10-05, Issue 1677:
+ -- We record in the environment whether we are scope checking an
+ -- abstract definition. This way, we can propagate this attribute
+ -- the extended lambdas.
+ caseMaybe (niceHasAbstract d) id (\ a -> local $ \ e -> e { envAbstractMode = aDefToMode a }) $
case d of
-- Axiom (actual postulate)
@@ -1528,11 +1547,21 @@ instance ToAbstract C.Clause A.Clause where
NoWhere -> (Nothing, [])
AnyWhere ds -> (Nothing, ds)
SomeWhere m ds -> (Just m, ds)
+
+ let isTerminationPragma :: C.Declaration -> Bool
+ isTerminationPragma (C.Pragma (TerminationCheckPragma _ _)) = True
+ isTerminationPragma _ = False
+
if not (null eqs)
then do
rhs <- toAbstract =<< toAbstractCtx TopCtx (RightHandSide eqs with wcs' rhs whds)
return $ A.Clause lhs' rhs []
else do
+ -- ASR (16 November 2015) Issue 1137: We ban termination
+ -- pragmas inside `where` clause.
+ when (any isTerminationPragma whds) $
+ genericError "Termination pragmas are not allowed inside where clauses"
+
-- the right hand side is checked inside the module of the local definitions
(rhs, ds) <- whereToAbstract (getRange wh) whname whds $
toAbstractCtx TopCtx (RightHandSide eqs with wcs' rhs [])
diff --git a/src/full/Agda/Syntax/Translation/InternalToAbstract.hs b/src/full/Agda/Syntax/Translation/InternalToAbstract.hs
index 9be4cfe..6e0f0fb 100644
--- a/src/full/Agda/Syntax/Translation/InternalToAbstract.hs
+++ b/src/full/Agda/Syntax/Translation/InternalToAbstract.hs
@@ -150,13 +150,13 @@ instance Reify MetaId Expr where
let mi' = Info.MetaInfo
{ metaRange = getRange $ miClosRange mi
, metaScope = M.clScope $ miClosRange mi
- , metaNumber = Just n
+ , metaNumber = Just x
, metaNameSuggestion = miNameSuggestion mi
}
underscore = return $ A.Underscore mi'
ifNotM shouldReifyInteractionPoints underscore $ {- else -}
caseMaybeM (isInteractionMeta x) underscore $ \ ii@InteractionId{} ->
- return $ A.QuestionMark (mi' {metaNumber = Just n}) ii
+ return $ A.QuestionMark mi' ii
-- Does not print with-applications correctly:
-- instance Reify DisplayTerm Expr where
@@ -518,7 +518,7 @@ reifyTerm expandAnonDefs0 v = do
let extLam = case mdefn of
Nothing -> Nothing
Just defn -> case theDef defn of
- Function{ funExtLam = Just (h, nh) } -> Just (h + nh)
+ Function{ funExtLam = Just (ExtLamInfo h nh) } -> Just (h + nh)
_ -> Nothing
case extLam of
Just pars | df -> do
diff --git a/src/full/Agda/Termination/Inlining.hs b/src/full/Agda/Termination/Inlining.hs
index d72039a..05de1b5 100644
--- a/src/full/Agda/Termination/Inlining.hs
+++ b/src/full/Agda/Termination/Inlining.hs
@@ -90,15 +90,27 @@ inlineWithClauses f cl = inTopContext $ do
-- The clause body is a with-function call @wf args@.
-- @f@ is the function the with-function belongs to.
let args = fromMaybe __IMPOSSIBLE__ . allApplyElims $ els
+
+ reportSDoc "term.with.inline" 70 $ sep
+ [ text "Found with (raw):", nest 2 $ text $ show cl ]
reportSDoc "term.with.inline" 20 $ sep
[ text "Found with:", nest 2 $ prettyTCM $ QNamed f cl ]
+
t <- defType <$> getConstInfo wf
cs1 <- withExprClauses cl t args
+
+ reportSDoc "term.with.inline" 70 $ vcat $
+ text "withExprClauses (raw)" : map (nest 2 . text . show) cs1
reportSDoc "term.with.inline" 20 $ vcat $
text "withExprClauses" : map (nest 2 . prettyTCM . QNamed f) cs1
+
cs2 <- inlinedClauses f cl t wf
+
+ reportSDoc "term.with.inline" 70 $ vcat $
+ text "inlinedClauses (raw)" : map (nest 2 . text . show) cs2
reportSDoc "term.with.inline" 20 $ vcat $
text "inlinedClauses" : map (nest 2 . prettyTCM . QNamed f) cs2
+
return $ cs1 ++ cs2
_ -> noInline
@@ -156,8 +168,11 @@ inline f pcl t wf wcl = inTopContext $ addCtxTel (clauseTel wcl) $ do
-- of the arguments to the parent function. Fortunately we have already
-- figured out how to turn an application of the with-function into an
-- application of the parent function in the display form.
+ reportSDoc "term.with.inline" 70 $ text "inlining (raw) =" <+> text (show wcl)
let vs = clauseArgs wcl
Just disp <- displayForm wf vs
+ reportSDoc "term.with.inline" 70 $ text "display form (raw) =" <+> text (show disp)
+ reportSDoc "term.with.inline" 40 $ text "display form =" <+> prettyTCM disp
(pats, perm) <- dispToPats disp
-- Now we need to sort out the right hand side. We have
diff --git a/src/full/Agda/TypeChecking/Abstract.hs b/src/full/Agda/TypeChecking/Abstract.hs
index 4b12778..ef9ac5a 100644
--- a/src/full/Agda/TypeChecking/Abstract.hs
+++ b/src/full/Agda/TypeChecking/Abstract.hs
@@ -22,7 +22,7 @@ import Agda.Utils.Impossible
piAbstractTerm :: Term -> Type -> Type -> Type
piAbstractTerm v a b = fun a (abstractTerm v b)
where
- fun a b = El s $ Pi (Common.Dom defaultArgInfo a) $ mkAbs "w" b
+ fun a b = El s $ Pi (defaultDom a) $ mkAbs "w" b
where s = (sLub `on` getSort) a b
-- | @isPrefixOf u v = Just es@ if @v == u `applyE` es@.
diff --git a/src/full/Agda/TypeChecking/CompiledClause.hs b/src/full/Agda/TypeChecking/CompiledClause.hs
index 9fe6828..35b4c1f 100644
--- a/src/full/Agda/TypeChecking/CompiledClause.hs
+++ b/src/full/Agda/TypeChecking/CompiledClause.hs
@@ -133,7 +133,7 @@ prettyMap m = [ sep [ text (show x ++ " ->")
| (x, v) <- Map.toList m ]
instance Pretty CompiledClauses where
- pretty (Done hs t) = text ("done" ++ show hs) <+> text (show t)
+ pretty (Done hs t) = text ("done" ++ show hs) <+> pretty t
pretty Fail = text "fail"
pretty (Case n bs) | projPatterns bs =
sep [ text "record"
diff --git a/src/full/Agda/TypeChecking/CompiledClause/Compile.hs b/src/full/Agda/TypeChecking/CompiledClause/Compile.hs
index b7c4bb0..cb758c5 100644
--- a/src/full/Agda/TypeChecking/CompiledClause/Compile.hs
+++ b/src/full/Agda/TypeChecking/CompiledClause/Compile.hs
@@ -21,11 +21,14 @@ import Agda.TypeChecking.Coverage.SplitTree
import Agda.TypeChecking.Monad
import Agda.TypeChecking.RecordPatterns
import Agda.TypeChecking.Substitute
-import Agda.TypeChecking.Pretty
+import Agda.TypeChecking.Pretty (prettyTCM, nest, sep, text)
import Agda.Utils.Functor
+import Agda.Utils.Maybe
import Agda.Utils.Null
import Agda.Utils.List
+import Agda.Utils.Pretty (Pretty(..), prettyShow)
+import qualified Agda.Utils.Pretty as P
#include "undefined.h"
import Agda.Utils.Impossible
@@ -41,7 +44,7 @@ compileClauses ::
Maybe (QName, Type) -- ^ Translate record patterns and coverage check with given type?
-> [Clause] -> TCM CompiledClauses
compileClauses mt cs = do
- let cls = [(clausePats c, clauseBody c) | c <- cs]
+ let cls = [ Cl (clausePats c) (clauseBody c) | c <- cs ]
case mt of
Nothing -> return $ compile cls
Just (q, t) -> do
@@ -49,7 +52,7 @@ compileClauses mt cs = do
reportSDoc "tc.cc" 30 $ sep $ do
(text "clauses patterns before compilation") : do
- map (prettyTCM . map unArg . fst) cls
+ map (prettyTCM . map unArg . clPats) cls
reportSDoc "tc.cc" 50 $ do
sep [ text "clauses before compilation"
, (nest 2 . text . show) cs
@@ -62,16 +65,21 @@ compileClauses mt cs = do
cc <- translateCompiledClauses cc
return cc
-type Cl = ([I.Arg Pattern], ClauseBody)
+-- | Stripped-down version of 'Agda.Syntax.Internal.Clause'
+-- used in clause compiler.
+data Cl = Cl
+ { clPats :: [I.Arg Pattern]
+ , clBody :: ClauseBody
+ } deriving (Show)
+
+instance Pretty Cl where
+ pretty (Cl ps b) = P.prettyList ps P.<+> P.text "->" P.<+> pretty b
+
type Cls = [Cl]
compileWithSplitTree :: SplitTree -> Cls -> CompiledClauses
compileWithSplitTree t cs = case t of
- SplitAt i ts ->
- -- the coverage checker does not count dot patterns as variables
- -- in case trees however, they count as variable patterns
- let n = i -- countInDotPatterns i cs
- in Case n $ compiles ts $ splitOn (length ts == 1) n cs
+ SplitAt i ts -> Case i $ compiles ts $ splitOn (length ts == 1) i cs
-- if there is just one case, we force expansion of catch-alls
-- this is needed to generate a sound tree on which we can
-- collapse record pattern splits
@@ -83,31 +91,25 @@ compileWithSplitTree t cs = case t of
compiles ts br@Branches{ projPatterns = cop
, conBranches = cons
, litBranches = lits
- , catchAllBranch = Nothing }
- | Map.null lits = empty { projPatterns = cop, conBranches = updCons cons }
+ , catchAllBranch = catchAll }
+ = Branches
+ { projPatterns = cop
+ , conBranches = updCons cons
+ , litBranches = compile <$> lits
+ , catchAllBranch = compile <$> catchAll
+ }
where
updCons = Map.mapWithKey $ \ c cl ->
- let t = fromMaybe __IMPOSSIBLE__ $ lookup c ts
- in compileWithSplitTree t <$> cl
- compiles ts br = compile <$> br
-
- -- increase split index by number of dot patterns we have skipped
- countInDotPatterns :: Int -> [Cl] -> Int
- countInDotPatterns i [] = __IMPOSSIBLE__
- countInDotPatterns i ((ps, _) : _) = i + loop i (map unArg ps) where
- loop 0 ps = 0
- loop i [] = __IMPOSSIBLE__
- loop i (DotP{} : ps) = 1 + loop i ps
- loop i (_ : ps) = loop (i - 1) ps
-
+ caseMaybe (lookup c ts) compile compileWithSplitTree <$> cl
+ -- When the split tree is finished, we continue with @compile@.
compile :: Cls -> CompiledClauses
compile cs = case nextSplit cs of
Just (isRecP, n)-> Case n $ fmap compile $ splitOn isRecP n cs
- Nothing -> case map (getBody . snd) cs of
+ Nothing -> case map (getBody . clBody) cs of
-- It's possible to get more than one clause here due to
-- catch-all expansion.
- Just t : _ -> Done (map (fmap name) $ fst $ head cs) (shared t)
+ Just t : _ -> Done (map (fmap name) $ clPats $ head cs) (shared t)
Nothing : _ -> Fail
[] -> __IMPOSSIBLE__
where
@@ -120,8 +122,8 @@ compile cs = case nextSplit cs of
-- | Get the index of the next argument we need to split on.
-- This the number of the first pattern that does a match in the first clause.
nextSplit :: Cls -> Maybe (Bool, Int)
-nextSplit [] = __IMPOSSIBLE__
-nextSplit ((ps, _):_) = headMaybe $ catMaybes $
+nextSplit [] = __IMPOSSIBLE__
+nextSplit (Cl ps _ : _) = headMaybe $ catMaybes $
zipWith (\ p n -> (,n) <$> properSplit (unArg p)) ps [0..]
-- | Is is not a variable pattern?
@@ -147,16 +149,17 @@ isVar ProjP{} = False
-- if @single@.
splitOn :: Bool -> Int -> Cls -> Case Cls
splitOn single n cs = mconcat $ map (fmap (:[]) . splitC n) $
- -- (\ cs -> trace ("splitting on " ++ show n ++ " after expandCatchAlls " ++ show single ++ ": " ++ show cs) cs) $
+ -- (\ cs -> trace ("splitting on " ++ show n ++ " after expandCatchAlls " ++ show single ++ ": " ++ prettyShow (P.prettyList cs)) cs) $
expandCatchAlls single n cs
splitC :: Int -> Cl -> Case Cl
-splitC n (ps, b) = case unArg p of
- ProjP d -> projCase d (ps0 ++ ps1, b)
- ConP c _ qs -> conCase (conName c) $ WithArity (length qs) (ps0 ++ map (fmap namedThing) qs ++ ps1, b)
- LitP l -> litCase l (ps0 ++ ps1, b)
- VarP{} -> catchAll (ps, b)
- DotP{} -> catchAll (ps, b)
+splitC n (Cl ps b) = case unArg p of
+ ProjP d -> projCase d $ Cl (ps0 ++ ps1) b
+ ConP c _ qs -> conCase (conName c) $ WithArity (length qs) $
+ Cl (ps0 ++ map (fmap namedThing) qs ++ ps1) b
+ LitP l -> litCase l $ Cl (ps0 ++ ps1) b
+ VarP{} -> catchAll $ Cl ps b
+ DotP{} -> catchAll $ Cl ps b
where
(ps0, p, ps1) = extractNthElement' n ps
@@ -204,16 +207,16 @@ expandCatchAlls single n cs =
-- we force expansion
if single then doExpand =<< cs else
case cs of
- _ | all (isCatchAllNth . fst) cs -> cs
- (ps, b) : cs | not (isCatchAllNth ps) -> (ps, b) : expandCatchAlls False n cs
- | otherwise -> map (expand ps b) expansions ++ (ps, b) : expandCatchAlls False n cs
+ _ | all (isCatchAllNth . clPats) cs -> cs
+ Cl ps b : cs | not (isCatchAllNth ps) -> Cl ps b : expandCatchAlls False n cs
+ | otherwise -> map (expand ps b) expansions ++ Cl ps b : expandCatchAlls False n cs
_ -> __IMPOSSIBLE__
where
-- In case there is only one branch in the split tree, we expand all
-- catch-alls for this position
-- The @expansions@ are collected from all the clauses @cs@ then.
-- Note: @expansions@ could be empty, so we keep the orignal clause.
- doExpand c@(ps, b)
+ doExpand c@(Cl ps b)
| isVar $ unArg $ nth ps = map (expand ps b) expansions ++ [c]
| otherwise = [c]
@@ -230,19 +233,19 @@ expandCatchAlls single n cs =
-- These are the cases the wildcard needs to be expanded into.
expansions = nubBy ((==) `on` (classify . unArg))
. filter (not . isVar . unArg)
- . map (nth . fst)
+ . map (nth . clPats)
$ cs
expand ps b q =
case unArg q of
- ConP c mt qs' -> (ps0 ++ [q $> ConP c mt conPArgs] ++ ps1,
- substBody n' m (Con c conArgs) b)
+ ConP c mt qs' -> Cl (ps0 ++ [q $> ConP c mt conPArgs] ++ ps1)
+ (substBody n' m (Con c conArgs) b)
where
m = length qs'
-- replace all direct subpatterns of q by _
conPArgs = map (fmap ($> VarP underscore)) qs'
conArgs = zipWith (\ q n -> q $> var n) qs' $ downFrom m
- LitP l -> (ps0 ++ [q $> LitP l] ++ ps1, substBody n' 0 (Lit l) b)
+ LitP l -> Cl (ps0 ++ [q $> LitP l] ++ ps1) (substBody n' 0 (Lit l) b)
_ -> __IMPOSSIBLE__
where
(ps0, rest) = splitAt n ps
diff --git a/src/full/Agda/TypeChecking/Coverage.hs b/src/full/Agda/TypeChecking/Coverage.hs
index bf0e4e0..e985082 100644
--- a/src/full/Agda/TypeChecking/Coverage.hs
+++ b/src/full/Agda/TypeChecking/Coverage.hs
@@ -401,7 +401,7 @@ computeNeighbourhood delta1 n delta2 perm d pars ixs hix hps c = do
-- let flex = [0..size delta1 + size gamma - 1]
let gammaDelta1 = gammal ++ telToList delta1
makeFlex i d = flexibleVarFromHiding (getHiding d) i
- flex = zipWith makeFlex [0 .. size gammaDelta1 - 1] gammaDelta1
+ flex = zipWith makeFlex [0..] gammaDelta1
-- Unify constructor target and given type (in Δ₁Γ)
let conIxs = drop (size pars) cixs
diff --git a/src/full/Agda/TypeChecking/Errors.hs b/src/full/Agda/TypeChecking/Errors.hs
index fde832f..96c0a0c 100644
--- a/src/full/Agda/TypeChecking/Errors.hs
+++ b/src/full/Agda/TypeChecking/Errors.hs
@@ -36,6 +36,7 @@ import Agda.TypeChecking.Monad.Base
import Agda.TypeChecking.Monad.Closure
import Agda.TypeChecking.Monad.Context
import Agda.TypeChecking.Monad.Options
+import Agda.TypeChecking.Monad.Builtin
import Agda.TypeChecking.Pretty
import Agda.TypeChecking.Reduce (instantiate)
@@ -600,9 +601,14 @@ instance PrettyTCM TypeError where
pwords "Duplicate binding for built-in thing" ++ [text b <> comma] ++
pwords "previous binding to" ++ [prettyTCM x]
- NoBindingForBuiltin x -> fsep $
- pwords "No binding for builtin thing" ++ [text x <> comma] ++
- pwords ("use {-# BUILTIN " ++ x ++ " name #-} to bind it to 'name'")
+ NoBindingForBuiltin x
+ | elem x [builtinZero, builtinSuc] -> fsep $
+ pwords "No binding for builtin " ++ [text x <> comma] ++
+ pwords ("use {-# BUILTIN " ++ builtinNat ++ " name #-} to bind builtin natural " ++
+ "numbers to the type 'name'")
+ | otherwise -> fsep $
+ pwords "No binding for builtin thing" ++ [text x <> comma] ++
+ pwords ("use {-# BUILTIN " ++ x ++ " name #-} to bind it to 'name'")
NoSuchPrimitiveFunction x -> fsep $
pwords "There is no primitive function called" ++ [text x]
diff --git a/src/full/Agda/TypeChecking/Monad/Base.hs b/src/full/Agda/TypeChecking/Monad/Base.hs
index 741763c..3ad9ff8 100644
--- a/src/full/Agda/TypeChecking/Monad/Base.hs
+++ b/src/full/Agda/TypeChecking/Monad/Base.hs
@@ -905,27 +905,39 @@ type InteractionPoints = Map InteractionId InteractionPoint
---------------------------------------------------------------------------
data Signature = Sig
- { sigSections :: Sections
- , sigDefinitions :: Definitions
- , sigRewriteRules:: RewriteRuleMap -- ^ The rewrite rules defined in this file.
+ { _sigSections :: Sections
+ , _sigDefinitions :: Definitions
+ , _sigRewriteRules:: RewriteRuleMap -- ^ The rewrite rules defined in this file.
}
deriving (Typeable, Show)
+sigSections :: Lens' Sections Signature
+sigSections f s =
+ f (_sigSections s) <&>
+ \x -> s {_sigSections = x}
+
+sigDefinitions :: Lens' Definitions Signature
+sigDefinitions f s =
+ f (_sigDefinitions s) <&>
+ \x -> s {_sigDefinitions = x}
+
+sigRewriteRules :: Lens' RewriteRuleMap Signature
+sigRewriteRules f s =
+ f (_sigRewriteRules s) <&>
+ \x -> s {_sigRewriteRules = x}
+
type Sections = Map ModuleName Section
type Definitions = HashMap QName Definition
type RewriteRuleMap = HashMap QName RewriteRules
-data Section = Section
- { secTelescope :: Telescope
- , secFreeVars :: Nat -- ^ This is the number of parameters when
- -- we're inside the section and 0
- -- outside. It's used to know how much of
- -- the context to apply function from the
- -- section to when translating from
- -- abstract to internal syntax.
- }
+data Section = Section { _secTelescope :: Telescope }
deriving (Typeable, Show)
+secTelescope :: Lens' Telescope Section
+secTelescope f s =
+ f (_secTelescope s) <&>
+ \x -> s {_secTelescope = x}
+
emptySignature :: Signature
emptySignature = Sig Map.empty HMap.empty HMap.empty
@@ -1082,6 +1094,12 @@ data CompiledRepresentation = CompiledRep
noCompiledRep :: CompiledRepresentation
noCompiledRep = CompiledRep Nothing Nothing Nothing Nothing
+-- | Additional information for extended lambdas.
+data ExtLamInfo = ExtLamInfo
+ { extLamNumHidden :: Int -- Number of hidden args to be dropped when printing.
+ , extLamNumNonHid :: Int -- Number of visible args to be dropped when printing.
+ } deriving (Typeable, Eq, Ord, Show)
+
-- | Additional information for projection 'Function's.
data Projection = Projection
{ projProper :: Maybe QName
@@ -1137,7 +1155,7 @@ data Defn = Axiom
-- instantiation?
, funTerminates :: Maybe Bool
-- ^ Has this function been termination checked? Did it pass?
- , funExtLam :: Maybe (Int,Int)
+ , funExtLam :: Maybe ExtLamInfo
-- ^ Is this function generated from an extended lambda?
-- If yes, then return the number of hidden and non-hidden lambda-lifted arguments
, funWith :: Maybe QName
@@ -2389,7 +2407,7 @@ instance KillRange RewriteRuleMap where
killRange = fmap killRange
instance KillRange Section where
- killRange (Section tel freeVars) = killRange2 Section tel freeVars
+ killRange (Section tel) = killRange1 Section tel
instance KillRange Definition where
killRange (Defn ai name t pols occs displ mut compiled inst def) =
@@ -2412,6 +2430,9 @@ instance KillRange RewriteRule where
instance KillRange CompiledRepresentation where
killRange = id
+instance KillRange ExtLamInfo where
+ killRange = id
+
instance KillRange Defn where
killRange def =
case def of
diff --git a/src/full/Agda/TypeChecking/Monad/Builtin.hs b/src/full/Agda/TypeChecking/Monad/Builtin.hs
index e70b447..0478d43 100644
--- a/src/full/Agda/TypeChecking/Monad/Builtin.hs
+++ b/src/full/Agda/TypeChecking/Monad/Builtin.hs
@@ -86,20 +86,13 @@ constructorForm :: Term -> TCM Term
constructorForm v = constructorForm' primZero primSuc v
constructorForm' :: Applicative m => m Term -> m Term -> Term -> m Term
-constructorForm' pZero pSuc v = case ignoreSharing v of
-{- 2012-04-02 changed semantics of DontCare
--- Andreas, 2011-10-03, the following line restores IrrelevantLevel
- DontCare v -> constructorForm v
--}
- Lit (LitInt r n) -> cons (Lit . LitInt r) n
--- Level (Max []) -> primLevelZero
--- Level (Max [ClosedLevel n]) -> cons primLevelZero primLevelSuc (Level . Max . (:[]) . ClosedLevel) n
- _ -> pure v
- where
- cons lit n
- | n == 0 = pZero
- | n > 0 = (`apply` [defaultArg $ lit $ n - 1]) <$> pSuc
- | otherwise = pure v
+constructorForm' pZero pSuc v =
+ case ignoreSharing v of
+ Lit (LitInt r n)
+ | n == 0 -> pZero
+ | n > 0 -> (`apply` [defaultArg $ Lit $ LitInt r $ n - 1]) <$> pSuc
+ | otherwise -> pure v
+ _ -> pure v
---------------------------------------------------------------------------
-- * The names of built-in things
diff --git a/src/full/Agda/TypeChecking/Monad/Signature.hs b/src/full/Agda/TypeChecking/Monad/Signature.hs
index e51db1e..1510124 100644
--- a/src/full/Agda/TypeChecking/Monad/Signature.hs
+++ b/src/full/Agda/TypeChecking/Monad/Signature.hs
@@ -1,4 +1,5 @@
{-# LANGUAGE CPP #-}
+{-# LANGUAGE DoAndIfThenElse #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE PatternGuards #-}
@@ -141,19 +142,36 @@ unionSignatures ss = foldr unionSignature emptySignature ss
(HMap.unionWith mappend c c') -- rewrite rules are accumulated
-- | Add a section to the signature.
-addSection :: ModuleName -> Nat -> TCM ()
-addSection m fv = do
+--
+-- The current context will be stored as the cumulative module parameters
+-- for this section.
+addSection :: ModuleName -> TCM ()
+addSection m = do
tel <- getContextTelescope
- let sec = Section tel fv
- modifySignature $ \sig -> sig { sigSections = Map.insert m sec $ sigSections sig }
+ let sec = Section tel
+ -- Make sure we do not overwrite an existing section!
+ whenJustM (getSection m) $ \ sec' -> do
+ -- At least not with different content!
+ if (sec == sec') then do
+ -- Andreas, 2015-12-02: test/Succeed/Issue1701II.agda
+ -- reports a "redundantly adding existing section".
+ reportSLn "tc.section" 10 $ "warning: redundantly adding existing section " ++ show m
+ reportSLn "tc.section" 60 $ "with content " ++ show sec
+ else do
+ reportSLn "impossible" 10 $ "overwriting existing section " ++ show m
+ reportSLn "impossible" 60 $ "of content " ++ show sec'
+ reportSLn "impossible" 60 $ "with content " ++ show sec
+ __IMPOSSIBLE__
+ -- Add the new section.
+ modifySignature $ over sigSections $ Map.insert m sec
-- | Lookup a section. If it doesn't exist that just means that the module
-- wasn't parameterised.
lookupSection :: ModuleName -> TCM Telescope
lookupSection m = do
- sig <- sigSections <$> getSignature
- isig <- sigSections <$> getImportedSignature
- return $ maybe EmptyTel secTelescope $ Map.lookup m sig `mplus` Map.lookup m isig
+ sig <- use $ stSignature . sigSections
+ isig <- use $ stImports . sigSections
+ return $ maybe EmptyTel (^. secTelescope) $ Map.lookup m sig `mplus` Map.lookup m isig
-- Add display forms to all names @xn@ such that @x = x1 es1@, ... @xn-1 = xn esn@.
addDisplayForms :: QName -> TCM ()
@@ -212,6 +230,10 @@ applySection
-> Ren ModuleName -- ^ Imported modules (given as renaming).
-> TCM ()
applySection new ptel old ts rd rm = do
+ applySection' new ptel old ts rd rm
+
+applySection' :: ModuleName -> Telescope -> ModuleName -> Args -> Ren QName -> Ren ModuleName -> TCM ()
+applySection' new ptel old ts rd rm = do
reportSLn "tc.mod.apply" 10 $ render $ vcat
[ text "applySection"
, text "new =" <+> text (show new)
@@ -236,13 +258,10 @@ applySection new ptel old ts rd rm = do
-- produce out-of-scope constructors.
copyName x = fromMaybe x $ lookup x rd
- argsToUse new = do
- let m = mnameFromList $ commonPrefix (mnameToList old) (mnameToList new)
+ argsToUse x = do
+ let m = commonParentModule old x
reportSLn "tc.mod.apply" 80 $ "Common prefix: " ++ show m
- let ms = tail . map mnameFromList . inits . mnameToList $ m
- ps <- mapM (maybe 0 secFreeVars <.> getSection) ms
- reportSLn "tc.mod.apply" 80 $ " params: " ++ show (zip ms ps)
- return $ sum ps
+ size <$> lookupSection m
copyDef :: Args -> (QName, QName) -> TCM ()
copyDef ts (x, y) = do
@@ -314,8 +333,8 @@ applySection new ptel old ts rd rm = do
Record{ recPars = np, recConType = t, recTel = tel } -> return $
oldDef { recPars = np - size ts'
, recClause = Just cl
- , recConType = apply t ts
- , recTel = apply tel ts
+ , recConType = apply t ts'
+ , recTel = apply tel ts'
}
_ -> do
cc <- compileClauses Nothing [cl] -- Andreas, 2012-10-07 non need for record pattern translation
@@ -349,22 +368,47 @@ applySection new ptel old ts rd rm = do
, clauseType = Just $ defaultArg t
}
+ {- Example
+
+ module Top Θ where
+ module A Γ where
+ module M Φ where
+ module B Δ where
+ module N Ψ where
+ module O Ψ' where
+ open A public -- introduces only M --> A.M into the *scope*
+ module C Ξ = Top.B ts
+
+ new section C
+ tel = Ξ.(Θ.Δ)[ts]
+
+ calls
+ 1. copySec ts (Top.A.M, C.M)
+ 2. copySec ts (Top.B.N, C.N)
+ 3. copySec ts (Top.B.N.O, C.N.O)
+ with
+ old = Top.B
+
+ For 1.
+ Common prefix is: Top
+ totalArgs = |Θ| (section Top)
+ tel = Θ.Γ.Φ (section Top.A.M)
+ ts' = take totalArgs ts
+ Θ₂ = drop totalArgs Θ
+ new section C.M
+ tel = Θ₂.Γ.Φ[ts']
+ -}
copySec :: Args -> (ModuleName, ModuleName) -> TCM ()
copySec ts (x, y) = do
totalArgs <- argsToUse x
tel <- lookupSection x
- ptel <- lookupSection $ mnameFromList $ init $ mnameToList x
- let parentParams = size ptel
- childParams = size tel - parentParams
- argsToChild = max 0 $ totalArgs - parentParams
- let fv = childParams - argsToChild
+ let sectionTel = apply tel $ take totalArgs ts
reportSLn "tc.mod.apply" 80 $ "Copying section " ++ show x ++ " to " ++ show y
- reportSLn "tc.mod.apply" 80 $ " free variables: " ++ show fv
- reportSLn "tc.mod.apply" 80 $ " ts = " ++ show ts
- reportSLn "tc.mod.apply" 80 $ " tel = " ++ show (map (second unEl . unDom) $ telToList tel)
- reportSLn "tc.mod.apply" 80 $ " ptel = " ++ show (map (second unEl . unDom) $ telToList ptel)
- reportSLn "tc.mod.apply" 80 $ " np = " ++ show totalArgs
- addCtxTel (apply tel $ take totalArgs ts) $ addSection y fv
+ reportSLn "tc.mod.apply" 80 $ " ts = " ++ intercalate "; " (map prettyShow ts)
+ reportSLn "tc.mod.apply" 80 $ " totalArgs = " ++ show totalArgs
+ reportSLn "tc.mod.apply" 80 $ " tel = " ++ intercalate " " (map (fst . unDom) $ telToList tel) -- only names
+ reportSLn "tc.mod.apply" 80 $ " sectionTel = " ++ intercalate " " (map (fst . unDom) $ telToList ptel) -- only names
+ addCtxTel sectionTel $ addSection y
-- | Add a display form to a definition (could be in this or imported signature).
addDisplayForm :: QName -> DisplayForm -> TCM ()
@@ -437,14 +481,14 @@ defaultGetRewriteRulesFor getTCState q = do
st <- getTCState
let sig = st^.stSignature
imp = st^.stImports
- look s = HMap.lookup q $ sigRewriteRules s
+ look s = HMap.lookup q $ s ^. sigRewriteRules
return $ mconcat $ catMaybes [look sig, look imp]
instance HasConstInfo (TCMT IO) where
getRewriteRulesFor = defaultGetRewriteRulesFor get
getConstInfo q = join $ pureTCM $ \st env ->
- let defs = sigDefinitions $ st^.stSignature
- idefs = sigDefinitions $ st^.stImports
+ let defs = st^.(stSignature . sigDefinitions)
+ idefs = st^.(stImports . sigDefinitions)
in case catMaybes [HMap.lookup q defs, HMap.lookup q idefs] of
[] -> fail $ "Unbound name: " ++ show q ++ " " ++ showQNameId q
[d] -> mkAbs env d
@@ -533,30 +577,22 @@ mutuallyRecursive d d' = (d `elem`) <$> getMutual d'
-- A.B.C say, A and A.B do not exist.
getSection :: ModuleName -> TCM (Maybe Section)
getSection m = do
- sig <- sigSections <$> getSignature
- isig <- sigSections <$> getImportedSignature
+ sig <- use $ stSignature . sigSections
+ isig <- use $ stImports . sigSections
return $ Map.lookup m sig <|> Map.lookup m isig
--- | Look up the number of free variables of a section. This is equal to the
--- number of parameters if we're currently inside the section and 0 otherwise.
-getSecFreeVars :: ModuleName -> TCM Nat
-getSecFreeVars m = do
- top <- currentModule
- case top `isSubModuleOf` m || top == m of
- True -> maybe 0 secFreeVars <$> getSection m
- False -> return 0
-
--- | Compute the number of free variables of a module. This is the sum of
--- the free variables of its sections.
-getModuleFreeVars :: ModuleName -> TCM Nat
-getModuleFreeVars m = sum <$> ((:) <$> getAnonymousVariables m <*> mapM getSecFreeVars ms)
- where
- ms = map mnameFromList . inits . mnameToList $ m
+-- | Get the number of parameters to the current module.
+getCurrentModuleFreeVars :: TCM Nat
+getCurrentModuleFreeVars = size <$> (lookupSection =<< currentModule)
-- | Compute the number of free variables of a defined name. This is the sum of
--- the free variables of the sections it's contained in.
+-- number of parameters shared with the current module and the number of
+-- anonymous variables (if the name comes from a let-bound module).
getDefFreeVars :: QName -> TCM Nat
-getDefFreeVars q = getModuleFreeVars (qnameModule q)
+getDefFreeVars q = do
+ let m = qnameModule q
+ m0 <- commonParentModule m <$> currentModule
+ (+) <$> getAnonymousVariables m <*> (size <$> lookupSection m0)
-- | Compute the context variables to apply a definition to.
freeVarsToApply :: QName -> TCM Args
diff --git a/src/full/Agda/TypeChecking/Monad/State.hs b/src/full/Agda/TypeChecking/Monad/State.hs
index 728bd5b..bf4b764 100644
--- a/src/full/Agda/TypeChecking/Monad/State.hs
+++ b/src/full/Agda/TypeChecking/Monad/State.hs
@@ -190,20 +190,16 @@ withSignature sig m = do
return r
-- ** Modifiers for rewrite rules
-
-mapRewriteRules :: (RewriteRuleMap -> RewriteRuleMap) -> Signature -> Signature
-mapRewriteRules f sig = sig { sigRewriteRules = f (sigRewriteRules sig) }
-
addRewriteRulesFor :: QName -> RewriteRules -> Signature -> Signature
-addRewriteRulesFor f rews = mapRewriteRules $ HMap.insertWith mappend f rews
+addRewriteRulesFor f rews = over sigRewriteRules $ HMap.insertWith mappend f rews
-- ** Modifiers for parts of the signature
lookupDefinition :: QName -> Signature -> Maybe Definition
-lookupDefinition q sig = HMap.lookup q $ sigDefinitions sig
+lookupDefinition q sig = HMap.lookup q $ sig ^. sigDefinitions
updateDefinitions :: (Definitions -> Definitions) -> Signature -> Signature
-updateDefinitions f sig = sig { sigDefinitions = f (sigDefinitions sig) }
+updateDefinitions = over sigDefinitions
updateDefinition :: QName -> (Definition -> Definition) -> Signature -> Signature
updateDefinition q f = updateDefinitions $ HMap.adjust f q
@@ -358,7 +354,7 @@ freshTCM m = do
addSignatureInstances :: Signature -> TCM ()
addSignatureInstances sig = do
let itable = Map.fromListWith (++)
- [ (c, [i]) | (i, Defn{ defInstance = Just c }) <- HMap.toList $ sigDefinitions sig ]
+ [ (c, [i]) | (i, Defn{ defInstance = Just c }) <- HMap.toList $ sig ^. sigDefinitions ]
modifyInstanceDefs $ first $ Map.unionWith (++) itable
-- | Lens for 'stInstanceDefs'.
diff --git a/src/full/Agda/TypeChecking/Pretty.hs b/src/full/Agda/TypeChecking/Pretty.hs
index 224f87d..219b57c 100644
--- a/src/full/Agda/TypeChecking/Pretty.hs
+++ b/src/full/Agda/TypeChecking/Pretty.hs
@@ -336,7 +336,7 @@ showPat' :: (a -> TCM Doc) -> Pattern' a -> TCM Doc
showPat' showVar = showPat
where
showPat (VarP x) = showVar x
- showPat (DotP t) = text $ ".(" ++ show t ++ ")"
+ showPat (DotP t) = text $ ".(" ++ P.prettyShow t ++ ")"
showPat (ConP c i ps) = (if b then braces else parens) $ prTy $
prettyTCM c <+> fsep (map (showPat . namedArg) ps)
where
diff --git a/src/full/Agda/TypeChecking/Quote.hs b/src/full/Agda/TypeChecking/Quote.hs
index 87b6911..554d6fb 100644
--- a/src/full/Agda/TypeChecking/Quote.hs
+++ b/src/full/Agda/TypeChecking/Quote.hs
@@ -194,7 +194,7 @@ quotingKit = do
qx d @@ quoteArgs ts
where
ts = fromMaybe __IMPOSSIBLE__ $ allApplyElims es
- qx Function{ funExtLam = Just (h, nh), funClauses = cs } =
+ qx Function{ funExtLam = Just (ExtLamInfo h nh), funClauses = cs } =
extlam !@ list (map (quoteClause . dropArgs (h + nh)) cs)
qx Function{ funCompiled = Just Fail, funClauses = [cl] } =
extlam !@ list [quoteClause $ dropArgs (length (clausePats cl) - 1) cl]
diff --git a/src/full/Agda/TypeChecking/Records.hs b/src/full/Agda/TypeChecking/Records.hs
index f2fa058..c9043c4 100644
--- a/src/full/Agda/TypeChecking/Records.hs
+++ b/src/full/Agda/TypeChecking/Records.hs
@@ -26,8 +26,9 @@ import Agda.TypeChecking.Reduce.Monad ()
import Agda.TypeChecking.Telescope
import Agda.Utils.Either
-import Agda.Utils.List
import Agda.Utils.Functor (for, ($>))
+import Agda.Utils.Lens
+import Agda.Utils.List
import Agda.Utils.Maybe
import Agda.Utils.Monad
import Agda.Utils.Null
@@ -83,7 +84,7 @@ recordFieldNames = map (fmap (nameConcrete . qnameName)) . recFields
-- | Find all records with at least the given fields.
findPossibleRecords :: [C.Name] -> TCM [QName]
findPossibleRecords fields = do
- defs <- (HMap.union `on` sigDefinitions) <$> getSignature <*> getImportedSignature
+ defs <- (HMap.union `on` (^. sigDefinitions)) <$> getSignature <*> getImportedSignature
let possible def = case theDef def of
Record{ recFields = fs } -> Set.isSubsetOf given inrecord
where inrecord = Set.fromList $ map (nameConcrete . qnameName . unArg) fs
diff --git a/src/full/Agda/TypeChecking/Reduce.hs b/src/full/Agda/TypeChecking/Reduce.hs
index b66eccd..efdb442 100644
--- a/src/full/Agda/TypeChecking/Reduce.hs
+++ b/src/full/Agda/TypeChecking/Reduce.hs
@@ -1080,7 +1080,7 @@ instance InstantiateFull Signature where
instantiateFull' (Sig a b c) = uncurry3 Sig <$> instantiateFull' (a, b, c)
instance InstantiateFull Section where
- instantiateFull' (Section tel n) = flip Section n <$> instantiateFull' tel
+ instantiateFull' (Section tel) = Section <$> instantiateFull' tel
instance (Subst a, InstantiateFull a) => InstantiateFull (Tele a) where
instantiateFull' EmptyTel = return EmptyTel
diff --git a/src/full/Agda/TypeChecking/Reduce/Monad.hs b/src/full/Agda/TypeChecking/Reduce/Monad.hs
index b0727e7..9d96889 100644
--- a/src/full/Agda/TypeChecking/Reduce/Monad.hs
+++ b/src/full/Agda/TypeChecking/Reduce/Monad.hs
@@ -169,8 +169,8 @@ traceSLn k n s = applyWhenVerboseS k n (trace s)
instance HasConstInfo ReduceM where
getRewriteRulesFor = defaultGetRewriteRulesFor (gets id)
getConstInfo q = ReduceM $ ReaderT $ \(ReduceEnv env st) -> Identity $
- let defs = sigDefinitions $ st^.stSignature
- idefs = sigDefinitions $ st^.stImports
+ let defs = st^.(stSignature . sigDefinitions)
+ idefs = st^.(stImports . sigDefinitions)
in case catMaybes [HMap.lookup q defs, HMap.lookup q idefs] of
[] -> trace ("Unbound name: " ++ show q ++ " " ++ showQNameId q) __IMPOSSIBLE__
[d] -> mkAbs env d
diff --git a/src/full/Agda/TypeChecking/Rules/Data.hs b/src/full/Agda/TypeChecking/Rules/Data.hs
index c431825..3cc4552 100644
--- a/src/full/Agda/TypeChecking/Rules/Data.hs
+++ b/src/full/Agda/TypeChecking/Rules/Data.hs
@@ -59,7 +59,7 @@ checkDataDef i name ps cs =
npars = sum $ map countPars ps
-- Add the datatype module
- addSection (qnameToMName name) 0
+ addSection (qnameToMName name)
-- Look up the type of the datatype.
t <- instantiateFull =<< typeOfConst name
diff --git a/src/full/Agda/TypeChecking/Rules/Decl.hs b/src/full/Agda/TypeChecking/Rules/Decl.hs
index 8a779ff..b97e28d 100644
--- a/src/full/Agda/TypeChecking/Rules/Decl.hs
+++ b/src/full/Agda/TypeChecking/Rules/Decl.hs
@@ -1,4 +1,5 @@
{-# LANGUAGE CPP #-}
+{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TupleSections #-}
#if __GLASGOW_HASKELL__ >= 710
@@ -569,7 +570,7 @@ checkTypeSignature _ = __IMPOSSIBLE__ -- type signatures are always axioms
checkSection :: Info.ModuleInfo -> ModuleName -> A.Telescope -> [A.Declaration] -> TCM ()
checkSection i x tel ds =
checkTelescope tel $ \ tel' -> do
- addSection x (size tel')
+ addSection x
verboseS "tc.mod.check" 10 $ do
dx <- prettyTCM x
dtel <- mapM prettyAs tel
@@ -642,7 +643,7 @@ checkSectionApplication' i m1 (A.SectionApp ptel m2 args) rd rm = do
-- Module applications can appear in lets, in which case we treat
-- lambda-bound variables as additional parameters to the module.
extraParams <- do
- mfv <- getModuleFreeVars =<< currentModule
+ mfv <- getCurrentModuleFreeVars
fv <- size <$> getContextTelescope
return (fv - mfv)
when (extraParams > 0) $ reportSLn "tc.mod.apply" 30 $ "Extra parameters to " ++ show m1 ++ ": " ++ show extraParams
@@ -671,7 +672,9 @@ checkSectionApplication' i m1 (A.SectionApp ptel m2 args) rd rm = do
, nest 2 $ text "eta =" <+> escapeContext (size ptel) (addContext tel'' $ prettyTCM etaTel)
]
-- Now, type check arguments.
- ts <- noConstraints $ checkArguments_ DontExpandLast (getRange i) args' tel''
+ ts <- (noConstraints $ checkArguments_ DontExpandLast (getRange i) args' tel') >>= \case
+ (ts, etaTel') | (size etaTel == size etaTel') -> return ts
+ _ -> __IMPOSSIBLE__
-- Perform the application of the module parameters.
let aTel = tel' `apply` ts
reportSDoc "tc.mod.apply" 15 $ vcat
@@ -679,7 +682,7 @@ checkSectionApplication' i m1 (A.SectionApp ptel m2 args) rd rm = do
]
-- Andreas, 2014-04-06, Issue 1094:
-- Add the section with well-formed telescope.
- addCtxTel aTel $ addSection m1 (size ptel + size aTel + extraParams)
+ addCtxTel aTel $ addSection m1
reportSDoc "tc.mod.apply" 20 $ vcat
[ sep [ text "applySection", prettyTCM m1, text "=", prettyTCM m2, fsep $ map prettyTCM (vs ++ ts) ]
diff --git a/src/full/Agda/TypeChecking/Rules/Def.hs b/src/full/Agda/TypeChecking/Rules/Def.hs
index a81cd27..6e0b965 100644
--- a/src/full/Agda/TypeChecking/Rules/Def.hs
+++ b/src/full/Agda/TypeChecking/Rules/Def.hs
@@ -152,7 +152,7 @@ checkAlias t' ai delayed i name e = do
checkFunDef' :: Type -- ^ the type we expect the function to have
-> I.ArgInfo -- ^ is it irrelevant (for instance)
-> Delayed -- ^ are the clauses delayed (not unfolded willy-nilly)
- -> Maybe (Int, Int) -- ^ does the definition come from an extended lambda
+ -> Maybe ExtLamInfo -- ^ does the definition come from an extended lambda
-- (if so, we need to know some stuff about lambda-lifted args)
-> Maybe QName -- ^ is it a with function (if so, what's the name of the parent function)
-> Info.DefInfo -- ^ range info
@@ -318,225 +318,36 @@ data WithFunctionProblem
, wfClauses :: [A.Clause] -- ^ The given clauses for the with function
}
+-- | Create a clause body from a term.
+--
+-- As we have type checked the term in the clause telescope, but the final
+-- body should have bindings in the order of the pattern variables,
+-- we need to apply the permutation to the checked term.
+
+mkBody :: Permutation -> Term -> ClauseBody
+mkBody perm v = foldr (\ x t -> Bind $ Abs x t) b xs
+ where
+ b = Body $ applySubst (renamingR perm) v
+ xs = [ stringToArgName $ "h" ++ show n | n <- [0 .. permRange perm - 1] ]
+
+
-- | Type check a function clause.
-checkClause :: Type -> A.SpineClause -> TCM Clause
+
+checkClause
+ :: Type -- ^ Type of function defined by this clause.
+ -> A.SpineClause -- ^ Clause.
+ -> TCM Clause -- ^ Type-checked clause.
+
checkClause t c@(A.Clause (A.SpineLHS i x aps withPats) rhs0 wh) = do
+ reportSDoc "tc.with.top" 30 $ text "Checking clause" $$ prettyA c
unless (null withPats) $
typeError $ UnexpectedWithPatterns withPats
traceCall (CheckClause t c) $ do
aps <- expandPatternSynonyms aps
- checkLeftHandSide (CheckPatternShadowing c) (Just x) aps t $ \ (LHSResult delta ps trhs perm) -> do
+ checkLeftHandSide (CheckPatternShadowing c) (Just x) aps t $ \ lhsResult@(LHSResult delta ps trhs perm) -> do
-- Note that we might now be in irrelevant context,
-- in case checkLeftHandSide walked over an irrelevant projection pattern.
-
- -- As we will be type-checking the @rhs@ in @delta@, but the final
- -- body should have bindings in the order of the pattern variables,
- -- we need to apply the permutation to the checked rhs @v@.
- let mkBody v = foldr (\ x t -> Bind $ Abs x t) b xs
- where b = Body $ applySubst (renamingR perm) v
- xs = [ stringToArgName $ "h" ++ show n
- | n <- [0..permRange perm - 1] ]
-
- -- introduce trailing implicits for checking the where decls
- TelV htel t0 <- telViewUpTo' (-1) (not . visible) $ unArg trhs
- let n = size htel
- aps' = convColor aps
- checkWhere' wh = addCtxTel htel . checkWhere (size delta + n) wh . escapeContext (size htel)
- (body, with) <- checkWhere' wh $ let
- -- for the body, we remove the implicits again
- handleRHS rhs =
- case rhs of
- A.RHS e
- | any (containsAbsurdPattern . namedArg) aps ->
- typeError $ AbsurdPatternRequiresNoRHS aps'
- | otherwise -> do
- v <- checkExpr e $ unArg trhs
- return (mkBody v, NoWithFunction)
- A.AbsurdRHS
- | any (containsAbsurdPattern . namedArg) aps
- -> return (NoBody, NoWithFunction)
- | otherwise -> typeError $ NoRHSRequiresAbsurdPattern aps'
- A.RewriteRHS [] rhs [] -> handleRHS rhs
- -- Andreas, 2014-01-17, Issue 1402:
- -- If the rewrites are discarded since lhs=rhs, then
- -- we can actually have where clauses.
- A.RewriteRHS [] rhs wh -> checkWhere' wh $ handleRHS rhs
- A.RewriteRHS ((qname,eq):qes) rhs wh -> do
-
- -- Action for skipping this rewrite.
- -- We do not want to create unsolved metas in case of
- -- a futile rewrite with a reflexive equation.
- -- Thus, we restore the state in this case,
- -- unless the rewrite expression contains questionmarks.
- st <- get
- let recurse = do
- st' <- get
- -- Comparing the whole stInteractionPoints maps is a bit
- -- wasteful, but we assume
- -- 1. rewriting with a reflexive equality to happen rarely,
- -- 2. especially with ?-holes in the rewrite expression
- -- 3. and a large overall number of ?s.
- let sameIP = (==) `on` (^.stInteractionPoints)
- when (sameIP st st') $ put st
- handleRHS $ A.RewriteRHS qes rhs wh
-
- -- Get value and type of rewrite-expression.
-
- (proof,t) <- inferExpr eq
-
- -- Get the names of builtins EQUALITY and REFL.
-
- equality <- primEqualityName
- Con reflCon [] <- ignoreSharing <$> primRefl
-
- -- Check that the type is actually an equality (lhs ≡ rhs)
- -- and extract lhs, rhs, and their type.
-
- t' <- reduce =<< instantiateFull t
- (rewriteType,rewriteFrom,rewriteTo) <- do
- case ignoreSharing $ unEl t' of
- Def equality'
- [ _level
- , Apply (Arg (ArgInfo Hidden Relevant _) rewriteType)
- , Apply (Arg (ArgInfo NotHidden Relevant _) rewriteFrom)
- , Apply (Arg (ArgInfo NotHidden Relevant _) rewriteTo)
- ] | equality' == equality ->
- return (El (getSort t') rewriteType, rewriteFrom, rewriteTo)
- _ -> do
- err <- text "Cannot rewrite by equation of type" <+> prettyTCM t'
- typeError $ GenericDocError err
-
- -- Andreas, 2014-05-17 Issue 1110:
- -- Rewriting with a reflexive equation has no effect, but gives an
- -- incomprehensible error message about the generated
- -- with clause. Thus, we rather do simply nothing if
- -- rewriting with @a ≡ a@ is attempted.
-
- let isReflexive = tryConversion $ dontAssignMetas $
- equalTerm rewriteType rewriteFrom rewriteTo
-
- ifM isReflexive recurse $ {- else -} do
-
- -- Transform 'rewrite' clause into a 'with' clause,
- -- going back to abstract syntax.
-
- let cinfo = ConPatInfo ConPCon patNoRange
- underscore = A.Underscore Info.emptyMetaInfo
-
- -- Andreas, 2015-02-09 Issue 1421: kill ranges
- -- as reify puts in ranges that may point to other files.
- (rewriteFromExpr,rewriteToExpr,rewriteTypeExpr, proofExpr) <- killRange <$> do
- disableDisplayForms $ withShowAllArguments $ reify
- (rewriteFrom, rewriteTo, rewriteType , proof)
- let (inner, outer) -- the where clauses should go on the inner-most with
- | null qes = ([], wh)
- | otherwise = (wh, [])
- -- Andreas, 2014-03-05 kill range of copied patterns
- -- since they really do not have a source location.
- newRhs = A.WithRHS qname [rewriteFromExpr, proofExpr]
- [A.Clause (A.LHS i (A.LHSHead x (killRange aps)) pats)
- -- Note: handleRHS (A.RewriteRHS _ eqs _ _)
- -- is defined by induction on eqs.
- (A.RewriteRHS qes (insertPatterns pats rhs) inner)
- outer]
- pats = [ A.DotP patNoRange underscore
- , A.ConP cinfo (AmbQ [conName reflCon]) []]
- reportSDoc "tc.rewrite.top" 25 $ vcat
- [ text "rewrite"
- , text " from = " <+> prettyTCM rewriteFromExpr
- , text " to = " <+> prettyTCM rewriteToExpr
- , text " typ = " <+> prettyTCM rewriteType
- , text " proof = " <+> prettyTCM proofExpr
- , text " equ = " <+> prettyTCM t'
- ]
- handleRHS newRhs
-
- A.WithRHS aux es cs -> do
- reportSDoc "tc.with.top" 15 $ vcat
- [ text "TC.Rules.Def.checkclause reached A.WithRHS"
- , sep $ prettyA aux : map (parens . prettyA) es
- ]
- reportSDoc "tc.with.top" 30 $
- prettyA c
- reportSDoc "tc.with.top" 20 $ do
- m <- currentModule
- nfv <- getModuleFreeVars m
- sep [ text "with function module:" <+>
- prettyList (map prettyTCM $ mnameToList m)
- , text $ "free variables: " ++ show nfv
- ]
-
- -- Infer the types of the with expressions
- (vs0, as) <- unzip <$> mapM inferExprForWith es
- (vs, as) <- normalise (vs0, as)
-
- -- Split the telescope into the part needed to type the with arguments
- -- and all the other stuff
- let fv = allFreeVars (vs, as)
- SplitTel delta1 delta2 perm' = splitTelescope fv delta
- finalPerm = composeP perm' perm
-
- reportSLn "tc.with.top" 75 $ "delta = " ++ show delta
-
- -- Andreas, 2012-09-17: for printing delta,
- -- we should remove it from the context first
- reportSDoc "tc.with.top" 25 $ escapeContext (size delta) $ vcat
- [ text "delta =" <+> prettyTCM delta
- , text "delta1 =" <+> prettyTCM delta1
- , text "delta2 =" <+> addCtxTel delta1 (prettyTCM delta2)
- ]
- reportSDoc "tc.with.top" 25 $ vcat
- [ text "vs =" <+> prettyTCM vs
- , text "as =" <+> prettyTCM as
- , text "perm' =" <+> text (show perm')
- , text "perm =" <+> text (show perm)
- , text "fPerm =" <+> text (show finalPerm)
- ]
-
- -- Create the body of the original function
-
- -- All the context variables
- us <- getContextArgs
- let n = size us
- m = size delta
- -- First the variables bound outside this definition
- (us0, us1') = genericSplitAt (n - m) us
- -- Then permute the rest and grab those needed to for the with arguments
- (us1, us2) = genericSplitAt (size delta1) $ permute perm' us1'
- -- Now stuff the with arguments in between and finish with the remaining variables
- v = Def aux $ map Apply $ us0 ++ us1 ++ (map defaultArg vs0) ++ us2
-
- -- We need Δ₁Δ₂ ⊢ t'
- t' <- return $ renameP (reverseP perm') $ unArg trhs
- -- and Δ₁ ⊢ vs : as
- (vs, as) <- do
- let -- We know that as does not depend on Δ₂
- rho = compactS __IMPOSSIBLE__ (replicate (size delta2) Nothing)
- return $ applySubst rho $ renameP (reverseP perm') (vs, as)
-
-
- -- Andreas, 2013-02-26 add with-name to signature for printing purposes
- addConstant aux =<< do
- useTerPragma $ Defn defaultArgInfo aux typeDontCare [] [] [] 0 noCompiledRep Nothing emptyFunction
-
- -- Andreas, 2013-02-26 separate msgs to see which goes wrong
- reportSDoc "tc.with.top" 20 $
- text " with arguments" <+> do escapeContext (size delta2) $ prettyList (map prettyTCM vs)
- reportSDoc "tc.with.top" 20 $
- text " types" <+> do escapeContext (size delta2) $ prettyList (map prettyTCM as)
- reportSDoc "tc.with.top" 20 $
- text "with function call" <+> prettyTCM v
- reportSDoc "tc.with.top" 20 $
- text " context" <+> (prettyTCM =<< getContextTelescope)
- reportSDoc "tc.with.top" 20 $
- text " delta" <+> do escapeContext (size delta) $ prettyTCM delta
- reportSDoc "tc.with.top" 20 $
- text " fv" <+> text (show fv)
- reportSDoc "tc.with.top" 20 $
- text " body" <+> (addCtxTel delta $ prettyTCM $ mkBody v)
-
- return (mkBody v, WithFunction x aux t delta1 delta2 vs as t' ps perm' perm finalPerm cs)
- in handleRHS rhs0
+ (body, with) <- checkWhere (unArg trhs) wh $ checkRHS i x aps t lhsResult rhs0
escapeContext (size delta) $ checkWithFunction with
reportSDoc "tc.lhs.top" 10 $ escapeContext (size delta) $ vcat
@@ -559,6 +370,209 @@ checkClause t c@(A.Clause (A.SpineLHS i x aps withPats) rhs0 wh) = do
, clauseType = Just trhs
}
+-- | Type check the @with@ and @rewrite@ lhss and/or the rhs.
+
+checkRHS
+ :: LHSInfo -- ^ Range of lhs.
+ -> QName -- ^ Name of function.
+ -> [A.NamedArg A.Pattern] -- ^ Patterns in lhs.
+ -> Type -- ^ Type of function.
+ -> LHSResult -- ^ Result of type-checking patterns
+ -> A.RHS -- ^ Rhs to check.
+ -> TCM (ClauseBody, WithFunctionProblem)
+
+checkRHS i x aps t (LHSResult delta ps trhs perm) rhs0 = handleRHS rhs0
+ where
+ aps' = convColor aps
+ absurdPat = any (containsAbsurdPattern . namedArg) aps
+ handleRHS rhs =
+ case rhs of
+
+ -- Case: ordinary RHS
+ A.RHS e -> do
+ when absurdPat $ typeError $ AbsurdPatternRequiresNoRHS aps'
+ v <- checkExpr e $ unArg trhs
+ return (mkBody perm v, NoWithFunction)
+
+ -- Case: no RHS
+ A.AbsurdRHS -> do
+ unless absurdPat $ typeError $ NoRHSRequiresAbsurdPattern aps'
+ return (NoBody, NoWithFunction)
+
+ -- Case: @rewrite@
+ A.RewriteRHS [] rhs [] -> handleRHS rhs
+ -- Andreas, 2014-01-17, Issue 1402:
+ -- If the rewrites are discarded since lhs=rhs, then
+ -- we can actually have where clauses.
+ A.RewriteRHS [] rhs wh -> checkWhere (unArg trhs) wh $ handleRHS rhs
+ A.RewriteRHS ((qname,eq):qes) rhs wh -> do
+
+ -- Action for skipping this rewrite.
+ -- We do not want to create unsolved metas in case of
+ -- a futile rewrite with a reflexive equation.
+ -- Thus, we restore the state in this case,
+ -- unless the rewrite expression contains questionmarks.
+ st <- get
+ let recurse = do
+ st' <- get
+ -- Comparing the whole stInteractionPoints maps is a bit
+ -- wasteful, but we assume
+ -- 1. rewriting with a reflexive equality to happen rarely,
+ -- 2. especially with ?-holes in the rewrite expression
+ -- 3. and a large overall number of ?s.
+ let sameIP = (==) `on` (^.stInteractionPoints)
+ when (sameIP st st') $ put st
+ handleRHS $ A.RewriteRHS qes rhs wh
+
+ -- Get value and type of rewrite-expression.
+
+ (proof,t) <- inferExpr eq
+
+ -- Get the names of builtins EQUALITY and REFL.
+
+ equality <- primEqualityName
+ Con reflCon [] <- ignoreSharing <$> primRefl
+
+ -- Check that the type is actually an equality (lhs ≡ rhs)
+ -- and extract lhs, rhs, and their type.
+
+ t' <- reduce =<< instantiateFull t
+ (rewriteType,rewriteFrom,rewriteTo) <- do
+ case ignoreSharing $ unEl t' of
+ Def equality'
+ [ _level
+ , Apply (Arg (ArgInfo Hidden Relevant _) rewriteType)
+ , Apply (Arg (ArgInfo NotHidden Relevant _) rewriteFrom)
+ , Apply (Arg (ArgInfo NotHidden Relevant _) rewriteTo)
+ ] | equality' == equality ->
+ return (El (getSort t') rewriteType, rewriteFrom, rewriteTo)
+ _ -> do
+ err <- text "Cannot rewrite by equation of type" <+> prettyTCM t'
+ typeError $ GenericDocError err
+
+ -- Andreas, 2014-05-17 Issue 1110:
+ -- Rewriting with a reflexive equation has no effect, but gives an
+ -- incomprehensible error message about the generated
+ -- with clause. Thus, we rather do simply nothing if
+ -- rewriting with @a ≡ a@ is attempted.
+
+ let isReflexive = tryConversion $ dontAssignMetas $
+ equalTerm rewriteType rewriteFrom rewriteTo
+
+ ifM isReflexive recurse $ {- else -} do
+
+ -- Transform 'rewrite' clause into a 'with' clause,
+ -- going back to abstract syntax.
+
+ -- Andreas, 2015-02-09 Issue 1421: kill ranges
+ -- as reify puts in ranges that may point to other files.
+ (rewriteFromExpr,rewriteToExpr,rewriteTypeExpr, proofExpr) <- killRange <$> do
+ disableDisplayForms $ withShowAllArguments $ reify
+ (rewriteFrom, rewriteTo, rewriteType , proof)
+ let (inner, outer) -- the where clauses should go on the inner-most with
+ | null qes = ([], wh)
+ | otherwise = (wh, [])
+ -- Andreas, 2014-03-05 kill range of copied patterns
+ -- since they really do not have a source location.
+ newRhs = A.WithRHS qname [rewriteFromExpr, proofExpr]
+ [A.Clause (A.LHS i (A.LHSHead x (killRange aps)) pats)
+ -- Note: handleRHS (A.RewriteRHS _ eqs _ _)
+ -- is defined by induction on eqs.
+ (A.RewriteRHS qes (insertPatterns pats rhs) inner)
+ outer]
+ cinfo = ConPatInfo ConPCon patNoRange
+ pats = [ A.WildP patNoRange
+ , A.ConP cinfo (AmbQ [conName reflCon]) []]
+ reportSDoc "tc.rewrite.top" 25 $ vcat
+ [ text "rewrite"
+ , text " from = " <+> prettyTCM rewriteFromExpr
+ , text " to = " <+> prettyTCM rewriteToExpr
+ , text " typ = " <+> prettyTCM rewriteType
+ , text " proof = " <+> prettyTCM proofExpr
+ , text " equ = " <+> prettyTCM t'
+ ]
+ handleRHS newRhs
+
+ -- Case: @with@
+ A.WithRHS aux es cs -> do
+ reportSDoc "tc.with.top" 15 $ vcat
+ [ text "TC.Rules.Def.checkclause reached A.WithRHS"
+ , sep $ prettyA aux : map (parens . prettyA) es
+ ]
+ reportSDoc "tc.with.top" 20 $ do
+ nfv <- getCurrentModuleFreeVars
+ m <- currentModule
+ sep [ text "with function module:" <+>
+ prettyList (map prettyTCM $ mnameToList m)
+ , text $ "free variables: " ++ show nfv
+ ]
+
+ -- Infer the types of the with expressions
+ (vs0, as) <- unzip <$> mapM inferExprForWith es
+ (vs, as) <- normalise (vs0, as)
+
+ -- Andreas, 2012-09-17: for printing delta,
+ -- we should remove it from the context first
+ reportSDoc "tc.with.top" 25 $ escapeContext (size delta) $ vcat
+ [ text "delta =" <+> prettyTCM delta
+ ]
+ reportSDoc "tc.with.top" 25 $ vcat
+ [ text "vs =" <+> prettyTCM vs
+ , text "as =" <+> prettyTCM as
+ , text "perm =" <+> text (show perm)
+ ]
+
+ -- Split the telescope into the part needed to type the with arguments
+ -- and all the other stuff
+ (delta1, delta2, perm', t', as, vs) <- return $
+ splitTelForWith delta (unArg trhs) as vs
+ let finalPerm = composeP perm' perm
+
+ reportSLn "tc.with.top" 75 $ "delta = " ++ show delta
+
+ -- Andreas, 2012-09-17: for printing delta,
+ -- we should remove it from the context first
+ reportSDoc "tc.with.top" 25 $ escapeContext (size delta) $ vcat
+ [ text "delta1 =" <+> prettyTCM delta1
+ , text "delta2 =" <+> addCtxTel delta1 (prettyTCM delta2)
+ ]
+ reportSDoc "tc.with.top" 25 $ vcat
+ [ text "perm' =" <+> text (show perm')
+ , text "fPerm =" <+> text (show finalPerm)
+ ]
+
+ -- Create the body of the original function
+
+ -- All the context variables
+ us <- getContextArgs
+ let n = size us
+ m = size delta
+ -- First the variables bound outside this definition
+ (us0, us1') = genericSplitAt (n - m) us
+ -- Then permute the rest and grab those needed to for the with arguments
+ (us1, us2) = genericSplitAt (size delta1) $ permute perm' us1'
+ -- Now stuff the with arguments in between and finish with the remaining variables
+ v = Def aux $ map Apply $ us0 ++ us1 ++ (map defaultArg vs0) ++ us2
+ body = mkBody perm v
+ -- Andreas, 2013-02-26 add with-name to signature for printing purposes
+ addConstant aux =<< do
+ useTerPragma $ Defn defaultArgInfo aux typeDontCare [] [] [] 0 noCompiledRep Nothing emptyFunction
+
+ -- Andreas, 2013-02-26 separate msgs to see which goes wrong
+ reportSDoc "tc.with.top" 20 $
+ text " with arguments" <+> do escapeContext (size delta) $ addContext delta1 $ addContext delta2 $ prettyList (map prettyTCM vs)
+ reportSDoc "tc.with.top" 20 $
+ text " types" <+> do escapeContext (size delta) $ addContext delta1 $ prettyList (map prettyTCM as)
+ reportSDoc "tc.with.top" 20 $
+ text "with function call" <+> prettyTCM v
+ reportSDoc "tc.with.top" 20 $
+ text " context" <+> (prettyTCM =<< getContextTelescope)
+ reportSDoc "tc.with.top" 20 $
+ text " delta" <+> do escapeContext (size delta) $ prettyTCM delta
+ reportSDoc "tc.with.top" 20 $
+ text " body" <+> (addCtxTel delta $ prettyTCM body)
+
+ return (body, WithFunction x aux t delta1 delta2 vs as t' ps perm' perm finalPerm cs)
checkWithFunction :: WithFunctionProblem -> TCM ()
checkWithFunction NoWithFunction = return ()
@@ -571,12 +585,12 @@ checkWithFunction (WithFunction f aux t delta1 delta2 vs as b qs perm' perm fina
, text "delta2 =" <+> addCtxTel delta1 (prettyTCM delta2)
, text "t =" <+> prettyTCM t
, text "as =" <+> addCtxTel delta1 (prettyTCM as)
- , text "vs =" <+> addCtxTel delta1 (prettyTCM vs)
+ , text "vs =" <+> do addCtxTel delta1 $ addCtxTel delta2 $ prettyTCM vs
, text "b =" <+> do addCtxTel delta1 $ addCtxTel delta2 $ prettyTCM b
, text "qs =" <+> text (show qs)
, text "perm' =" <+> text (show perm')
, text "perm =" <+> text (show perm)
- , text "fperm =" <+> text (show finalPerm)
+ , text "fperm =" <+> text (show finalPerm)
]
]
@@ -650,7 +664,7 @@ checkWithFunction (WithFunction f aux t delta1 delta2 vs as b qs perm' perm fina
-- Construct the body for the with function
cs <- return $ map (A.lhsToSpine) cs
- cs <- buildWithFunction aux t qs finalPerm (size delta1) (size as) cs
+ cs <- buildWithFunction f aux t qs finalPerm (size delta1) (size as) cs
cs <- return $ map (A.spineToLhs) cs
-- Check the with function
@@ -659,25 +673,36 @@ checkWithFunction (WithFunction f aux t delta1 delta2 vs as b qs perm' perm fina
where
info = Info.mkDefInfo (nameConcrete $ qnameName aux) defaultFixity' PublicAccess ConcreteDef (getRange cs)
--- | Type check a where clause. The first argument is the number of variables
--- bound in the left hand side.
-checkWhere :: Nat -> [A.Declaration] -> TCM a -> TCM a
-checkWhere _ [] ret = ret
-checkWhere n [A.ScopedDecl scope ds] ret = withScope_ scope $ checkWhere n ds ret
-checkWhere n [A.Section _ m tel ds] ret = do
- checkTelescope tel $ \ tel' -> do
- reportSDoc "tc.def.where" 10 $
- text "adding section:" <+> prettyTCM m <+> text (show (size tel')) <+> text (show n)
- addSection m (size tel' + n) -- the variables bound in the lhs
- -- are also parameters
- verboseS "tc.def.where" 10 $ do
- dx <- prettyTCM m
- dtel <- mapM prettyAs tel
- dtel' <- prettyTCM =<< lookupSection m
- reportSLn "tc.def.where" 10 $ "checking where section " ++ show dx ++ " " ++ show dtel
- reportSLn "tc.def.where" 10 $ " actual tele: " ++ show dtel'
- withCurrentModule m $ checkDecls ds >> ret
-checkWhere _ _ _ = __IMPOSSIBLE__
+-- | Type check a where clause.
+checkWhere
+ :: Type -- ^ Type of rhs.
+ -> [A.Declaration] -- ^ Where-declarations to check.
+ -> TCM a -- ^ Continutation.
+ -> TCM a
+checkWhere trhs ds ret0 = do
+ -- Temporarily add trailing hidden arguments to check where-declarartions.
+ TelV htel _ <- telViewUpTo' (-1) (not . visible) trhs
+ let
+ -- Remove htel after checking ds.
+ ret = escapeContext (size htel) $ ret0
+ loop ds = case ds of
+ [] -> ret
+ [A.ScopedDecl scope ds] -> withScope_ scope $ loop ds
+ [A.Section _ m tel ds] -> do
+ checkTelescope tel $ \ tel' -> do
+ reportSDoc "tc.def.where" 10 $
+ text "adding section:" <+> prettyTCM m <+> text (show (size tel'))
+ addSection m
+ verboseS "tc.def.where" 10 $ do
+ dx <- prettyTCM m
+ dtel <- mapM prettyAs tel
+ dtel' <- prettyTCM =<< lookupSection m
+ reportSLn "tc.def.where" 10 $ "checking where section " ++ show dx ++ " " ++ show dtel
+ reportSLn "tc.def.where" 10 $ " actual tele: " ++ show dtel'
+ withCurrentModule m $ checkDecls ds >> ret
+ _ -> __IMPOSSIBLE__
+ -- Add htel to check ds.
+ addCtxTel htel $ loop ds
-- | Check if a pattern contains an absurd pattern. For instance, @suc ()@
containsAbsurdPattern :: A.Pattern -> Bool
diff --git a/src/full/Agda/TypeChecking/Rules/Def.hs-boot b/src/full/Agda/TypeChecking/Rules/Def.hs-boot
index 3fe562f..7004a64 100644
--- a/src/full/Agda/TypeChecking/Rules/Def.hs-boot
+++ b/src/full/Agda/TypeChecking/Rules/Def.hs-boot
@@ -8,6 +8,6 @@ import qualified Agda.Syntax.Internal as I
checkFunDef :: Delayed -> DefInfo -> QName -> [Clause] -> TCM ()
-checkFunDef' :: I.Type -> I.ArgInfo -> Delayed -> Maybe (Int,Int) -> Maybe QName -> DefInfo -> QName -> [Clause] -> TCM ()
+checkFunDef' :: I.Type -> I.ArgInfo -> Delayed -> Maybe ExtLamInfo -> Maybe QName -> DefInfo -> QName -> [Clause] -> TCM ()
useTerPragma :: Definition -> TCM Definition
diff --git a/src/full/Agda/TypeChecking/Rules/Record.hs b/src/full/Agda/TypeChecking/Rules/Record.hs
index 3e0042f..edf846c 100644
--- a/src/full/Agda/TypeChecking/Rules/Record.hs
+++ b/src/full/Agda/TypeChecking/Rules/Record.hs
@@ -234,7 +234,7 @@ checkRecDef i name ind con ps contel fields =
reportSDoc "tc.rec.def" 15 $ nest 2 $ vcat
[ text "field tel =" <+> escapeContext 1 (prettyTCM ftel)
]
- addSection m (size tel')
+ addSection m
-- Check the types of the fields
-- Andreas, 2013-09-13 all module telescopes count as parameters to the record projections
diff --git a/src/full/Agda/TypeChecking/Rules/Term.hs b/src/full/Agda/TypeChecking/Rules/Term.hs
index 5e84b63..b2aeb3a 100644
--- a/src/full/Agda/TypeChecking/Rules/Term.hs
+++ b/src/full/Agda/TypeChecking/Rules/Term.hs
@@ -1,5 +1,6 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE NondecreasingIndentation #-}
{-# LANGUAGE MultiParamTypeClasses #-}
@@ -13,13 +14,15 @@
module Agda.TypeChecking.Rules.Term where
-import Control.Applicative
+import Prelude hiding (null)
+
+import Control.Applicative hiding (empty)
import Control.Monad.Trans
import Control.Monad.Reader
import Data.Maybe
import Data.Monoid (mappend)
-import Data.List hiding (sort)
+import Data.List hiding (sort, null)
import qualified Data.Map as Map
import Data.Traversable (sequenceA)
@@ -80,6 +83,7 @@ import Agda.Utils.Except
import Agda.Utils.Functor (($>))
import Agda.Utils.Maybe
import Agda.Utils.Monad
+import Agda.Utils.Null
import Agda.Utils.Permutation
import Agda.Utils.Size
import Agda.Utils.Tuple
@@ -480,17 +484,21 @@ checkExtendedLambda i di qname cs e t = do
addConstant qname =<< do
useTerPragma $
(defaultDefn info qname t emptyFunction) { defMutual = j }
- reportSDoc "tc.term.exlam" 50 $
+ reportSDoc "tc.term.exlam" 20 $
+ text (show $ A.defAbstract di) <+>
text "extended lambda's implementation \"" <> prettyTCM qname <>
text "\" has type: " $$ prettyTCM t -- <+> text " where clauses: " <+> text (show cs)
args <- getContextArgs
- top <- currentModule
- freevars <- getModuleFreeVars top
- -- freevars <- getSecFreeVars top --Andreas, 2013-02-26 this could be wrong in the presence of module parameters and a where block
+ freevars <- getCurrentModuleFreeVars
let argsNoParam = genericDrop freevars args -- don't count module parameters
let (hid, notHid) = partition isHidden argsNoParam
- abstract (A.defAbstract di) $ checkFunDef' t info NotDelayed
- (Just (length hid, length notHid)) Nothing di qname cs
+ reportSDoc "tc.term.exlam" 30 $ vcat $
+ [ text "dropped args: " <+> prettyTCM (take freevars args)
+ , text "hidden args: " <+> prettyTCM hid
+ , text "visible args: " <+> prettyTCM notHid
+ ]
+ abstract (A.defAbstract di) $
+ checkFunDef' t info NotDelayed (Just $ ExtLamInfo (length hid) (length notHid)) Nothing di qname cs
return $ Def qname $ map Apply args
where
-- Concrete definitions cannot use information about abstract things.
@@ -555,7 +563,9 @@ checkRecordExpression fs e t = do
-- Default value @Nothing@ will only be used for missing hidden fields.
-- These can be ignored as they will be inserted by @checkArguments_@.
orderFields r Nothing xs $ givenFields ++ missingExplicits
- args <- checkArguments_ ExpandLast re es $ recTel def `apply` vs
+ args <- checkArguments_ ExpandLast re es (recTel def `apply` vs) >>= \case
+ (args, remainingTel) | null remainingTel -> return args
+ _ -> __IMPOSSIBLE__
-- Don't need to block here!
reportSDoc "tc.term.rec" 20 $ text $ "finished record expression"
return $ Con con args
@@ -992,9 +1002,9 @@ checkOrInferMeta newMeta mt i = do
setValueMetaName v (A.metaNameSuggestion i)
return (v, t)
-- Rechecking an existing metavariable
- Just n -> do
- let v = MetaV (MetaId n) []
- t' <- jMetaType . mvJudgement <$> lookupMeta (MetaId n)
+ Just x -> do
+ let v = MetaV x []
+ t' <- jMetaType . mvJudgement <$> lookupMeta x
case mt of
Nothing -> return (v, t')
Just t -> (,t) <$> coerce v t' t
@@ -1432,12 +1442,23 @@ checkArguments exh expandIFS r args0@(arg@(Arg info e) : args) t0 t1 =
throwError (us ++ u : vs, es, t)
-- | Check that a list of arguments fits a telescope.
-checkArguments_ :: ExpandHidden -> Range -> [I.NamedArg A.Expr] -> Telescope -> TCM Args
+-- Inserts hidden arguments as necessary.
+-- Returns the type-checked arguments and the remaining telescope.
+checkArguments_
+ :: ExpandHidden -- ^ Eagerly insert trailing hidden arguments?
+ -> Range -- ^ Range of application.
+ -> [I.NamedArg A.Expr] -- ^ Arguments to check.
+ -> Telescope -- ^ Telescope to check arguments against.
+ -> TCM (Args, Telescope)
+ -- ^ Checked arguments and remaining telescope if successful.
checkArguments_ exh r args tel = do
- z <- runExceptT $ checkArguments exh ExpandInstanceArguments r args (telePi tel $ sort Prop) (sort Prop)
+ z <- runExceptT $
+ checkArguments exh ExpandInstanceArguments r args (telePi tel typeDontCare) typeDontCare
case z of
- Right (args, _) -> return args
- Left _ -> __IMPOSSIBLE__
+ Right (args, t) -> do
+ let TelV tel' _ = telView' t
+ return (args, tel')
+ Left _ -> __IMPOSSIBLE__ -- type cannot be blocked as it is generated by telePi
-- | Infer the type of an expression. Implemented by checking against a meta
@@ -1501,7 +1522,7 @@ inferOrCheck e mt = case e of
-- | Check whether a de Bruijn index is bound by a module telescope.
isModuleFreeVar :: Int -> TCM Bool
isModuleFreeVar i = do
- nfv <- getModuleFreeVars =<< currentModule
+ nfv <- getCurrentModuleFreeVars
n <- getContextSize
-- The first de Bruijn index that points to a module
-- free variable.
@@ -1614,7 +1635,7 @@ checkLetBinding b@(A.LetPatBind i p e) ret =
checkLetBinding (A.LetApply i x modapp rd rm) ret = do
-- Any variables in the context that doesn't belong to the current
-- module should go with the new module.
- fv <- getModuleFreeVars =<< currentModule
+ fv <- getCurrentModuleFreeVars
n <- getContextSize
let new = n - fv
reportSLn "tc.term.let.apply" 10 $ "Applying " ++ show modapp ++ " with " ++ show new ++ " free variables"
diff --git a/src/full/Agda/TypeChecking/Serialise.hs b/src/full/Agda/TypeChecking/Serialise.hs
index 0ed9052..efb49e5 100644
--- a/src/full/Agda/TypeChecking/Serialise.hs
+++ b/src/full/Agda/TypeChecking/Serialise.hs
@@ -1,16 +1,3 @@
-{-# LANGUAGE CPP #-}
-{-# LANGUAGE ExistentialQuantification #-}
-{-# LANGUAGE FlexibleInstances #-}
-{-# LANGUAGE ScopedTypeVariables #-}
-
-#if __GLASGOW_HASKELL__ >= 710
-{-# LANGUAGE FlexibleContexts #-}
-#endif
-
-#if __GLASGOW_HASKELL__ <= 708
-{-# LANGUAGE OverlappingInstances #-}
-#endif
-
-- Andreas, Makoto, Francesco 2014-10-15 AIM XX:
-- -O2 does not have any noticable effect on runtime
-- but sabotages cabal repl with -Werror
@@ -32,232 +19,45 @@ module Agda.TypeChecking.Serialise
where
import Control.Applicative
-import Control.Arrow (first, second)
+import Control.Arrow (second)
import Control.DeepSeq
import qualified Control.Exception as E
import Control.Monad
import Control.Monad.Reader
-import Control.Monad.State.Strict (StateT, runStateT, gets, modify)
+import Control.Monad.State.Strict
import Data.Array.IArray
import Data.Word
-import Data.ByteString.Lazy (ByteString)
import qualified Data.ByteString.Lazy as L
-import Data.Hashable
import qualified Data.HashTable.IO as H
-import Data.Int (Int32)
-import Data.Maybe
-import Data.Map (Map)
import qualified Data.Map as Map
-import Data.Set (Set)
-import qualified Data.Set as Set
import qualified Data.Binary as B
import qualified Data.Binary.Get as B
import qualified Data.Binary.Put as B
import qualified Data.List as List
import Data.Function
-import Data.Typeable ( cast, Typeable, typeOf, TypeRep )
import qualified Codec.Compression.GZip as G
-import qualified Agda.Compiler.Epic.Interface as Epic
-
-import Agda.Syntax.Common as Common
-import Agda.Syntax.Concrete.Name as C
-import qualified Agda.Syntax.Concrete as C
-import qualified Agda.Syntax.Abstract as A
-import Agda.Syntax.Info
-import Agda.Syntax.Internal as I
-import Agda.Syntax.Scope.Base
-import Agda.Syntax.Position as P
--- import Agda.Syntax.Position (Position, Range, noRange)
--- import qualified Agda.Syntax.Position as P
-import Agda.Syntax.Fixity
-import Agda.Syntax.Notation
-import Agda.Syntax.Literal
-import qualified Agda.Compiler.JS.Syntax as JS
-import qualified Agda.Interaction.Highlighting.Range as HR
-import qualified Agda.Interaction.Highlighting.Precise as HP
-import Agda.Interaction.FindFile
-
import qualified Agda.TypeChecking.Monad.Benchmark as Bench
+import Agda.TypeChecking.Serialise.Base
+import Agda.TypeChecking.Serialise.Instances ()
+
import Agda.TypeChecking.Monad
-import Agda.TypeChecking.CompiledClause
-import Agda.TypeChecking.Positivity.Occurrence
--- import Agda.TypeChecking.Pretty
-import Agda.Utils.BiMap (BiMap)
-import qualified Agda.Utils.BiMap as BiMap
-import Agda.Utils.HashMap (HashMap)
import Agda.Utils.Hash
-import qualified Agda.Utils.HashMap as HMap
-import Agda.Utils.FileName
import Agda.Utils.IORef
import Agda.Utils.Lens
-import Agda.Utils.Monad
-import Agda.Utils.Permutation
-import Agda.Utils.Except ( ExceptT, MonadError(throwError), runExceptT )
-
-#include "undefined.h"
-import Agda.Utils.Impossible
+import Agda.Utils.Except
-- Note that the Binary instance for Int writes 64 bits, but throws
-- away the 32 high bits when reading (at the time of writing, on
-- 32-bit machines). Word64 does not have these problems.
currentInterfaceVersion :: Word64
-currentInterfaceVersion = 20150829 * 10 + 0
-
--- | Constructor tag (maybe omitted) and argument indices.
-
-type Node = [Int32]
-
--- | The type of hashtables used in this module.
---
--- A very limited amount of testing indicates that 'H.CuckooHashTable'
--- is somewhat slower than 'H.BasicHashTable', and that
--- 'H.LinearHashTable' and the hashtables from "Data.Hashtable" are
--- much slower.
-
-#if defined(mingw32_HOST_OS) && defined(x86_64_HOST_ARCH)
-type HashTable k v = H.CuckooHashTable k v
-#else
-type HashTable k v = H.BasicHashTable k v
-#endif
-
--- | Structure providing fresh identifiers for hash map
--- and counting hash map hits (i.e. when no fresh identifier required).
-data FreshAndReuse = FreshAndReuse
- { farFresh :: !Int32 -- ^ Number of hash map misses.
- , farReuse :: !Int32 -- ^ Number of hash map hits.
- }
-
-farEmpty :: FreshAndReuse
-farEmpty = FreshAndReuse 0 0
-
-lensFresh :: Lens' Int32 FreshAndReuse
-lensFresh f r = f (farFresh r) <&> \ i -> r { farFresh = i }
-
-lensReuse :: Lens' Int32 FreshAndReuse
-lensReuse f r = f (farReuse r) <&> \ i -> r { farReuse = i }
-
--- | Two 'A.QName's are equal if their @QNameId@ is equal.
-type QNameId = [NameId]
-
--- | Computing a qualified names composed ID.
-qnameId :: A.QName -> QNameId
-qnameId (A.QName (A.MName ns) n) = map A.nameId $ n:ns
-
--- | State of the the encoder.
-data Dict = Dict
- -- Dictionaries which are serialized:
- { nodeD :: !(HashTable Node Int32) -- ^ Written to interface file.
- , stringD :: !(HashTable String Int32) -- ^ Written to interface file.
- , integerD :: !(HashTable Integer Int32) -- ^ Written to interface file.
- , doubleD :: !(HashTable Double Int32) -- ^ Written to interface file.
- -- Dicitionaries which are not serialized, but provide
- -- short cuts to speed up serialization:
- , termD :: !(HashTable (Ptr Term) Int32) -- ^ Not written to interface file.
- -- Andreas, Makoto, AIM XXI
- -- Memoizing A.Name does not buy us much if we already memoize A.QName.
- , nameD :: !(HashTable NameId Int32) -- ^ Not written to interface file.
- , qnameD :: !(HashTable QNameId Int32) -- ^ Not written to interface file.
- -- Fresh UIDs and reuse statistics:
- , nodeC :: !(IORef FreshAndReuse) -- counters for fresh indexes
- , stringC :: !(IORef FreshAndReuse)
- , integerC :: !(IORef FreshAndReuse)
- , doubleC :: !(IORef FreshAndReuse)
- , termC :: !(IORef FreshAndReuse)
- , nameC :: !(IORef FreshAndReuse)
- , qnameC :: !(IORef FreshAndReuse)
- , stats :: !(HashTable String Int)
- , collectStats :: Bool
- -- ^ If @True@ collect in @stats@ the quantities of
- -- calls to @icode@ for each @Typeable a@.
- , absPathD :: !(HashTable AbsolutePath Int32) -- ^ Not written to interface file.
- }
-
--- | Creates an empty dictionary.
-emptyDict
- :: Bool
- -- ^ Collect statistics for @icode@ calls?
- -> IO Dict
-emptyDict collectStats = Dict
- <$> H.new
- <*> H.new
- <*> H.new
- <*> H.new
- <*> H.new
- <*> H.new
- <*> H.new
- <*> newIORef farEmpty
- <*> newIORef farEmpty
- <*> newIORef farEmpty
- <*> newIORef farEmpty
- <*> newIORef farEmpty
- <*> newIORef farEmpty
- <*> newIORef farEmpty
- <*> H.new
- <*> pure collectStats
- <*> H.new
-
--- | Universal type, wraps everything.
-data U = forall a . Typeable a => U !a
-
--- | Univeral memo structure, to introduce sharing during decoding
-type Memo = HashTable (Int32, TypeRep) U -- (node index, type rep)
-
--- | State of the decoder.
-data St = St
- { nodeE :: !(Array Int32 Node) -- ^ Obtained from interface file.
- , stringE :: !(Array Int32 String) -- ^ Obtained from interface file.
- , integerE :: !(Array Int32 Integer) -- ^ Obtained from interface file.
- , doubleE :: !(Array Int32 Double) -- ^ Obtained from interface file.
- , nodeMemo :: !Memo
- -- ^ Created and modified by decoder.
- -- Used to introduce sharing while deserializing objects.
- , modFile :: !ModuleToSource
- -- ^ Maps module names to file names. Constructed by the decoder.
- , includes :: [AbsolutePath]
- -- ^ The include directories.
- }
-
--- | Monad used by the encoder.
-
-type S a = ReaderT Dict IO a
-
--- | Monad used by the decoder.
---
--- 'TCM' is not used because the associated overheads would make
--- decoding slower.
-
-type R a = ExceptT TypeError (StateT St IO) a
-
--- | Throws an error which is suitable when the data stream is
--- malformed.
-
-malformed :: R a
-malformed = throwError $ GenericError "Malformed input."
-
-class Typeable a => EmbPrj a where
- icode :: a -> S Int32 -- ^ Serialization (wrapper).
- icod_ :: a -> S Int32 -- ^ Serialization (worker).
- value :: Int32 -> R a -- ^ Deserialization.
-
- icode a = do
- tickICode a
- icod_ a
-
--- | Increase entry for @a@ in 'stats'.
-tickICode :: forall a. Typeable a => a -> S ()
-tickICode _ = whenM (asks collectStats) $ do
- let key = "icode " ++ show (typeOf (undefined :: a))
- hmap <- asks stats
- liftIO $ do
- n <- fromMaybe 0 <$> H.lookup hmap key
- H.insert hmap key $! n + 1
+currentInterfaceVersion = 20151209 * 10 + 0
-- | Encodes something. To ensure relocatability file paths in
-- positions are replaced with module names.
@@ -315,7 +115,6 @@ encode a = do
tickN (kind ++ " (fresh)") $ fromIntegral fresh
tickN (kind ++ " (reused)") $ fromIntegral reused
-
-- encode :: EmbPrj a => a -> TCM L.ByteString
-- encode a = do
-- fileMod <- sourceToModule
@@ -333,18 +132,6 @@ encode a = do
-- where
-- l h = List.map fst . List.sortBy (compare `on` snd) <$> H.toList h
--- | Data.Binary.runGetState is deprecated in favour of runGetIncremental.
--- Reimplementing it in terms of the new function. The new Decoder type contains
--- strict byte strings so we need to be careful not to feed the entire lazy byte
--- string to the decoder at once.
-runGetState :: B.Get a -> L.ByteString -> B.ByteOffset -> (a, L.ByteString, B.ByteOffset)
-runGetState g s n = feed (B.runGetIncremental g) (L.toChunks s)
- where
- feed (B.Done s n' x) ss = (x, L.fromChunks (s : ss), n + n')
- feed (B.Fail _ _ err) _ = error err
- feed (B.Partial f) (s : ss) = feed (f $ Just s) ss
- feed (B.Partial f) [] = feed (f Nothing) []
-
-- | Decodes something. The result depends on the include path.
--
-- Returns 'Nothing' if the input does not start with the right magic
@@ -442,1525 +229,3 @@ icodeFileMod fileMod = do
forM_ (Map.toList fileMod) $ \ (absolutePath, topLevelModuleName) -> do
i <- icod_ topLevelModuleName
liftIO $ H.insert hmap absolutePath i
-
-#if __GLASGOW_HASKELL__ >= 710
-instance {-# OVERLAPPING #-} EmbPrj String where
-#else
-instance EmbPrj String where
-#endif
- icod_ = icodeString
- value i = (! i) `fmap` gets stringE
-
-instance EmbPrj Integer where
- icod_ = icodeInteger
- value i = (! i) `fmap` gets integerE
-
-instance EmbPrj Word64 where
- icod_ i = icode2' (int32 q) (int32 r)
- where (q, r) = quotRem i (2^32)
- int32 :: Word64 -> Int32
- int32 = fromIntegral
- value = vcase valu where valu [a, b] = return $ n * mod (fromIntegral a) n + mod (fromIntegral b) n
- valu _ = malformed
- n = 2^32
-
-instance EmbPrj Int32 where
- icod_ i = return i
- value i = return i
-
-instance EmbPrj Int where
- icod_ i = return (fromIntegral i)
- value i = return (fromIntegral i)
-
-instance EmbPrj Char where
- icod_ c = return (fromIntegral $ fromEnum c)
- value i = return (toEnum $ fromInteger $ toInteger i)
-
-instance EmbPrj Double where
- icod_ = icodeDouble
- value i = (! i) `fmap` gets doubleE
-
-instance EmbPrj () where
- icod_ () = icode0'
- value = vcase valu where valu [] = valu0 ()
- valu _ = malformed
-
-instance (EmbPrj a, EmbPrj b) => EmbPrj (a, b) where
- icod_ (a, b) = icode2' a b
- value = vcase valu where valu [a, b] = valu2 (,) a b
- valu _ = malformed
-
-instance (EmbPrj a, EmbPrj b, EmbPrj c) => EmbPrj (a, b, c) where
- icod_ (a, b, c) = icode3' a b c
- value = vcase valu where valu [a, b, c] = valu3 (,,) a b c
- valu _ = malformed
-
-instance EmbPrj a => EmbPrj (Maybe a) where
- icod_ Nothing = icode0'
- icod_ (Just x) = icode1' x
- value = vcase valu where valu [] = valu0 Nothing
- valu [x] = valu1 Just x
- valu _ = malformed
-
-instance EmbPrj Bool where
- icod_ True = icode0'
- icod_ False = icode0 0
- value = vcase valu where valu [] = valu0 True
- valu [0] = valu0 False
- valu _ = malformed
-
-instance EmbPrj AbsolutePath where
- icod_ file = do
- d <- asks absPathD
- liftIO $ fromMaybe __IMPOSSIBLE__ <$> H.lookup d file
- value m = do
- m :: TopLevelModuleName
- <- value m
- mf <- gets modFile
- incs <- gets includes
- (r, mf) <- liftIO $ findFile'' incs m mf
- modify $ \s -> s { modFile = mf }
- case r of
- Left err -> throwError $ findErrorToTypeError m err
- Right f -> return f
-
-instance EmbPrj Position where
- icod_ (P.Pn file pos line col) = icode4' file pos line col
- value = vcase valu
- where
- valu [f, p, l, c] = valu4 P.Pn f p l c
- valu _ = malformed
-
-instance EmbPrj TopLevelModuleName where
- icod_ (TopLevelModuleName a) = icode1' a
- value = vcase valu where valu [a] = valu1 TopLevelModuleName a
- valu _ = malformed
-
-#if __GLASGOW_HASKELL__ >= 710
-instance {-# OVERLAPPABLE #-} EmbPrj a => EmbPrj [a] where
-#else
-instance EmbPrj a => EmbPrj [a] where
-#endif
- icod_ xs = icodeN =<< mapM icode xs
- value = vcase (mapM value)
--- icode [] = icode0'
--- icode (x : xs) = icode2' x xs
--- value = vcase valu where valu [] = valu0 []
--- valu [x, xs] = valu2 (:) x xs
--- valu _ = malformed
-
-instance (Ord a, Ord b, EmbPrj a, EmbPrj b) => EmbPrj (BiMap a b) where
- icod_ m = icode (BiMap.toList m)
- value m = BiMap.fromList <$> value m
-
-instance (Ord a, EmbPrj a, EmbPrj b) => EmbPrj (Map a b) where
- icod_ m = icode (Map.toList m)
- value m = Map.fromList `fmap` value m
-
-instance (Ord a, EmbPrj a) => EmbPrj (Set a) where
- icod_ s = icode (Set.toList s)
- value s = Set.fromList `fmap` value s
-
-instance EmbPrj P.Interval where
- icod_ (P.Interval p q) = icode2' p q
- value = vcase valu where valu [p, q] = valu2 P.Interval p q
- valu _ = malformed
-
-instance EmbPrj Range where
- icod_ (P.Range is) = icode1' is
- value = vcase valu where valu [is] = valu1 P.Range is
- valu _ = malformed
-
-instance EmbPrj HR.Range where
- icod_ (HR.Range a b) = icode2' a b
- value = vcase valu where valu [a, b] = valu2 HR.Range a b
- valu _ = malformed
-
-instance EmbPrj C.Name where
- icod_ (C.NoName a b) = icode2 0 a b
- icod_ (C.Name r xs) = icode2' r xs
- value = vcase valu where valu [0, a, b] = valu2 C.NoName a b
- valu [r, xs] = valu2 C.Name r xs
- valu _ = malformed
-
-instance EmbPrj NamePart where
- icod_ Hole = icode0'
- icod_ (Id a) = icode1' a
- value = vcase valu where valu [] = valu0 Hole
- valu [a] = valu1 Id a
- valu _ = malformed
-
-instance EmbPrj C.QName where
- icod_ (Qual a b) = icode2' a b
- icod_ (C.QName a ) = icode1' a
- value = vcase valu where valu [a, b] = valu2 Qual a b
- valu [a] = valu1 C.QName a
- valu _ = malformed
-
-instance EmbPrj Scope where
- icod_ (Scope a b c d e) = icode5' a b c d e
- value = vcase valu where valu [a, b, c, d, e] = valu5 Scope a b c d e
- valu _ = malformed
-
-instance EmbPrj NameSpaceId where
- icod_ PublicNS = icode0'
- icod_ PrivateNS = icode0 1
- icod_ ImportedNS = icode0 2
- icod_ OnlyQualifiedNS = icode0 3
- value = vcase valu where valu [] = valu0 PublicNS
- valu [1] = valu0 PrivateNS
- valu [2] = valu0 ImportedNS
- valu [3] = valu0 OnlyQualifiedNS
- valu _ = malformed
-
-instance EmbPrj Access where
- icod_ PrivateAccess = icode0 0
- icod_ PublicAccess = icode0'
- icod_ OnlyQualified = icode0 2
- value = vcase valu where valu [0] = valu0 PrivateAccess
- valu [] = valu0 PublicAccess
- valu [2] = valu0 OnlyQualified
- valu _ = malformed
-
-instance EmbPrj NameSpace where
- icod_ (NameSpace a b) = icode2' a b
- value = vcase valu where valu [a, b] = valu2 NameSpace a b
- valu _ = malformed
-
-instance EmbPrj WhyInScope where
- icod_ Defined = icode0'
- icod_ (Opened a b) = icode2 0 a b
- icod_ (Applied a b) = icode2 1 a b
- value = vcase valu where valu [] = valu0 Defined
- valu [0, a, b] = valu2 Opened a b
- valu [1, a, b] = valu2 Applied a b
- valu _ = malformed
-
-instance EmbPrj AbstractName where
- icod_ (AbsName a b c) = icode3' a b c
- value = vcase valu where valu [a, b, c] = valu3 AbsName a b c
- valu _ = malformed
-
-instance EmbPrj AbstractModule where
- icod_ (AbsModule a b) = icode2' a b
- value = vcase valu where valu [a, b] = valu2 AbsModule a b
- valu _ = malformed
-
-instance EmbPrj KindOfName where
- icod_ DefName = icode0'
- icod_ ConName = icode0 1
- icod_ FldName = icode0 2
- icod_ PatternSynName = icode0 3
- icod_ QuotableName = icode0 4
- value = vcase valu where valu [] = valu0 DefName
- valu [1] = valu0 ConName
- valu [2] = valu0 FldName
- valu [3] = valu0 PatternSynName
- valu [4] = valu0 QuotableName
- valu _ = malformed
-
-instance EmbPrj Agda.Syntax.Fixity.Associativity where
- icod_ LeftAssoc = icode0'
- icod_ RightAssoc = icode0 1
- icod_ NonAssoc = icode0 2
- value = vcase valu where valu [] = valu0 LeftAssoc
- valu [1] = valu0 RightAssoc
- valu [2] = valu0 NonAssoc
- valu _ = malformed
-
-instance EmbPrj Agda.Syntax.Fixity.Fixity where
- icod_ (Fixity a b c) = icode3' a b c
- value = vcase valu where valu [a, b, c] = valu3 Fixity a b c
- valu _ = malformed
-
-instance EmbPrj Agda.Syntax.Fixity.Fixity' where
- icod_ (Fixity' a b) = icode2' a b
- value = vcase valu where valu [a,b] = valu2 Fixity' a b
- valu _ = malformed
-
-instance EmbPrj GenPart where
- icod_ (BindHole a) = icode1 0 a
- icod_ (NormalHole a) = icode1 1 a
- icod_ (IdPart a) = icode1' a
- value = vcase valu where valu [0, a] = valu1 BindHole a
- valu [1, a] = valu1 NormalHole a
- valu [a] = valu1 IdPart a
- valu _ = malformed
-
-instance EmbPrj A.QName where
- icod_ n@(A.QName a b) = icodeMemo qnameD qnameC (qnameId n) $ icode2' a b
- value = vcase valu where valu [a, b] = valu2 A.QName a b
- valu _ = malformed
-
-instance EmbPrj A.AmbiguousQName where
- icod_ (A.AmbQ a) = icode a
- value n = A.AmbQ `fmap` value n
-
-instance EmbPrj A.ModuleName where
- icod_ (A.MName a) = icode a
- value n = A.MName `fmap` value n
-
-instance EmbPrj A.Name where
- icod_ (A.Name a b c d) = icodeMemo nameD nameC a $ icode4' a b c d
- value = vcase valu where valu [a, b, c, d] = valu4 A.Name a b c d
- valu _ = malformed
-
-instance (EmbPrj s, EmbPrj t) => EmbPrj (Named s t) where
- icod_ (Named a b) = icode2' a b
- value = vcase valu where valu [a, b] = valu2 Named a b
- valu _ = malformed
-
-instance EmbPrj a => EmbPrj (Ranged a) where
- icod_ (Ranged r x) = icode2' r x
- value = vcase valu where valu [r, x] = valu2 Ranged r x
- valu _ = malformed
-
-instance EmbPrj LocalVar where
- icod_ (LocalVar a) = icode1' a
- icod_ (ShadowedVar a b) = icode2' a b
- value = vcase valu where valu [a] = valu1 LocalVar a
- valu [a, b] = valu2 ShadowedVar a b
- valu _ = malformed
-
--- Only used for pattern synonyms
-instance EmbPrj A.Expr where
- icod_ (A.Var n) = icode1 0 n
- icod_ (A.Def n) = icode1 1 n
- icod_ (A.Con ns) = icode1 2 ns
- icod_ (A.Lit l) = icode1 3 l
- icod_ (A.QuestionMark{}) = icode0 4
- icod_ (A.Underscore _) = icode0 5
- icod_ (A.App _ a b) = icode2 6 a b
- icod_ (A.WithApp _ a b) = icode2 7 a b
- icod_ (A.Lam _ a b) = icode2 8 a b
- icod_ (A.AbsurdLam _ a) = icode1 9 a
- icod_ (A.ExtendedLam _ _ _ _) = __IMPOSSIBLE__
- icod_ (A.Pi _ a b) = icode2 11 a b
- icod_ (A.Fun _ a b) = icode2 12 a b
- icod_ (A.Set _ a) = icode1 13 a
- icod_ (A.Prop _) = icode0 14
- icod_ (A.Let _ _ _) = __IMPOSSIBLE__
- icod_ (A.ETel{}) = __IMPOSSIBLE__
- icod_ (A.Rec _ a) = icode1 17 a
- icod_ (A.RecUpdate _ a b) = icode2 18 a b
- -- Andreas, 2015-07-15, drop scopes embedded in expressions.
- -- As expressions are not @unScope@d before serialization,
- -- this case is not __IMPOSSIBLE__.
- icod_ (A.ScopedExpr a b) = icod_ b -- WAS: icode2 19 a b
- icod_ (A.QuoteGoal _ a b) = icode2 20 a b
- icod_ (A.QuoteContext _ a b) = icode2 21 a b
- icod_ (A.Quote _) = icode0 22
- icod_ (A.QuoteTerm _) = icode0 23
- icod_ (A.Unquote _) = icode0 24
- icod_ (A.DontCare a) = icode1 25 a
- icod_ (A.PatternSyn a) = icode1 26 a
- icod_ (A.Proj a) = icode1 27 a
-
- value = vcase valu
- where
- valu [0, a] = valu1 A.Var a
- valu [1, a] = valu1 A.Def a
- valu [2, a] = valu1 A.Con a
- valu [3, a] = valu1 A.Lit a
- valu [4] = valu0 (A.QuestionMark emptyMetaInfo 0)
- valu [5] = valu0 (A.Underscore emptyMetaInfo)
- valu [6, a, b] = valu2 (A.App i) a b
- valu [7, a, b] = valu2 (A.WithApp i) a b
- valu [8, a, b] = valu2 (A.Lam i) a b
- valu [9, a] = valu1 (A.AbsurdLam i) a
- valu [11, a, b] = valu2 (A.Pi i) a b
- valu [12, a, b] = valu2 (A.Fun i) a b
- valu [13, a] = valu1 (A.Set i) a
- valu [14] = valu0 (A.Prop i)
- valu [17, a] = valu1 (A.Rec i) a
- valu [18, a, b] = valu2 (A.RecUpdate i) a b
- -- valu [19, a, b] = valu2 A.ScopedExpr a b
- valu [20, a, b] = valu2 (A.QuoteGoal i) a b
- valu [21, a, b] = valu2 (A.QuoteContext i) a b
- valu [22] = valu0 (A.Quote i)
- valu [23] = valu0 (A.QuoteTerm i)
- valu [24] = valu0 (A.Unquote i)
- valu [25, a] = valu1 A.DontCare a
- valu [26, a] = valu1 A.PatternSyn a
- valu [27, a] = valu1 A.Proj a
- valu _ = malformed
-
- i = ExprRange noRange
-
-instance EmbPrj ConPatInfo where
- icod_ (ConPatInfo a _) = icod_ a
- value a = flip ConPatInfo patNoRange <$> value a
-
-instance EmbPrj A.Pattern where
- icod_ (A.VarP a) = icode1 0 a
- icod_ (A.ConP a b c) = icode3 1 a b c
- icod_ (A.DefP _ a b) = icode2 2 a b
- icod_ (A.WildP _) = icode0 3
- icod_ (A.AsP _ a b) = icode2 4 a b
- icod_ (A.DotP _ a) = icode1 5 a
- icod_ (A.AbsurdP _) = icode0 6
- icod_ (A.LitP a) = icode1 7 a
- icod_ (A.PatternSynP _ a b) = icode2 9 a b
-
- value = vcase valu
- where
- valu [0, a] = valu1 A.VarP a
- valu [1, a, b, c] = valu3 A.ConP a b c
- valu [2, a, b] = valu2 (A.DefP i) a b
- valu [3] = valu0 (A.WildP i)
- valu [4, a, b] = valu2 (A.AsP i) a b
- valu [5, a] = valu1 (A.DotP i) a
- valu [6] = valu0 (A.AbsurdP i)
- valu [7, a] = valu1 (A.LitP) a
- valu [9, a, b] = valu2 (A.PatternSynP i) a b
- valu _ = malformed
-
- i = patNoRange
-
-instance EmbPrj A.LamBinding where
- icod_ (A.DomainFree i e) = icode2 0 i e
- icod_ (A.DomainFull a) = icode1 1 a
-
- value = vcase valu where valu [0, i, e] = valu2 A.DomainFree i e
- valu [1, a] = valu1 A.DomainFull a
- valu _ = malformed
-
-instance EmbPrj A.LetBinding where
- icod_ (A.LetBind _ a b c d) = icode4 0 a b c d
- icod_ (A.LetPatBind _ a b ) = icode2 1 a b
- icod_ (A.LetApply _ _ _ _ _) = icode0 2
- icod_ (A.LetOpen _ _) = icode0 2
-
- value = vcase valu
- where
- valu [0, a, b, c, d] = valu4 (A.LetBind (LetRange noRange)) a b c d
- valu [1, a, b] = valu2 (A.LetPatBind (LetRange noRange)) a b
- valu [2] = throwError $ NotSupported
- "importing pattern synonym containing let module"
- valu _ = malformed
-
-instance EmbPrj A.TypedBindings where
- icod_ (A.TypedBindings a b) = icode2' a b
-
- value = vcase valu where valu [a, b] = valu2 A.TypedBindings a b
- valu _ = malformed
-
-instance EmbPrj A.TypedBinding where
- icod_ (A.TBind a b c) = icode3 0 a b c
- icod_ (A.TLet a b) = icode2 1 a b
-
- value = vcase valu where valu [0, a, b, c] = valu3 A.TBind a b c
- valu [1, a, b] = valu2 A.TLet a b
- valu _ = malformed
-
-instance EmbPrj c => EmbPrj (Common.ArgInfo c) where
- icod_ (ArgInfo h r cs) = icode3' h r cs
-
- value = vcase valu where valu [h, r, cs] = valu3 ArgInfo h r cs
- valu _ = malformed
-
-instance EmbPrj NameId where
- icod_ (NameId a b) = icode2' a b
- value = vcase valu where valu [a, b] = valu2 NameId a b
- valu _ = malformed
-
-instance EmbPrj Signature where
- icod_ (Sig a b c) = icode3' a b c
- value = vcase valu where valu [a, b, c] = valu3 Sig a b c
- valu _ = malformed
-
-instance (Eq k, Hashable k, EmbPrj k, EmbPrj v) => EmbPrj (HashMap k v) where
- icod_ m = icode (HMap.toList m)
- value m = HMap.fromList `fmap` value m
-
-instance EmbPrj Section where
- icod_ (Section a b) = icode2' a b
- value = vcase valu where valu [a, b] = valu2 Section a b
- valu _ = malformed
-
-instance EmbPrj Telescope where
- icod_ EmptyTel = icode0'
- icod_ (ExtendTel a b) = icode2' a b
- value = vcase valu where valu [] = valu0 EmptyTel
- valu [a, b] = valu2 ExtendTel a b
- valu _ = malformed
-
-instance EmbPrj Permutation where
- icod_ (Perm a b) = icode2' a b
- value = vcase valu where valu [a, b] = valu2 Perm a b
- valu _ = malformed
-
-instance EmbPrj a => EmbPrj (Drop a) where
- icod_ (Drop a b) = icode2' a b
- value = vcase valu where valu [a, b] = valu2 Drop a b
- valu _ = malformed
-
-instance EmbPrj a => EmbPrj (Elim' a) where
- icod_ (Apply a) = icode1' a
- icod_ (Proj a) = icode1 0 a
- value = vcase valu where valu [a] = valu1 Apply a
- valu [0, a] = valu1 Proj a
- valu _ = malformed
-
-instance EmbPrj a => EmbPrj (WithHiding a) where
- icod_ (WithHiding a b) = icode2' a b
- value = vcase valu where valu [a, b] = valu2 WithHiding a b
- valu _ = malformed
-
-instance (EmbPrj a, EmbPrj c) => EmbPrj (Common.Arg c a) where
- icod_ (Arg i e) = icode2' i e
- value = vcase valu where valu [i, e] = valu2 Arg i e
- valu _ = malformed
-
-instance (EmbPrj a, EmbPrj c) => EmbPrj (Common.Dom c a) where
- icod_ (Dom i e) = icode2' i e
- value = vcase valu where valu [i, e] = valu2 Dom i e
- valu _ = malformed
-
-instance EmbPrj Common.Induction where
- icod_ Inductive = icode0'
- icod_ CoInductive = icode0 1
- value = vcase valu where valu [] = valu0 Inductive
- valu [1] = valu0 CoInductive
- valu _ = malformed
-
-instance EmbPrj Common.Hiding where
- icod_ Hidden = return 0
- icod_ NotHidden = return 1
- icod_ Instance = return 2
- value 0 = return Hidden
- value 1 = return NotHidden
- value 2 = return Instance
- value _ = malformed
-
-instance EmbPrj Common.Relevance where
- icod_ Relevant = return 0
- icod_ Irrelevant = return 1
- icod_ (Forced Small) = return 2
- icod_ (Forced Big) = return 3
- icod_ NonStrict = return 4
- icod_ UnusedArg = return 5
- value 0 = return Relevant
- value 1 = return Irrelevant
- value 2 = return (Forced Small)
- value 3 = return (Forced Big)
- value 4 = return NonStrict
- value 5 = return UnusedArg
- value _ = malformed
-
--- instance EmbPrj Common.Relevance where
--- icod_ Relevant = icode0'
--- icod_ Irrelevant = icode0 1
--- icod_ (Forced Small) = icode0 2
--- icod_ (Forced Big) = icode0 5
--- icod_ NonStrict = icode0 3
--- icod_ UnusedArg = icode0 4
--- value = vcase valu where valu [] = valu0 Relevant
--- valu [1] = valu0 Irrelevant
--- valu [2] = valu0 (Forced Small)
--- valu [5] = valu0 (Forced Big)
--- valu [3] = valu0 NonStrict
--- valu [4] = valu0 UnusedArg
--- valu _ = malformed
-
-instance EmbPrj I.ConHead where
- icod_ (ConHead a b c) = icode3' a b c
- value = vcase valu where valu [a, b, c] = valu3 ConHead a b c
- valu _ = malformed
-
-instance (EmbPrj a) => EmbPrj (I.Type' a) where
- icod_ (El a b) = icode2' a b
- value = vcase valu where valu [a, b] = valu2 El a b
- valu _ = malformed
-
-instance (EmbPrj a) => EmbPrj (I.Abs a) where
- icod_ (NoAbs a b) = icode2 0 a b
- icod_ (Abs a b) = icode2' a b
- value = vcase valu where valu [a, b] = valu2 Abs a b
- valu [0, a, b] = valu2 NoAbs a b
- valu _ = malformed
-
-instance EmbPrj I.Term where
- icod_ (Var a []) = icode1' a
- icod_ (Var a b) = icode2 0 a b
- icod_ (Lam a b) = icode2 1 a b
- icod_ (Lit a ) = icode1 2 a
- icod_ (Def a b) = icode2 3 a b
- icod_ (Con a b) = icode2 4 a b
- icod_ (Pi a b) = icode2 5 a b
- icod_ (Sort a ) = icode1 7 a
- icod_ (MetaV a b) = __IMPOSSIBLE__
- icod_ ExtLam{} = __IMPOSSIBLE__
- icod_ (DontCare a ) = icode1 8 a
- icod_ (Level a ) = icode1 9 a
- icod_ (Shared p) = icodeMemo termD termC p $ icode (derefPtr p)
-
- value r = vcase valu' r
- where
- valu' xs = shared <$> valu xs
- valu [a] = valu1 var a
- valu [0, a, b] = valu2 Var a b
- valu [1, a, b] = valu2 Lam a b
- valu [2, a] = valu1 Lit a
- valu [3, a, b] = valu2 Def a b
- valu [4, a, b] = valu2 Con a b
- valu [5, a, b] = valu2 Pi a b
- valu [7, a] = valu1 Sort a
- valu [8, a] = valu1 DontCare a
- valu [9, a] = valu1 Level a
- valu _ = malformed
-
-instance EmbPrj Level where
- icod_ (Max a) = icode1' a
- value = vcase valu where valu [a] = valu1 Max a
- valu _ = malformed
-
-instance EmbPrj PlusLevel where
- icod_ (ClosedLevel a) = icode1' a
- icod_ (Plus a b) = icode2' a b
- value = vcase valu where valu [a] = valu1 ClosedLevel a
- valu [a, b] = valu2 Plus a b
- valu _ = malformed
-
-instance EmbPrj LevelAtom where
- icod_ (NeutralLevel _ a) = icode1' a
- icod_ (UnreducedLevel a) = icode1 1 a
- icod_ MetaLevel{} = __IMPOSSIBLE__
- icod_ BlockedLevel{} = __IMPOSSIBLE__
- value = vcase valu where
- valu [a] = valu1 UnreducedLevel a -- we forget that we are a NeutralLevel,
- -- since we do not want do (de)serialize
- -- the reason for neutrality
- valu [1, a] = valu1 UnreducedLevel a
- valu _ = malformed
-
-instance EmbPrj I.Sort where
- icod_ (Type a ) = icode1' a
- icod_ Prop = icode1 1 ()
- icod_ SizeUniv = icode1 3 ()
- icod_ Inf = icode1 4 ()
- icod_ (DLub a b) = __IMPOSSIBLE__
- value = vcase valu where valu [a] = valu1 Type a
- valu [1, _] = valu0 Prop
- valu [3, _] = valu0 SizeUniv
- valu [4, _] = valu0 Inf
- valu _ = malformed
-
-instance EmbPrj Agda.Syntax.Literal.Literal where
- icod_ (LitInt a b) = icode2' a b
- icod_ (LitFloat a b) = icode2 1 a b
- icod_ (LitString a b) = icode2 2 a b
- icod_ (LitChar a b) = icode2 3 a b
- icod_ (LitQName a b) = icode2 5 a b
- value = vcase valu where valu [a, b] = valu2 LitInt a b
- valu [1, a, b] = valu2 LitFloat a b
- valu [2, a, b] = valu2 LitString a b
- valu [3, a, b] = valu2 LitChar a b
- valu [5, a, b] = valu2 LitQName a b
- valu _ = malformed
-
-instance EmbPrj DisplayForm where
- icod_ (Display a b c) = icode3' a b c
- value = vcase valu where valu [a, b, c] = valu3 Display a b c
- valu _ = malformed
-
-instance EmbPrj a => EmbPrj (Open a) where
- icod_ (OpenThing a b) = icode2' a b
- value = vcase valu where valu [a, b] = valu2 OpenThing a b
- valu _ = malformed
-
-instance EmbPrj CtxId where
- icod_ (CtxId a) = icode a
- value n = CtxId `fmap` value n
-
-instance EmbPrj DisplayTerm where
- icod_ (DTerm a ) = icode1' a
- icod_ (DDot a ) = icode1 1 a
- icod_ (DCon a b) = icode2 2 a b
- icod_ (DDef a b) = icode2 3 a b
- icod_ (DWithApp a b c) = icode3 4 a b c
- value = vcase valu where valu [a] = valu1 DTerm a
- valu [1, a] = valu1 DDot a
- valu [2, a, b] = valu2 DCon a b
- valu [3, a, b] = valu2 DDef a b
- valu [4, a, b, c] = valu3 DWithApp a b c
- valu _ = malformed
-
-instance EmbPrj MutualId where
- icod_ (MutId a) = icode a
- value n = MutId `fmap` value n
-
-instance EmbPrj Definition where
- icod_ (Defn rel a b c d e f g h i) = icode10' rel a (P.killRange b) c d e f g h i
- value = vcase valu where valu [rel, a, b, c, d, e, f, g, h, i] = valu10 Defn rel a b c d e f g h i
- valu _ = malformed
-
-instance EmbPrj NLPat where
- icod_ (PVar a) = icode1 0 a
- icod_ (PWild) = icode0 1
- icod_ (PDef a b) = icode2 2 a b
- icod_ (PLam a b) = icode2 3 a b
- icod_ (PPi a b) = icode2 4 a b
- icod_ (PBoundVar a b) = icode2 5 a b
- icod_ (PTerm a) = icode1 6 a
- value = vcase valu where valu [0, a] = valu1 PVar a
- valu [1] = valu0 PWild
- valu [2, a, b] = valu2 PDef a b
- valu [3, a, b] = valu2 PLam a b
- valu [4, a, b] = valu2 PPi a b
- valu [5, a, b] = valu2 PBoundVar a b
- valu [6, a] = valu1 PTerm a
- valu _ = malformed
-
-instance EmbPrj RewriteRule where
- icod_ (RewriteRule a b c d e) = icode5' a b c d e
- value = vcase valu where valu [a, b, c, d, e] = valu5 RewriteRule a b c d e
- valu _ = malformed
-
-
-instance EmbPrj Projection where
- icod_ (Projection a b c d e) = icode5' a b c d e
- value = vcase valu where valu [a, b, c, d, e] = valu5 Projection a b c d e
- valu _ = malformed
-
-instance EmbPrj HaskellExport where
- icod_ (HsExport a b) = icode2' a b
- value = vcase valu where
- valu [a,b] = valu2 HsExport a b
- valu _ = malformed
-
-instance EmbPrj HaskellRepresentation where
- icod_ (HsType a) = icode1' a
- icod_ (HsDefn a b) = icode2' a b
-
- value = vcase valu where
- valu [a] = valu1 HsType a
- valu [a, b] = valu2 HsDefn a b
- valu _ = malformed
-
-instance EmbPrj JS.Exp where
- icod_ (JS.Self) = icode0 0
- icod_ (JS.Local i) = icode1 1 i
- icod_ (JS.Global i) = icode1 2 i
- icod_ (JS.Undefined) = icode0 3
- icod_ (JS.String s) = icode1 4 s
- icod_ (JS.Char c) = icode1 5 c
- icod_ (JS.Integer n) = icode1 6 n
- icod_ (JS.Double d) = icode1 7 d
- icod_ (JS.Lambda n e) = icode2 8 n e
- icod_ (JS.Object o) = icode1 9 o
- icod_ (JS.Apply e es) = icode2 10 e es
- icod_ (JS.Lookup e l) = icode2 11 e l
- icod_ (JS.If e f g) = icode3 12 e f g
- icod_ (JS.BinOp e op f) = icode3 13 e op f
- icod_ (JS.PreOp op e) = icode2 14 op e
- icod_ (JS.Const i) = icode1 15 i
- value = vcase valu where valu [0] = valu0 JS.Self
- valu [1, a] = valu1 JS.Local a
- valu [2, a] = valu1 JS.Global a
- valu [3] = valu0 JS.Undefined
- valu [4, a] = valu1 JS.String a
- valu [5, a] = valu1 JS.Char a
- valu [6, a] = valu1 JS.Integer a
- valu [7, a] = valu1 JS.Double a
- valu [8, a, b] = valu2 JS.Lambda a b
- valu [9, a] = valu1 JS.Object a
- valu [10, a, b] = valu2 JS.Apply a b
- valu [11, a, b] = valu2 JS.Lookup a b
- valu [12, a, b, c] = valu3 JS.If a b c
- valu [13, a, b, c] = valu3 JS.BinOp a b c
- valu [14, a, b] = valu2 JS.PreOp a b
- valu [15, a] = valu1 JS.Const a
- valu _ = malformed
-
-instance EmbPrj JS.LocalId where
- icod_ (JS.LocalId l) = icode l
- value n = JS.LocalId `fmap` value n
-
-instance EmbPrj JS.GlobalId where
- icod_ (JS.GlobalId l) = icode l
- value n = JS.GlobalId `fmap` value n
-
-instance EmbPrj JS.MemberId where
- icod_ (JS.MemberId l) = icode l
- value n = JS.MemberId `fmap` value n
-
-instance EmbPrj Polarity where
- icod_ Covariant = return 0
- icod_ Contravariant = return 1
- icod_ Invariant = return 2
- icod_ Nonvariant = return 3
-
- value 0 = return Covariant
- value 1 = return Contravariant
- value 2 = return Invariant
- value 3 = return Nonvariant
- value _ = malformed
-
--- instance EmbPrj Polarity where
--- icod_ Covariant = icode0'
--- icod_ Contravariant = icode0 1
--- icod_ Invariant = icode0 2
--- icod_ Nonvariant = icode0 3
-
--- value = vcase valu where
--- valu [] = valu0 Covariant
--- valu [1] = valu0 Contravariant
--- valu [2] = valu0 Invariant
--- valu [3] = valu0 Nonvariant
--- valu _ = malformed
-
-instance EmbPrj Occurrence where
- icod_ StrictPos = return 0
- icod_ Mixed = return 1
- icod_ Unused = return 2
- icod_ GuardPos = return 3
- icod_ JustPos = return 4
- icod_ JustNeg = return 5
-
- value 0 = return StrictPos
- value 1 = return Mixed
- value 2 = return Unused
- value 3 = return GuardPos
- value 4 = return JustPos
- value 5 = return JustNeg
- value _ = malformed
-
--- instance EmbPrj Occurrence where
--- icod_ StrictPos = icode0'
--- icod_ Mixed = icode0 1
--- icod_ Unused = icode0 2
--- icod_ GuardPos = icode0 3
--- icod_ JustPos = icode0 4
--- icod_ JustNeg = icode0 5
-
--- value = vcase valu where
--- valu [] = valu0 StrictPos
--- valu [1] = valu0 Mixed
--- valu [2] = valu0 Unused
--- valu [3] = valu0 GuardPos
--- valu [4] = valu0 JustPos
--- valu [5] = valu0 JustNeg
--- valu _ = malformed
-
-instance EmbPrj CompiledRepresentation where
- icod_ (CompiledRep a b c d) = icode4' a b c d
- value = vcase valu where valu [a, b, c, d] = valu4 CompiledRep a b c d
- valu _ = malformed
-
-instance EmbPrj Defn where
- icod_ Axiom = icode0 0
- icod_ (Function a b c d e f g h i j k l m) = icode13 1 a b c d e f g h i j k l m
- icod_ (Datatype a b c d e f g h i j) = icode10 2 a b c d e f g h i j
- icod_ (Record a b c d e f g h i j k l) = icode12 3 a b c d e f g h i j k l
- icod_ (Constructor a b c d e) = icode5 4 a b c d e
- icod_ (Primitive a b c d) = icode4 5 a b c d
- value = vcase valu where
- valu [0] = valu0 Axiom
- valu [1, a, b, c, d, e, f, g, h, i, j, k, l, m] = valu13 Function a b c d e f g h i j k l m
- valu [2, a, b, c, d, e, f, g, h, i, j] = valu10 Datatype a b c d e f g h i j
- valu [3, a, b, c, d, e, f, g, h, i, j, k, l] = valu12 Record a b c d e f g h i j k l
- valu [4, a, b, c, d, e] = valu5 Constructor a b c d e
- valu [5, a, b, c, d] = valu4 Primitive a b c d
- valu _ = malformed
-
-instance EmbPrj a => EmbPrj (WithArity a) where
- icod_ (WithArity a b) = icode2' a b
-
- value = vcase valu where
- valu [a, b] = valu2 WithArity a b
- valu _ = malformed
-
-instance EmbPrj a => EmbPrj (Case a) where
- icod_ (Branches a b c d) = icode4' a b c d
-
- value = vcase valu where
- valu [a, b, c, d] = valu4 Branches a b c d
- valu _ = malformed
-
-instance EmbPrj CompiledClauses where
- icod_ Fail = icode0'
- icod_ (Done a b) = icode2' a (P.killRange b)
- icod_ (Case a b) = icode2 2 a b
-
- value = vcase valu where
- valu [] = valu0 Fail
- valu [a, b] = valu2 Done a b
- valu [2, a, b] = valu2 Case a b
- valu _ = malformed
-
-instance EmbPrj FunctionInverse where
- icod_ NotInjective = icode0'
- icod_ (Inverse a) = icode1' a
- value = vcase valu where valu [] = valu0 NotInjective
- valu [a] = valu1 Inverse a
- valu _ = malformed
-
-instance EmbPrj TermHead where
- icod_ SortHead = icode0'
- icod_ PiHead = icode0 1
- icod_ (ConsHead a) = icode1 2 a
- value = vcase valu where valu [] = valu0 SortHead
- valu [1] = valu0 PiHead
- valu [2, a] = valu1 ConsHead a
- valu _ = malformed
-
-instance EmbPrj Common.IsAbstract where
- icod_ AbstractDef = icode0 0
- icod_ ConcreteDef = icode0'
- value = vcase valu where valu [0] = valu0 AbstractDef
- valu [] = valu0 ConcreteDef
- valu _ = malformed
-
-instance EmbPrj I.Clause where
- icod_ (Clause a b c d e f) = icode6' a b c d e f
- value = vcase valu where valu [a, b, c, d, e, f] = valu6 Clause a b c d e f
- valu _ = malformed
-
-instance EmbPrj I.ClauseBody where
- icod_ (Body a) = icode1 0 a
- icod_ (Bind a) = icode1' a
- icod_ NoBody = icode0'
- value = vcase valu where valu [0, a] = valu1 Body a
- valu [a] = valu1 Bind a
- valu [] = valu0 NoBody
- valu _ = malformed
-
-instance EmbPrj Delayed where
- icod_ Delayed = icode0 0
- icod_ NotDelayed = icode0'
- value = vcase valu where valu [0] = valu0 Delayed
- valu [] = valu0 NotDelayed
- valu _ = malformed
-
-instance EmbPrj I.ConPatternInfo where
- icod_ (ConPatternInfo a b) = icode2' a b
- value = vcase valu where valu [a, b] = valu2 ConPatternInfo a b
- valu _ = malformed
-
-instance EmbPrj ConPOrigin where
- icod_ ConPImplicit = return 0
- icod_ ConPCon = return 1
- icod_ ConPRec = return 2
- value 0 = return ConPImplicit
- value 1 = return ConPCon
- value 2 = return ConPRec
- value _ = malformed
-
-instance EmbPrj I.Pattern where
- icod_ (VarP a ) = icode1' a
- icod_ (ConP a b c) = icode3' a b c
- icod_ (LitP a ) = icode1 2 a
- icod_ (DotP a ) = icode1 3 a
- icod_ (ProjP a ) = icode1 4 a
- value = vcase valu where valu [a] = valu1 VarP a
- valu [a, b, c] = valu3 ConP a b c
- valu [2, a] = valu1 LitP a
- valu [3, a] = valu1 DotP a
- valu [4, a] = valu1 ProjP a
- valu _ = malformed
-
-instance EmbPrj a => EmbPrj (Builtin a) where
- icod_ (Prim a) = icode1' a
- icod_ (Builtin a) = icode1 1 a
- value = vcase valu where valu [a] = valu1 Prim a
- valu [1, a] = valu1 Builtin a
- valu _ = malformed
-
-instance EmbPrj HP.NameKind where
- icod_ HP.Bound = icode0'
- icod_ (HP.Constructor a) = icode1 1 a
- icod_ HP.Datatype = icode0 2
- icod_ HP.Field = icode0 3
- icod_ HP.Function = icode0 4
- icod_ HP.Module = icode0 5
- icod_ HP.Postulate = icode0 6
- icod_ HP.Primitive = icode0 7
- icod_ HP.Record = icode0 8
- icod_ HP.Argument = icode0 9
-
- value = vcase valu where
- valu [] = valu0 HP.Bound
- valu [1 , a] = valu1 HP.Constructor a
- valu [2] = valu0 HP.Datatype
- valu [3] = valu0 HP.Field
- valu [4] = valu0 HP.Function
- valu [5] = valu0 HP.Module
- valu [6] = valu0 HP.Postulate
- valu [7] = valu0 HP.Primitive
- valu [8] = valu0 HP.Record
- valu [9] = valu0 HP.Argument
- valu _ = malformed
-
-instance EmbPrj HP.Aspect where
- icod_ HP.Comment = icode0 0
- icod_ HP.Keyword = icode0 1
- icod_ HP.String = icode0 2
- icod_ HP.Number = icode0 3
- icod_ HP.Symbol = icode0'
- icod_ HP.PrimitiveType = icode0 5
- icod_ (HP.Name mk b) = icode2 6 mk b
-
- value = vcase valu where
- valu [0] = valu0 HP.Comment
- valu [1] = valu0 HP.Keyword
- valu [2] = valu0 HP.String
- valu [3] = valu0 HP.Number
- valu [] = valu0 HP.Symbol
- valu [5] = valu0 HP.PrimitiveType
- valu [6, mk, b] = valu2 HP.Name mk b
- valu _ = malformed
-
-instance EmbPrj HP.OtherAspect where
- icod_ HP.Error = icode0 0
- icod_ HP.DottedPattern = icode0'
- icod_ HP.UnsolvedMeta = icode0 2
- icod_ HP.TerminationProblem = icode0 3
- icod_ HP.IncompletePattern = icode0 4
- icod_ HP.TypeChecks = icode0 5
- icod_ HP.UnsolvedConstraint = icode0 6
-
- value = vcase valu where
- valu [0] = valu0 HP.Error
- valu [] = valu0 HP.DottedPattern
- valu [2] = valu0 HP.UnsolvedMeta
- valu [3] = valu0 HP.TerminationProblem
- valu [4] = valu0 HP.IncompletePattern
- valu [5] = valu0 HP.TypeChecks
- valu [6] = valu0 HP.UnsolvedConstraint
- valu _ = malformed
-
-instance EmbPrj HP.Aspects where
- icod_ (HP.Aspects a b c d) = icode4' a b c d
-
- value = vcase valu where
- valu [a, b, c, d] = valu4 HP.Aspects a b c d
- valu _ = malformed
-
-instance EmbPrj Precedence where
- icod_ TopCtx = icode0'
- icod_ FunctionSpaceDomainCtx = icode0 1
- icod_ (LeftOperandCtx a) = icode1 2 a
- icod_ (RightOperandCtx a) = icode1 3 a
- icod_ FunctionCtx = icode0 4
- icod_ ArgumentCtx = icode0 5
- icod_ InsideOperandCtx = icode0 6
- icod_ WithFunCtx = icode0 7
- icod_ WithArgCtx = icode0 8
- icod_ DotPatternCtx = icode0 9
- value = vcase valu
- where
- valu [] = valu0 TopCtx
- valu [1] = valu0 FunctionSpaceDomainCtx
- valu [2, a] = valu1 LeftOperandCtx a
- valu [3, a] = valu1 RightOperandCtx a
- valu [4] = valu0 FunctionCtx
- valu [5] = valu0 ArgumentCtx
- valu [6] = valu0 InsideOperandCtx
- valu [7] = valu0 WithFunCtx
- valu [8] = valu0 WithArgCtx
- valu [9] = valu0 DotPatternCtx
- valu _ = malformed
-
-instance EmbPrj ScopeInfo where
- icod_ (ScopeInfo a b c d) = icode4' a b c d
- value = vcase valu where valu [a, b, c, d] = valu4 ScopeInfo a b c d
- valu _ = malformed
-
-instance EmbPrj HP.CompressedFile where
- icod_ (HP.CompressedFile f) = icode1' f
- value = vcase valu
- where
- valu [f] = valu1 HP.CompressedFile f
- valu _ = malformed
-
-instance EmbPrj Interface where
- icod_ (Interface a b c d e f g h i j k) = icode11' a b c d e f g h i j k
- value = vcase valu
- where
- valu [a, b, c, d, e, f, g, h, i, j, k] = valu11 Interface a b c d e f g h i j k
- valu _ = malformed
-
--- This is used for the Epic compiler backend
-instance EmbPrj Epic.EInterface where
- icod_ (Epic.EInterface a b c d e f g h) = icode8' a b c d e f g h
- value = vcase valu where
- valu [a, b, c, d, e, f, g, h] = valu8 Epic.EInterface a b c d e f g h
- valu _ = malformed
-
-instance EmbPrj Epic.InjectiveFun where
- icod_ (Epic.InjectiveFun a b) = icode2' a b
- value = vcase valu where
- valu [a,b] = valu2 Epic.InjectiveFun a b
- valu _ = malformed
-
-instance EmbPrj Epic.Relevance where
- icod_ Epic.Irr = icode0 0
- icod_ Epic.Rel = icode0 1
- value = vcase valu where valu [0] = valu0 Epic.Irr
- valu [1] = valu0 Epic.Rel
- valu _ = malformed
-
-instance EmbPrj Epic.Forced where
- icod_ Epic.Forced = icode0 0
- icod_ Epic.NotForced = icode0 1
- value = vcase valu where valu [0] = valu0 Epic.Forced
- valu [1] = valu0 Epic.NotForced
- valu _ = malformed
-
-instance EmbPrj Epic.Tag where
- icod_ (Epic.Tag a) = icode1 0 a
- icod_ (Epic.PrimTag a) = icode1 1 a
- value = vcase valu
- where
- valu [0, a] = valu1 Epic.Tag a
- valu [1, a] = valu1 Epic.PrimTag a
- valu _ = malformed
-
--- Specializing icodeX leads to Warning like
--- src/full/Agda/TypeChecking/Serialise.hs:1297:1: Warning:
--- RULE left-hand side too complicated to desugar
--- case cobox_aQY5 of _ [Occ=Dead] { ghc-prim:GHC.Types.Eq# cobox ->
--- icodeX @ String $dEq_aQY3 $dHashable_aQY4
--- }
---
--- type ICodeX k
--- = (Dict -> HashTable k Int32)
--- -> (Dict -> IORef Int32)
--- -> k -> S Int32
--- {-# SPECIALIZE icodeX :: ICodeX String #-}
--- {-# SPECIALIZE icodeX :: ICodeX Integer #-}
--- {-# SPECIALIZE icodeX :: ICodeX Double #-}
--- {-# SPECIALIZE icodeX :: ICodeX Node #-}
-
--- Andreas, 2014-10-16 AIM XX:
--- Inlining this increases Serialization time by 10%
--- Makoto's theory: code size increase might lead to
--- instruction cache misses.
--- {-# INLINE icodeX #-}
-icodeX :: (Eq k, Hashable k)
- => (Dict -> HashTable k Int32)
- -> (Dict -> IORef FreshAndReuse)
- -> k -> S Int32
-icodeX dict counter key = do
- d <- asks dict
- c <- asks counter
- liftIO $ do
- mi <- H.lookup d key
- case mi of
- Just i -> do
- modifyIORef' c $ over lensReuse (+1)
- return i
- Nothing -> do
- fresh <- (^.lensFresh) <$> do readModifyIORef' c $ over lensFresh (+1)
- H.insert d key fresh
- return fresh
-
--- Instead of inlining icodeX, we manually specialize it to
--- its four uses: Integer, String, Double, Node.
--- Not a great gain (hardly noticeable), but not harmful.
-
-icodeInteger :: Integer -> S Int32
-icodeInteger key = do
- d <- asks integerD
- c <- asks integerC
- liftIO $ do
- mi <- H.lookup d key
- case mi of
- Just i -> do
- modifyIORef' c $ over lensReuse (+1)
- return i
- Nothing -> do
- fresh <- (^.lensFresh) <$> do readModifyIORef' c $ over lensFresh (+1)
- H.insert d key fresh
- return fresh
-
-icodeDouble :: Double -> S Int32
-icodeDouble key = do
- d <- asks doubleD
- c <- asks doubleC
- liftIO $ do
- mi <- H.lookup d key
- case mi of
- Just i -> do
- modifyIORef' c $ over lensReuse (+1)
- return i
- Nothing -> do
- fresh <- (^.lensFresh) <$> do readModifyIORef' c $ over lensFresh (+1)
- H.insert d key fresh
- return fresh
-
-icodeString :: String -> S Int32
-icodeString key = do
- d <- asks stringD
- c <- asks stringC
- liftIO $ do
- mi <- H.lookup d key
- case mi of
- Just i -> do
- modifyIORef' c $ over lensReuse (+1)
- return i
- Nothing -> do
- fresh <- (^.lensFresh) <$> do readModifyIORef' c $ over lensFresh (+1)
- H.insert d key fresh
- return fresh
-
-icodeN :: Node -> S Int32
-icodeN key = do
- d <- asks nodeD
- c <- asks nodeC
- liftIO $ do
- mi <- H.lookup d key
- case mi of
- Just i -> do
- modifyIORef' c $ over lensReuse (+1)
- return i
- Nothing -> do
- fresh <- (^.lensFresh) <$> do readModifyIORef' c $ over lensFresh (+1)
- H.insert d key fresh
- return fresh
-
--- icodeN :: [Int32] -> S Int32
--- icodeN = icodeX nodeD nodeC
-
--- | @icode@ only if thing has not seen before.
-icodeMemo
- :: (Eq a, Ord a, Hashable a)
- => (Dict -> HashTable a Int32) -- ^ Memo structure for thing of key @a@.
- -> (Dict -> IORef FreshAndReuse) -- ^ Statistics.
- -> a -- ^ Key to the thing.
- -> S Int32 -- ^ Fallback computation to encode the thing.
- -> S Int32 -- ^ Encoded thing.
-icodeMemo getDict getCounter a icodeP = do
- h <- asks getDict
- mi <- liftIO $ H.lookup h a
- st <- asks getCounter
- case mi of
- Just i -> liftIO $ do
- modifyIORef' st $ over lensReuse (+ 1)
- return i
- Nothing -> do
- liftIO $ modifyIORef' st $ over lensFresh (+1)
- i <- icodeP
- liftIO $ H.insert h a i
- return i
-
-{-# INLINE vcase #-}
--- | @vcase value ix@ decodes thing represented by @ix :: Int32@
--- via the @valu@ function and stores it in 'nodeMemo'.
--- If @ix@ is present in 'nodeMemo', @valu@ is not used, but
--- the thing is read from 'nodeMemo' instead.
-vcase :: forall a . EmbPrj a => (Node -> R a) -> Int32 -> R a
-vcase valu = \ix -> do
- memo <- gets nodeMemo
- -- compute run-time representation of type a
- let aTyp = typeOf (undefined :: a)
- -- to introduce sharing, see if we have seen a thing
- -- represented by ix before
- maybeU <- liftIO $ H.lookup memo (ix, aTyp)
- case maybeU of
- -- yes, we have seen it before, use the version from memo
- Just (U u) -> maybe malformed return (cast u)
- -- no, it's new, so generate it via valu and insert it into memo
- Nothing -> do
- v <- valu . (! ix) =<< gets nodeE
- liftIO $ H.insert memo (ix, aTyp) (U v)
- return v
-
--- Andreas, Makoto, AIM XX (2014-10-15):
--- No performance gain for INLINE here (neutral / slighly negative).
---
--- {-# INLINE icode0 #-}
--- {-# INLINE icode1 #-}
--- {-# INLINE icode2 #-}
--- {-# INLINE icode3 #-}
--- {-# INLINE icode4 #-}
--- {-# INLINE icode5 #-}
--- {-# INLINE icode6 #-}
--- {-# INLINE icode7 #-}
--- {-# INLINE icode8 #-}
--- {-# INLINE icode9 #-}
--- {-# INLINE icode10 #-}
--- {-# INLINE icode11 #-}
--- {-# INLINE icode12 #-}
--- {-# INLINE icode13 #-}
--- {-# INLINE icode14 #-}
-
-icode0 :: Int32 -> S Int32
-
-icode1 :: EmbPrj a => Int32 -> a -> S Int32
-
-icode2 :: (EmbPrj a, EmbPrj b) =>
- Int32 -> a -> b ->
- S Int32
-
-icode3 :: (EmbPrj a, EmbPrj b, EmbPrj c) =>
- Int32 -> a -> b -> c ->
- S Int32
-
-icode4 :: (EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d) =>
- Int32 -> a -> b -> c -> d ->
- S Int32
-
-icode5 :: (EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e) =>
- Int32 -> a -> b -> c -> d -> e ->
- S Int32
-
-icode6 :: (EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f) =>
- Int32 -> a -> b -> c -> d -> e -> f ->
- S Int32
-
-icode7 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
- , EmbPrj g ) =>
- Int32 -> a -> b -> c -> d -> e -> f -> g ->
- S Int32
-
-icode8 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
- , EmbPrj g, EmbPrj h ) =>
- Int32 -> a -> b -> c -> d -> e -> f -> g -> h ->
- S Int32
-
-icode9 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
- , EmbPrj g, EmbPrj h, EmbPrj i ) =>
- Int32 -> a -> b -> c -> d -> e -> f -> g -> h -> i ->
- S Int32
-
-icode10 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
- , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j ) =>
- Int32 -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j ->
- S Int32
-
-icode11 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
- , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j, EmbPrj k ) =>
- Int32 -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k ->
- S Int32
-
-icode12 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
- , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j, EmbPrj k, EmbPrj l ) =>
- Int32 -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l ->
- S Int32
-
-icode13 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
- , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j, EmbPrj k, EmbPrj l
- , EmbPrj m ) =>
- Int32 -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m ->
- S Int32
-
-icode14 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
- , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j, EmbPrj k, EmbPrj l
- , EmbPrj m, EmbPrj n ) =>
- Int32 -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n ->
- S Int32
-
-icode0 tag = icodeN [tag]
-icode1 tag a = icodeN . (tag :) =<< sequence [icode a]
-icode2 tag a b = icodeN . (tag :) =<< sequence [icode a, icode b]
-icode3 tag a b c = icodeN . (tag :) =<< sequence [icode a, icode b, icode c]
-icode4 tag a b c d = icodeN . (tag :) =<< sequence [icode a, icode b, icode c, icode d]
-icode5 tag a b c d e = icodeN . (tag :) =<< sequence [icode a, icode b, icode c, icode d, icode e]
-icode6 tag a b c d e f = icodeN . (tag :) =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f]
-icode7 tag a b c d e f g = icodeN . (tag :) =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g]
-icode8 tag a b c d e f g h = icodeN . (tag :) =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h]
-icode9 tag a b c d e f g h i = icodeN . (tag :) =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h, icode i]
-icode10 tag a b c d e f g h i j = icodeN . (tag :) =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h, icode i, icode j]
-icode11 tag a b c d e f g h i j k = icodeN . (tag :) =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h, icode i, icode j, icode k]
-icode12 tag a b c d e f g h i j k l = icodeN . (tag :) =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h, icode i, icode j, icode k, icode l]
-icode13 tag a b c d e f g h i j k l m = icodeN . (tag :) =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h, icode i, icode j, icode k, icode l, icode m]
-icode14 tag a b c d e f g h i j k l m n = icodeN . (tag :) =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h, icode i, icode j, icode k, icode l, icode m, icode n]
-
-
--- Andreas, Makoto, AIM XX (2014-10-15):
--- No performance gain for INLINE here (neutral / slighly negative).
---
--- {-# INLINE icode0' #-}
--- {-# INLINE icode1' #-}
--- {-# INLINE icode2' #-}
--- {-# INLINE icode3' #-}
--- {-# INLINE icode4' #-}
--- {-# INLINE icode5' #-}
--- {-# INLINE icode6' #-}
--- {-# INLINE icode7' #-}
--- {-# INLINE icode8' #-}
--- {-# INLINE icode9' #-}
--- {-# INLINE icode10' #-}
--- {-# INLINE icode11' #-}
--- {-# INLINE icode12' #-}
--- {-# INLINE icode13' #-}
--- {-# INLINE icode14' #-}
-
-icode0' :: S Int32
-
-icode1' :: EmbPrj a => a -> S Int32
-
-icode2' :: (EmbPrj a, EmbPrj b) =>
- a -> b ->
- S Int32
-
-icode3' :: (EmbPrj a, EmbPrj b, EmbPrj c) =>
- a -> b -> c ->
- S Int32
-
-icode4' :: (EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d) =>
- a -> b -> c -> d ->
- S Int32
-
-icode5' :: (EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e) =>
- a -> b -> c -> d -> e ->
- S Int32
-
-icode6' :: (EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f) =>
- a -> b -> c -> d -> e -> f ->
- S Int32
-
-icode7' :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
- , EmbPrj g ) =>
- a -> b -> c -> d -> e -> f -> g ->
- S Int32
-
-icode8' :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
- , EmbPrj g, EmbPrj h ) =>
- a -> b -> c -> d -> e -> f -> g -> h ->
- S Int32
-
-icode9' :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
- , EmbPrj g, EmbPrj h, EmbPrj i ) =>
- a -> b -> c -> d -> e -> f -> g -> h -> i ->
- S Int32
-
-icode10' :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
- , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j ) =>
- a -> b -> c -> d -> e -> f -> g -> h -> i -> j ->
- S Int32
-
-icode11' :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
- , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j, EmbPrj k ) =>
- a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k ->
- S Int32
-
-icode12' :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
- , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j, EmbPrj k, EmbPrj l ) =>
- a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l ->
- S Int32
-
-icode13' :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
- , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j, EmbPrj k, EmbPrj l
- , EmbPrj m ) =>
- a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m ->
- S Int32
-
-icode14' :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
- , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j, EmbPrj k, EmbPrj l
- , EmbPrj m, EmbPrj n ) =>
- a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n ->
- S Int32
-
-icode0' = icodeN []
-icode1' a = icodeN =<< sequence [icode a]
-icode2' a b = icodeN =<< sequence [icode a, icode b]
-icode3' a b c = icodeN =<< sequence [icode a, icode b, icode c]
-icode4' a b c d = icodeN =<< sequence [icode a, icode b, icode c, icode d]
-icode5' a b c d e = icodeN =<< sequence [icode a, icode b, icode c, icode d, icode e]
-icode6' a b c d e f = icodeN =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f]
-icode7' a b c d e f g = icodeN =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g]
-icode8' a b c d e f g h = icodeN =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h]
-icode9' a b c d e f g h i = icodeN =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h, icode i]
-icode10' a b c d e f g h i j = icodeN =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h, icode i, icode j]
-icode11' a b c d e f g h i j k = icodeN =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h, icode i, icode j, icode k]
-icode12' a b c d e f g h i j k l = icodeN =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h, icode i, icode j, icode k, icode l]
-icode13' a b c d e f g h i j k l m = icodeN =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h, icode i, icode j, icode k, icode l, icode m]
-icode14' a b c d e f g h i j k l m n = icodeN =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h, icode i, icode j, icode k, icode l, icode m, icode n]
-
-valu0 :: a -> R a
-
-valu1 :: EmbPrj a => (a -> b) -> Int32 -> R b
-
-valu2 :: (EmbPrj a, EmbPrj b) =>
- (a -> b -> c) ->
- Int32 -> Int32 ->
- R c
-
-valu3 :: (EmbPrj a, EmbPrj b, EmbPrj c) =>
- (a -> b -> c -> d) ->
- Int32 -> Int32 -> Int32 ->
- R d
-
-valu4 :: (EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d) =>
- (a -> b -> c -> d -> e) ->
- Int32 -> Int32 -> Int32 -> Int32 ->
- R e
-
-valu5 :: (EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e) =>
- (a -> b -> c -> d -> e -> f) ->
- Int32 -> Int32 -> Int32 -> Int32 -> Int32 ->
- R f
-
-valu6 :: (EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f) =>
- (a -> b -> c -> d -> e -> f -> g) ->
- Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 ->
- R g
-
-valu7 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
- , EmbPrj g ) =>
- (a -> b -> c -> d -> e -> f -> g -> h) ->
- Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 ->
- R h
-
-valu8 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
- , EmbPrj g, EmbPrj h ) =>
- (a -> b -> c -> d -> e -> f -> g -> h -> i) ->
- Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 ->
- R i
-
-valu9 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
- , EmbPrj g, EmbPrj h, EmbPrj i ) =>
- (a -> b -> c -> d -> e -> f -> g -> h -> i -> j) ->
- Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 ->
- R j
-
-valu10 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
- , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j ) =>
- (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k) ->
- Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 ->
- R k
-
-valu11 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
- , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j, EmbPrj k ) =>
- (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l) ->
- Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 ->
- R l
-
-valu12 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
- , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j, EmbPrj k, EmbPrj l ) =>
- (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m) ->
- Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 ->
- R m
-
-valu13 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
- , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j, EmbPrj k, EmbPrj l
- , EmbPrj m ) =>
- (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n) ->
- Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 ->
- R n
-
-valu14 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
- , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j, EmbPrj k, EmbPrj l
- , EmbPrj m, EmbPrj n ) =>
- (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> o) ->
- Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 ->
- R o
-
-valu0 z = return z
-valu1 z a = valu0 z `ap` value a
-valu2 z a b = valu1 z a `ap` value b
-valu3 z a b c = valu2 z a b `ap` value c
-valu4 z a b c d = valu3 z a b c `ap` value d
-valu5 z a b c d e = valu4 z a b c d `ap` value e
-valu6 z a b c d e f = valu5 z a b c d e `ap` value f
-valu7 z a b c d e f g = valu6 z a b c d e f `ap` value g
-valu8 z a b c d e f g h = valu7 z a b c d e f g `ap` value h
-valu9 z a b c d e f g h i = valu8 z a b c d e f g h `ap` value i
-valu10 z a b c d e f g h i j = valu9 z a b c d e f g h i `ap` value j
-valu11 z a b c d e f g h i j k = valu10 z a b c d e f g h i j `ap` value k
-valu12 z a b c d e f g h i j k l = valu11 z a b c d e f g h i j k `ap` value l
-valu13 z a b c d e f g h i j k l m = valu12 z a b c d e f g h i j k l `ap` value m
-valu14 z a b c d e f g h i j k l m n = valu13 z a b c d e f g h i j k l m `ap` value n
diff --git a/src/full/Agda/TypeChecking/Serialise/Base.hs b/src/full/Agda/TypeChecking/Serialise/Base.hs
new file mode 100644
index 0000000..e0a4f4e
--- /dev/null
+++ b/src/full/Agda/TypeChecking/Serialise/Base.hs
@@ -0,0 +1,640 @@
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE ExistentialQuantification #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+
+module Agda.TypeChecking.Serialise.Base where
+
+import Control.Applicative
+import Control.Monad
+import Control.Monad.Reader
+import Control.Monad.State.Strict (StateT, gets)
+
+import Data.Array.IArray
+import qualified Data.ByteString.Lazy as L
+import Data.Hashable
+import qualified Data.HashTable.IO as H
+import Data.Int (Int32)
+import Data.Maybe
+import qualified Data.Binary as B
+import qualified Data.Binary.Get as B
+import Data.Typeable ( cast, Typeable, typeOf, TypeRep )
+
+import Agda.Syntax.Common (NameId)
+import Agda.Syntax.Internal (Term, QName(..), ModuleName(..), nameId)
+import Agda.TypeChecking.Monad.Base (TypeError(GenericError), ModuleToSource)
+
+import Agda.Utils.FileName
+import Agda.Utils.IORef
+import Agda.Utils.Lens
+import Agda.Utils.Monad
+import Agda.Utils.Pointer
+import Agda.Utils.Except (ExceptT, throwError)
+
+-- | Constructor tag (maybe omitted) and argument indices.
+
+type Node = [Int32]
+
+-- | The type of hashtables used in this module.
+--
+-- A very limited amount of testing indicates that 'H.CuckooHashTable'
+-- is somewhat slower than 'H.BasicHashTable', and that
+-- 'H.LinearHashTable' and the hashtables from "Data.Hashtable" are
+-- much slower.
+
+#if defined(mingw32_HOST_OS) && defined(x86_64_HOST_ARCH)
+type HashTable k v = H.CuckooHashTable k v
+#else
+type HashTable k v = H.BasicHashTable k v
+#endif
+
+-- | Structure providing fresh identifiers for hash map
+-- and counting hash map hits (i.e. when no fresh identifier required).
+data FreshAndReuse = FreshAndReuse
+ { farFresh :: !Int32 -- ^ Number of hash map misses.
+ , farReuse :: !Int32 -- ^ Number of hash map hits.
+ }
+
+farEmpty :: FreshAndReuse
+farEmpty = FreshAndReuse 0 0
+
+lensFresh :: Lens' Int32 FreshAndReuse
+lensFresh f r = f (farFresh r) <&> \ i -> r { farFresh = i }
+
+lensReuse :: Lens' Int32 FreshAndReuse
+lensReuse f r = f (farReuse r) <&> \ i -> r { farReuse = i }
+
+-- | Two 'A.QName's are equal if their @QNameId@ is equal.
+type QNameId = [NameId]
+
+-- | Computing a qualified names composed ID.
+qnameId :: QName -> QNameId
+qnameId (QName (MName ns) n) = map nameId $ n:ns
+
+-- | State of the the encoder.
+data Dict = Dict
+ -- Dictionaries which are serialized:
+ { nodeD :: !(HashTable Node Int32) -- ^ Written to interface file.
+ , stringD :: !(HashTable String Int32) -- ^ Written to interface file.
+ , integerD :: !(HashTable Integer Int32) -- ^ Written to interface file.
+ , doubleD :: !(HashTable Double Int32) -- ^ Written to interface file.
+ -- Dicitionaries which are not serialized, but provide
+ -- short cuts to speed up serialization:
+ , termD :: !(HashTable (Ptr Term) Int32) -- ^ Not written to interface file.
+ -- Andreas, Makoto, AIM XXI
+ -- Memoizing A.Name does not buy us much if we already memoize A.QName.
+ , nameD :: !(HashTable NameId Int32) -- ^ Not written to interface file.
+ , qnameD :: !(HashTable QNameId Int32) -- ^ Not written to interface file.
+ -- Fresh UIDs and reuse statistics:
+ , nodeC :: !(IORef FreshAndReuse) -- counters for fresh indexes
+ , stringC :: !(IORef FreshAndReuse)
+ , integerC :: !(IORef FreshAndReuse)
+ , doubleC :: !(IORef FreshAndReuse)
+ , termC :: !(IORef FreshAndReuse)
+ , nameC :: !(IORef FreshAndReuse)
+ , qnameC :: !(IORef FreshAndReuse)
+ , stats :: !(HashTable String Int)
+ , collectStats :: Bool
+ -- ^ If @True@ collect in @stats@ the quantities of
+ -- calls to @icode@ for each @Typeable a@.
+ , absPathD :: !(HashTable AbsolutePath Int32) -- ^ Not written to interface file.
+ }
+
+-- | Creates an empty dictionary.
+emptyDict
+ :: Bool
+ -- ^ Collect statistics for @icode@ calls?
+ -> IO Dict
+emptyDict collectStats = Dict
+ <$> H.new
+ <*> H.new
+ <*> H.new
+ <*> H.new
+ <*> H.new
+ <*> H.new
+ <*> H.new
+ <*> newIORef farEmpty
+ <*> newIORef farEmpty
+ <*> newIORef farEmpty
+ <*> newIORef farEmpty
+ <*> newIORef farEmpty
+ <*> newIORef farEmpty
+ <*> newIORef farEmpty
+ <*> H.new
+ <*> pure collectStats
+ <*> H.new
+
+-- | Universal type, wraps everything.
+data U = forall a . Typeable a => U !a
+
+-- | Univeral memo structure, to introduce sharing during decoding
+type Memo = HashTable (Int32, TypeRep) U -- (node index, type rep)
+
+-- | State of the decoder.
+data St = St
+ { nodeE :: !(Array Int32 Node) -- ^ Obtained from interface file.
+ , stringE :: !(Array Int32 String) -- ^ Obtained from interface file.
+ , integerE :: !(Array Int32 Integer) -- ^ Obtained from interface file.
+ , doubleE :: !(Array Int32 Double) -- ^ Obtained from interface file.
+ , nodeMemo :: !Memo
+ -- ^ Created and modified by decoder.
+ -- Used to introduce sharing while deserializing objects.
+ , modFile :: !ModuleToSource
+ -- ^ Maps module names to file names. Constructed by the decoder.
+ , includes :: [AbsolutePath]
+ -- ^ The include directories.
+ }
+
+-- | Monad used by the encoder.
+
+type S a = ReaderT Dict IO a
+
+-- | Monad used by the decoder.
+--
+-- 'TCM' is not used because the associated overheads would make
+-- decoding slower.
+
+type R a = ExceptT TypeError (StateT St IO) a
+
+-- | Throws an error which is suitable when the data stream is
+-- malformed.
+
+malformed :: R a
+malformed = throwError $ GenericError "Malformed input."
+
+class Typeable a => EmbPrj a where
+ icode :: a -> S Int32 -- ^ Serialization (wrapper).
+ icod_ :: a -> S Int32 -- ^ Serialization (worker).
+ value :: Int32 -> R a -- ^ Deserialization.
+
+ icode a = do
+ tickICode a
+ icod_ a
+
+-- | Increase entry for @a@ in 'stats'.
+tickICode :: forall a. Typeable a => a -> S ()
+tickICode _ = whenM (asks collectStats) $ do
+ let key = "icode " ++ show (typeOf (undefined :: a))
+ hmap <- asks stats
+ liftIO $ do
+ n <- fromMaybe 0 <$> H.lookup hmap key
+ H.insert hmap key $! n + 1
+
+-- | Data.Binary.runGetState is deprecated in favour of runGetIncremental.
+-- Reimplementing it in terms of the new function. The new Decoder type contains
+-- strict byte strings so we need to be careful not to feed the entire lazy byte
+-- string to the decoder at once.
+runGetState :: B.Get a -> L.ByteString -> B.ByteOffset -> (a, L.ByteString, B.ByteOffset)
+runGetState g s n = feed (B.runGetIncremental g) (L.toChunks s)
+ where
+ feed (B.Done s n' x) ss = (x, L.fromChunks (s : ss), n + n')
+ feed (B.Fail _ _ err) _ = error err
+ feed (B.Partial f) (s : ss) = feed (f $ Just s) ss
+ feed (B.Partial f) [] = feed (f Nothing) []
+
+-- Specializing icodeX leads to Warning like
+-- src/full/Agda/TypeChecking/Serialise.hs:1297:1: Warning:
+-- RULE left-hand side too complicated to desugar
+-- case cobox_aQY5 of _ [Occ=Dead] { ghc-prim:GHC.Types.Eq# cobox ->
+-- icodeX @ String $dEq_aQY3 $dHashable_aQY4
+-- }
+--
+-- type ICodeX k
+-- = (Dict -> HashTable k Int32)
+-- -> (Dict -> IORef Int32)
+-- -> k -> S Int32
+-- {-# SPECIALIZE icodeX :: ICodeX String #-}
+-- {-# SPECIALIZE icodeX :: ICodeX Integer #-}
+-- {-# SPECIALIZE icodeX :: ICodeX Double #-}
+-- {-# SPECIALIZE icodeX :: ICodeX Node #-}
+
+-- Andreas, 2014-10-16 AIM XX:
+-- Inlining this increases Serialization time by 10%
+-- Makoto's theory: code size increase might lead to
+-- instruction cache misses.
+-- {-# INLINE icodeX #-}
+icodeX :: (Eq k, Hashable k)
+ => (Dict -> HashTable k Int32)
+ -> (Dict -> IORef FreshAndReuse)
+ -> k -> S Int32
+icodeX dict counter key = do
+ d <- asks dict
+ c <- asks counter
+ liftIO $ do
+ mi <- H.lookup d key
+ case mi of
+ Just i -> do
+ modifyIORef' c $ over lensReuse (+1)
+ return i
+ Nothing -> do
+ fresh <- (^.lensFresh) <$> do readModifyIORef' c $ over lensFresh (+1)
+ H.insert d key fresh
+ return fresh
+
+-- Instead of inlining icodeX, we manually specialize it to
+-- its four uses: Integer, String, Double, Node.
+-- Not a great gain (hardly noticeable), but not harmful.
+
+icodeInteger :: Integer -> S Int32
+icodeInteger key = do
+ d <- asks integerD
+ c <- asks integerC
+ liftIO $ do
+ mi <- H.lookup d key
+ case mi of
+ Just i -> do
+ modifyIORef' c $ over lensReuse (+1)
+ return i
+ Nothing -> do
+ fresh <- (^.lensFresh) <$> do readModifyIORef' c $ over lensFresh (+1)
+ H.insert d key fresh
+ return fresh
+
+icodeDouble :: Double -> S Int32
+icodeDouble key = do
+ d <- asks doubleD
+ c <- asks doubleC
+ liftIO $ do
+ mi <- H.lookup d key
+ case mi of
+ Just i -> do
+ modifyIORef' c $ over lensReuse (+1)
+ return i
+ Nothing -> do
+ fresh <- (^.lensFresh) <$> do readModifyIORef' c $ over lensFresh (+1)
+ H.insert d key fresh
+ return fresh
+
+icodeString :: String -> S Int32
+icodeString key = do
+ d <- asks stringD
+ c <- asks stringC
+ liftIO $ do
+ mi <- H.lookup d key
+ case mi of
+ Just i -> do
+ modifyIORef' c $ over lensReuse (+1)
+ return i
+ Nothing -> do
+ fresh <- (^.lensFresh) <$> do readModifyIORef' c $ over lensFresh (+1)
+ H.insert d key fresh
+ return fresh
+
+icodeN :: Node -> S Int32
+icodeN key = do
+ d <- asks nodeD
+ c <- asks nodeC
+ liftIO $ do
+ mi <- H.lookup d key
+ case mi of
+ Just i -> do
+ modifyIORef' c $ over lensReuse (+1)
+ return i
+ Nothing -> do
+ fresh <- (^.lensFresh) <$> do readModifyIORef' c $ over lensFresh (+1)
+ H.insert d key fresh
+ return fresh
+
+-- icodeN :: [Int32] -> S Int32
+-- icodeN = icodeX nodeD nodeC
+
+-- | @icode@ only if thing has not seen before.
+icodeMemo
+ :: (Eq a, Ord a, Hashable a)
+ => (Dict -> HashTable a Int32) -- ^ Memo structure for thing of key @a@.
+ -> (Dict -> IORef FreshAndReuse) -- ^ Statistics.
+ -> a -- ^ Key to the thing.
+ -> S Int32 -- ^ Fallback computation to encode the thing.
+ -> S Int32 -- ^ Encoded thing.
+icodeMemo getDict getCounter a icodeP = do
+ h <- asks getDict
+ mi <- liftIO $ H.lookup h a
+ st <- asks getCounter
+ case mi of
+ Just i -> liftIO $ do
+ modifyIORef' st $ over lensReuse (+ 1)
+ return i
+ Nothing -> do
+ liftIO $ modifyIORef' st $ over lensFresh (+1)
+ i <- icodeP
+ liftIO $ H.insert h a i
+ return i
+
+{-# INLINE vcase #-}
+-- | @vcase value ix@ decodes thing represented by @ix :: Int32@
+-- via the @valu@ function and stores it in 'nodeMemo'.
+-- If @ix@ is present in 'nodeMemo', @valu@ is not used, but
+-- the thing is read from 'nodeMemo' instead.
+vcase :: forall a . EmbPrj a => (Node -> R a) -> Int32 -> R a
+vcase valu = \ix -> do
+ memo <- gets nodeMemo
+ -- compute run-time representation of type a
+ let aTyp = typeOf (undefined :: a)
+ -- to introduce sharing, see if we have seen a thing
+ -- represented by ix before
+ maybeU <- liftIO $ H.lookup memo (ix, aTyp)
+ case maybeU of
+ -- yes, we have seen it before, use the version from memo
+ Just (U u) -> maybe malformed return (cast u)
+ -- no, it's new, so generate it via valu and insert it into memo
+ Nothing -> do
+ v <- valu . (! ix) =<< gets nodeE
+ liftIO $ H.insert memo (ix, aTyp) (U v)
+ return v
+
+-- Andreas, Makoto, AIM XX (2014-10-15):
+-- No performance gain for INLINE here (neutral / slighly negative).
+--
+-- {-# INLINE icode0 #-}
+-- {-# INLINE icode1 #-}
+-- {-# INLINE icode2 #-}
+-- {-# INLINE icode3 #-}
+-- {-# INLINE icode4 #-}
+-- {-# INLINE icode5 #-}
+-- {-# INLINE icode6 #-}
+-- {-# INLINE icode7 #-}
+-- {-# INLINE icode8 #-}
+-- {-# INLINE icode9 #-}
+-- {-# INLINE icode10 #-}
+-- {-# INLINE icode11 #-}
+-- {-# INLINE icode12 #-}
+-- {-# INLINE icode13 #-}
+-- {-# INLINE icode14 #-}
+
+icode0 :: Int32 -> S Int32
+
+icode1 :: EmbPrj a => Int32 -> a -> S Int32
+
+icode2 :: (EmbPrj a, EmbPrj b) =>
+ Int32 -> a -> b ->
+ S Int32
+
+icode3 :: (EmbPrj a, EmbPrj b, EmbPrj c) =>
+ Int32 -> a -> b -> c ->
+ S Int32
+
+icode4 :: (EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d) =>
+ Int32 -> a -> b -> c -> d ->
+ S Int32
+
+icode5 :: (EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e) =>
+ Int32 -> a -> b -> c -> d -> e ->
+ S Int32
+
+icode6 :: (EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f) =>
+ Int32 -> a -> b -> c -> d -> e -> f ->
+ S Int32
+
+icode7 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
+ , EmbPrj g ) =>
+ Int32 -> a -> b -> c -> d -> e -> f -> g ->
+ S Int32
+
+icode8 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
+ , EmbPrj g, EmbPrj h ) =>
+ Int32 -> a -> b -> c -> d -> e -> f -> g -> h ->
+ S Int32
+
+icode9 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
+ , EmbPrj g, EmbPrj h, EmbPrj i ) =>
+ Int32 -> a -> b -> c -> d -> e -> f -> g -> h -> i ->
+ S Int32
+
+icode10 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
+ , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j ) =>
+ Int32 -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j ->
+ S Int32
+
+icode11 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
+ , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j, EmbPrj k ) =>
+ Int32 -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k ->
+ S Int32
+
+icode12 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
+ , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j, EmbPrj k, EmbPrj l ) =>
+ Int32 -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l ->
+ S Int32
+
+icode13 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
+ , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j, EmbPrj k, EmbPrj l
+ , EmbPrj m ) =>
+ Int32 -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m ->
+ S Int32
+
+icode14 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
+ , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j, EmbPrj k, EmbPrj l
+ , EmbPrj m, EmbPrj n ) =>
+ Int32 -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n ->
+ S Int32
+
+icode0 tag = icodeN [tag]
+icode1 tag a = icodeN . (tag :) =<< sequence [icode a]
+icode2 tag a b = icodeN . (tag :) =<< sequence [icode a, icode b]
+icode3 tag a b c = icodeN . (tag :) =<< sequence [icode a, icode b, icode c]
+icode4 tag a b c d = icodeN . (tag :) =<< sequence [icode a, icode b, icode c, icode d]
+icode5 tag a b c d e = icodeN . (tag :) =<< sequence [icode a, icode b, icode c, icode d, icode e]
+icode6 tag a b c d e f = icodeN . (tag :) =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f]
+icode7 tag a b c d e f g = icodeN . (tag :) =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g]
+icode8 tag a b c d e f g h = icodeN . (tag :) =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h]
+icode9 tag a b c d e f g h i = icodeN . (tag :) =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h, icode i]
+icode10 tag a b c d e f g h i j = icodeN . (tag :) =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h, icode i, icode j]
+icode11 tag a b c d e f g h i j k = icodeN . (tag :) =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h, icode i, icode j, icode k]
+icode12 tag a b c d e f g h i j k l = icodeN . (tag :) =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h, icode i, icode j, icode k, icode l]
+icode13 tag a b c d e f g h i j k l m = icodeN . (tag :) =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h, icode i, icode j, icode k, icode l, icode m]
+icode14 tag a b c d e f g h i j k l m n = icodeN . (tag :) =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h, icode i, icode j, icode k, icode l, icode m, icode n]
+
+
+-- Andreas, Makoto, AIM XX (2014-10-15):
+-- No performance gain for INLINE here (neutral / slighly negative).
+--
+-- {-# INLINE icode0' #-}
+-- {-# INLINE icode1' #-}
+-- {-# INLINE icode2' #-}
+-- {-# INLINE icode3' #-}
+-- {-# INLINE icode4' #-}
+-- {-# INLINE icode5' #-}
+-- {-# INLINE icode6' #-}
+-- {-# INLINE icode7' #-}
+-- {-# INLINE icode8' #-}
+-- {-# INLINE icode9' #-}
+-- {-# INLINE icode10' #-}
+-- {-# INLINE icode11' #-}
+-- {-# INLINE icode12' #-}
+-- {-# INLINE icode13' #-}
+-- {-# INLINE icode14' #-}
+
+icode0' :: S Int32
+
+icode1' :: EmbPrj a => a -> S Int32
+
+icode2' :: (EmbPrj a, EmbPrj b) =>
+ a -> b ->
+ S Int32
+
+icode3' :: (EmbPrj a, EmbPrj b, EmbPrj c) =>
+ a -> b -> c ->
+ S Int32
+
+icode4' :: (EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d) =>
+ a -> b -> c -> d ->
+ S Int32
+
+icode5' :: (EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e) =>
+ a -> b -> c -> d -> e ->
+ S Int32
+
+icode6' :: (EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f) =>
+ a -> b -> c -> d -> e -> f ->
+ S Int32
+
+icode7' :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
+ , EmbPrj g ) =>
+ a -> b -> c -> d -> e -> f -> g ->
+ S Int32
+
+icode8' :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
+ , EmbPrj g, EmbPrj h ) =>
+ a -> b -> c -> d -> e -> f -> g -> h ->
+ S Int32
+
+icode9' :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
+ , EmbPrj g, EmbPrj h, EmbPrj i ) =>
+ a -> b -> c -> d -> e -> f -> g -> h -> i ->
+ S Int32
+
+icode10' :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
+ , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j ) =>
+ a -> b -> c -> d -> e -> f -> g -> h -> i -> j ->
+ S Int32
+
+icode11' :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
+ , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j, EmbPrj k ) =>
+ a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k ->
+ S Int32
+
+icode12' :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
+ , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j, EmbPrj k, EmbPrj l ) =>
+ a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l ->
+ S Int32
+
+icode13' :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
+ , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j, EmbPrj k, EmbPrj l
+ , EmbPrj m ) =>
+ a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m ->
+ S Int32
+
+icode14' :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
+ , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j, EmbPrj k, EmbPrj l
+ , EmbPrj m, EmbPrj n ) =>
+ a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n ->
+ S Int32
+
+icode0' = icodeN []
+icode1' a = icodeN =<< sequence [icode a]
+icode2' a b = icodeN =<< sequence [icode a, icode b]
+icode3' a b c = icodeN =<< sequence [icode a, icode b, icode c]
+icode4' a b c d = icodeN =<< sequence [icode a, icode b, icode c, icode d]
+icode5' a b c d e = icodeN =<< sequence [icode a, icode b, icode c, icode d, icode e]
+icode6' a b c d e f = icodeN =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f]
+icode7' a b c d e f g = icodeN =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g]
+icode8' a b c d e f g h = icodeN =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h]
+icode9' a b c d e f g h i = icodeN =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h, icode i]
+icode10' a b c d e f g h i j = icodeN =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h, icode i, icode j]
+icode11' a b c d e f g h i j k = icodeN =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h, icode i, icode j, icode k]
+icode12' a b c d e f g h i j k l = icodeN =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h, icode i, icode j, icode k, icode l]
+icode13' a b c d e f g h i j k l m = icodeN =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h, icode i, icode j, icode k, icode l, icode m]
+icode14' a b c d e f g h i j k l m n = icodeN =<< sequence [icode a, icode b, icode c, icode d, icode e, icode f, icode g, icode h, icode i, icode j, icode k, icode l, icode m, icode n]
+
+valu0 :: a -> R a
+
+valu1 :: EmbPrj a => (a -> b) -> Int32 -> R b
+
+valu2 :: (EmbPrj a, EmbPrj b) =>
+ (a -> b -> c) ->
+ Int32 -> Int32 ->
+ R c
+
+valu3 :: (EmbPrj a, EmbPrj b, EmbPrj c) =>
+ (a -> b -> c -> d) ->
+ Int32 -> Int32 -> Int32 ->
+ R d
+
+valu4 :: (EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d) =>
+ (a -> b -> c -> d -> e) ->
+ Int32 -> Int32 -> Int32 -> Int32 ->
+ R e
+
+valu5 :: (EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e) =>
+ (a -> b -> c -> d -> e -> f) ->
+ Int32 -> Int32 -> Int32 -> Int32 -> Int32 ->
+ R f
+
+valu6 :: (EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f) =>
+ (a -> b -> c -> d -> e -> f -> g) ->
+ Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 ->
+ R g
+
+valu7 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
+ , EmbPrj g ) =>
+ (a -> b -> c -> d -> e -> f -> g -> h) ->
+ Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 ->
+ R h
+
+valu8 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
+ , EmbPrj g, EmbPrj h ) =>
+ (a -> b -> c -> d -> e -> f -> g -> h -> i) ->
+ Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 ->
+ R i
+
+valu9 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
+ , EmbPrj g, EmbPrj h, EmbPrj i ) =>
+ (a -> b -> c -> d -> e -> f -> g -> h -> i -> j) ->
+ Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 ->
+ R j
+
+valu10 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
+ , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j ) =>
+ (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k) ->
+ Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 ->
+ R k
+
+valu11 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
+ , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j, EmbPrj k ) =>
+ (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l) ->
+ Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 ->
+ R l
+
+valu12 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
+ , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j, EmbPrj k, EmbPrj l ) =>
+ (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m) ->
+ Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 ->
+ R m
+
+valu13 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
+ , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j, EmbPrj k, EmbPrj l
+ , EmbPrj m ) =>
+ (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n) ->
+ Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 ->
+ R n
+
+valu14 :: ( EmbPrj a, EmbPrj b, EmbPrj c, EmbPrj d, EmbPrj e, EmbPrj f
+ , EmbPrj g, EmbPrj h, EmbPrj i, EmbPrj j, EmbPrj k, EmbPrj l
+ , EmbPrj m, EmbPrj n ) =>
+ (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> o) ->
+ Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 ->
+ R o
+
+valu0 z = return z
+valu1 z a = valu0 z `ap` value a
+valu2 z a b = valu1 z a `ap` value b
+valu3 z a b c = valu2 z a b `ap` value c
+valu4 z a b c d = valu3 z a b c `ap` value d
+valu5 z a b c d e = valu4 z a b c d `ap` value e
+valu6 z a b c d e f = valu5 z a b c d e `ap` value f
+valu7 z a b c d e f g = valu6 z a b c d e f `ap` value g
+valu8 z a b c d e f g h = valu7 z a b c d e f g `ap` value h
+valu9 z a b c d e f g h i = valu8 z a b c d e f g h `ap` value i
+valu10 z a b c d e f g h i j = valu9 z a b c d e f g h i `ap` value j
+valu11 z a b c d e f g h i j k = valu10 z a b c d e f g h i j `ap` value k
+valu12 z a b c d e f g h i j k l = valu11 z a b c d e f g h i j k `ap` value l
+valu13 z a b c d e f g h i j k l m = valu12 z a b c d e f g h i j k l `ap` value m
+valu14 z a b c d e f g h i j k l m n = valu13 z a b c d e f g h i j k l m `ap` value n
diff --git a/src/full/Agda/TypeChecking/Serialise/Instances.hs b/src/full/Agda/TypeChecking/Serialise/Instances.hs
new file mode 100644
index 0000000..ed1f682
--- /dev/null
+++ b/src/full/Agda/TypeChecking/Serialise/Instances.hs
@@ -0,0 +1,19 @@
+{-# OPTIONS_GHC -fno-warn-orphans #-}
+
+-- Only instances exported
+module Agda.TypeChecking.Serialise.Instances () where
+
+import Agda.TypeChecking.Monad.Base
+import Agda.TypeChecking.Serialise.Base
+import Agda.TypeChecking.Serialise.Instances.Abstract ()
+import Agda.TypeChecking.Serialise.Instances.Common ()
+import Agda.TypeChecking.Serialise.Instances.Compilers ()
+import Agda.TypeChecking.Serialise.Instances.Highlighting ()
+import Agda.TypeChecking.Serialise.Instances.Internal ()
+
+instance EmbPrj Interface where
+ icod_ (Interface a b c d e f g h i j k) = icode11' a b c d e f g h i j k
+
+ value = vcase valu where
+ valu [a, b, c, d, e, f, g, h, i, j, k] = valu11 Interface a b c d e f g h i j k
+ valu _ = malformed
diff --git a/src/full/Agda/TypeChecking/Serialise/Instances/Abstract.hs b/src/full/Agda/TypeChecking/Serialise/Instances/Abstract.hs
new file mode 100644
index 0000000..ac488c7
--- /dev/null
+++ b/src/full/Agda/TypeChecking/Serialise/Instances/Abstract.hs
@@ -0,0 +1,279 @@
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE FlexibleInstances #-}
+
+#if __GLASGOW_HASKELL__ >= 710
+{-# LANGUAGE FlexibleContexts #-}
+#endif
+
+{-# OPTIONS_GHC -fno-warn-orphans #-}
+
+module Agda.TypeChecking.Serialise.Instances.Abstract where
+
+import Control.Applicative
+
+import Agda.Syntax.Common
+import qualified Agda.Syntax.Abstract as A
+import Agda.Syntax.Info
+import Agda.Syntax.Scope.Base
+import Agda.Syntax.Position as P
+import Agda.Syntax.Fixity
+
+import Agda.TypeChecking.Serialise.Base
+import Agda.TypeChecking.Serialise.Instances.Common ()
+
+import Agda.TypeChecking.Monad
+
+import Agda.Utils.Except
+
+#include "undefined.h"
+import Agda.Utils.Impossible
+
+instance EmbPrj Scope where
+ icod_ (Scope a b c d e) = icode5' a b c d e
+
+ value = vcase valu where
+ valu [a, b, c, d, e] = valu5 Scope a b c d e
+ valu _ = malformed
+
+instance EmbPrj NameSpaceId where
+ icod_ PublicNS = icode0'
+ icod_ PrivateNS = icode0 1
+ icod_ ImportedNS = icode0 2
+ icod_ OnlyQualifiedNS = icode0 3
+
+ value = vcase valu where
+ valu [] = valu0 PublicNS
+ valu [1] = valu0 PrivateNS
+ valu [2] = valu0 ImportedNS
+ valu [3] = valu0 OnlyQualifiedNS
+ valu _ = malformed
+
+instance EmbPrj Access where
+ icod_ PrivateAccess = icode0 0
+ icod_ PublicAccess = icode0'
+ icod_ OnlyQualified = icode0 2
+
+ value = vcase valu where
+ valu [0] = valu0 PrivateAccess
+ valu [] = valu0 PublicAccess
+ valu [2] = valu0 OnlyQualified
+ valu _ = malformed
+
+instance EmbPrj NameSpace where
+ icod_ (NameSpace a b) = icode2' a b
+
+ value = vcase valu where
+ valu [a, b] = valu2 NameSpace a b
+ valu _ = malformed
+
+instance EmbPrj WhyInScope where
+ icod_ Defined = icode0'
+ icod_ (Opened a b) = icode2 0 a b
+ icod_ (Applied a b) = icode2 1 a b
+
+ value = vcase valu where
+ valu [] = valu0 Defined
+ valu [0, a, b] = valu2 Opened a b
+ valu [1, a, b] = valu2 Applied a b
+ valu _ = malformed
+
+instance EmbPrj AbstractName where
+ icod_ (AbsName a b c) = icode3' a b c
+
+ value = vcase valu where
+ valu [a, b, c] = valu3 AbsName a b c
+ valu _ = malformed
+
+instance EmbPrj AbstractModule where
+ icod_ (AbsModule a b) = icode2' a b
+
+ value = vcase valu where
+ valu [a, b] = valu2 AbsModule a b
+ valu _ = malformed
+
+instance EmbPrj KindOfName where
+ icod_ DefName = icode0'
+ icod_ ConName = icode0 1
+ icod_ FldName = icode0 2
+ icod_ PatternSynName = icode0 3
+ icod_ QuotableName = icode0 4
+
+ value = vcase valu where
+ valu [] = valu0 DefName
+ valu [1] = valu0 ConName
+ valu [2] = valu0 FldName
+ valu [3] = valu0 PatternSynName
+ valu [4] = valu0 QuotableName
+ valu _ = malformed
+
+instance EmbPrj LocalVar where
+ icod_ (LocalVar a) = icode1' a
+ icod_ (ShadowedVar a b) = icode2' a b
+
+ value = vcase valu where
+ valu [a] = valu1 LocalVar a
+ valu [a, b] = valu2 ShadowedVar a b
+ valu _ = malformed
+
+-- Only used for pattern synonyms
+instance EmbPrj A.Expr where
+ icod_ (A.Var n) = icode1 0 n
+ icod_ (A.Def n) = icode1 1 n
+ icod_ (A.Con ns) = icode1 2 ns
+ icod_ (A.Lit l) = icode1 3 l
+ icod_ (A.QuestionMark{}) = icode0 4
+ icod_ (A.Underscore _) = icode0 5
+ icod_ (A.App _ a b) = icode2 6 a b
+ icod_ (A.WithApp _ a b) = icode2 7 a b
+ icod_ (A.Lam _ a b) = icode2 8 a b
+ icod_ (A.AbsurdLam _ a) = icode1 9 a
+ icod_ (A.ExtendedLam _ _ _ _) = __IMPOSSIBLE__
+ icod_ (A.Pi _ a b) = icode2 11 a b
+ icod_ (A.Fun _ a b) = icode2 12 a b
+ icod_ (A.Set _ a) = icode1 13 a
+ icod_ (A.Prop _) = icode0 14
+ icod_ (A.Let _ _ _) = __IMPOSSIBLE__
+ icod_ (A.ETel{}) = __IMPOSSIBLE__
+ icod_ (A.Rec _ a) = icode1 17 a
+ icod_ (A.RecUpdate _ a b) = icode2 18 a b
+ -- Andreas, 2015-07-15, drop scopes embedded in expressions.
+ -- As expressions are not @unScope@d before serialization,
+ -- this case is not __IMPOSSIBLE__.
+ icod_ (A.ScopedExpr a b) = icod_ b -- WAS: icode2 19 a b
+ icod_ (A.QuoteGoal _ a b) = icode2 20 a b
+ icod_ (A.QuoteContext _ a b) = icode2 21 a b
+ icod_ (A.Quote _) = icode0 22
+ icod_ (A.QuoteTerm _) = icode0 23
+ icod_ (A.Unquote _) = icode0 24
+ icod_ (A.DontCare a) = icode1 25 a
+ icod_ (A.PatternSyn a) = icode1 26 a
+ icod_ (A.Proj a) = icode1 27 a
+
+ value = vcase valu where
+ valu [0, a] = valu1 A.Var a
+ valu [1, a] = valu1 A.Def a
+ valu [2, a] = valu1 A.Con a
+ valu [3, a] = valu1 A.Lit a
+ valu [4] = valu0 (A.QuestionMark emptyMetaInfo 0)
+ valu [5] = valu0 (A.Underscore emptyMetaInfo)
+ valu [6, a, b] = valu2 (A.App i) a b
+ valu [7, a, b] = valu2 (A.WithApp i) a b
+ valu [8, a, b] = valu2 (A.Lam i) a b
+ valu [9, a] = valu1 (A.AbsurdLam i) a
+ valu [11, a, b] = valu2 (A.Pi i) a b
+ valu [12, a, b] = valu2 (A.Fun i) a b
+ valu [13, a] = valu1 (A.Set i) a
+ valu [14] = valu0 (A.Prop i)
+ valu [17, a] = valu1 (A.Rec i) a
+ valu [18, a, b] = valu2 (A.RecUpdate i) a b
+ -- valu [19, a, b] = valu2 A.ScopedExpr a b
+ valu [20, a, b] = valu2 (A.QuoteGoal i) a b
+ valu [21, a, b] = valu2 (A.QuoteContext i) a b
+ valu [22] = valu0 (A.Quote i)
+ valu [23] = valu0 (A.QuoteTerm i)
+ valu [24] = valu0 (A.Unquote i)
+ valu [25, a] = valu1 A.DontCare a
+ valu [26, a] = valu1 A.PatternSyn a
+ valu [27, a] = valu1 A.Proj a
+ valu _ = malformed
+
+ i = ExprRange noRange
+
+instance EmbPrj ConPatInfo where
+ icod_ (ConPatInfo a _) = icod_ a
+ value a = flip ConPatInfo patNoRange <$> value a
+
+instance EmbPrj A.Pattern where
+ icod_ (A.VarP a) = icode1 0 a
+ icod_ (A.ConP a b c) = icode3 1 a b c
+ icod_ (A.DefP _ a b) = icode2 2 a b
+ icod_ (A.WildP _) = icode0 3
+ icod_ (A.AsP _ a b) = icode2 4 a b
+ icod_ (A.DotP _ a) = icode1 5 a
+ icod_ (A.AbsurdP _) = icode0 6
+ icod_ (A.LitP a) = icode1 7 a
+ icod_ (A.PatternSynP _ a b) = icode2 9 a b
+
+ value = vcase valu where
+ valu [0, a] = valu1 A.VarP a
+ valu [1, a, b, c] = valu3 A.ConP a b c
+ valu [2, a, b] = valu2 (A.DefP i) a b
+ valu [3] = valu0 (A.WildP i)
+ valu [4, a, b] = valu2 (A.AsP i) a b
+ valu [5, a] = valu1 (A.DotP i) a
+ valu [6] = valu0 (A.AbsurdP i)
+ valu [7, a] = valu1 (A.LitP) a
+ valu [9, a, b] = valu2 (A.PatternSynP i) a b
+ valu _ = malformed
+
+ i = patNoRange
+
+instance EmbPrj A.LamBinding where
+ icod_ (A.DomainFree i e) = icode2 0 i e
+ icod_ (A.DomainFull a) = icode1 1 a
+
+ value = vcase valu where
+ valu [0, i, e] = valu2 A.DomainFree i e
+ valu [1, a] = valu1 A.DomainFull a
+ valu _ = malformed
+
+instance EmbPrj A.LetBinding where
+ icod_ (A.LetBind _ a b c d) = icode4 0 a b c d
+ icod_ (A.LetPatBind _ a b ) = icode2 1 a b
+ icod_ (A.LetApply _ _ _ _ _) = icode0 2
+ icod_ (A.LetOpen _ _) = icode0 2
+
+ value = vcase valu where
+ valu [0, a, b, c, d] = valu4 (A.LetBind (LetRange noRange)) a b c d
+ valu [1, a, b] = valu2 (A.LetPatBind (LetRange noRange)) a b
+ valu [2] = throwError $ NotSupported
+ "importing pattern synonym containing let module"
+ valu _ = malformed
+
+instance EmbPrj A.TypedBindings where
+ icod_ (A.TypedBindings a b) = icode2' a b
+
+ value = vcase valu where
+ valu [a, b] = valu2 A.TypedBindings a b
+ valu _ = malformed
+
+instance EmbPrj A.TypedBinding where
+ icod_ (A.TBind a b c) = icode3 0 a b c
+ icod_ (A.TLet a b) = icode2 1 a b
+
+ value = vcase valu where
+ valu [0, a, b, c] = valu3 A.TBind a b c
+ valu [1, a, b] = valu2 A.TLet a b
+ valu _ = malformed
+
+instance EmbPrj Precedence where
+ icod_ TopCtx = icode0'
+ icod_ FunctionSpaceDomainCtx = icode0 1
+ icod_ (LeftOperandCtx a) = icode1 2 a
+ icod_ (RightOperandCtx a) = icode1 3 a
+ icod_ FunctionCtx = icode0 4
+ icod_ ArgumentCtx = icode0 5
+ icod_ InsideOperandCtx = icode0 6
+ icod_ WithFunCtx = icode0 7
+ icod_ WithArgCtx = icode0 8
+ icod_ DotPatternCtx = icode0 9
+
+ value = vcase valu where
+ valu [] = valu0 TopCtx
+ valu [1] = valu0 FunctionSpaceDomainCtx
+ valu [2, a] = valu1 LeftOperandCtx a
+ valu [3, a] = valu1 RightOperandCtx a
+ valu [4] = valu0 FunctionCtx
+ valu [5] = valu0 ArgumentCtx
+ valu [6] = valu0 InsideOperandCtx
+ valu [7] = valu0 WithFunCtx
+ valu [8] = valu0 WithArgCtx
+ valu [9] = valu0 DotPatternCtx
+ valu _ = malformed
+
+instance EmbPrj ScopeInfo where
+ icod_ (ScopeInfo a b c d) = icode4' a b c d
+
+ value = vcase valu where
+ valu [a, b, c, d] = valu4 ScopeInfo a b c d
+ valu _ = malformed
diff --git a/src/full/Agda/TypeChecking/Serialise/Instances/Common.hs b/src/full/Agda/TypeChecking/Serialise/Instances/Common.hs
new file mode 100644
index 0000000..8705197
--- /dev/null
+++ b/src/full/Agda/TypeChecking/Serialise/Instances/Common.hs
@@ -0,0 +1,437 @@
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE ExistentialQuantification #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+
+#if __GLASGOW_HASKELL__ >= 710
+{-# LANGUAGE FlexibleContexts #-}
+#endif
+
+#if __GLASGOW_HASKELL__ <= 708
+{-# LANGUAGE OverlappingInstances #-}
+#endif
+
+{-# OPTIONS_GHC -fno-warn-orphans #-}
+module Agda.TypeChecking.Serialise.Instances.Common where
+
+import Control.Applicative
+import Control.Monad.Reader
+import Control.Monad.State.Strict (gets, modify)
+
+import Data.Array.IArray
+import Data.Word
+import qualified Data.ByteString.Lazy as L
+import qualified Data.Foldable as Fold
+import Data.Hashable
+import qualified Data.HashTable.IO as H
+import Data.Int (Int32)
+import Data.Maybe
+import Data.Map (Map)
+import qualified Data.Map as Map
+import Data.Set (Set)
+import qualified Data.Set as Set
+import Data.Sequence (Seq)
+import qualified Data.Sequence as Seq
+import Data.Void
+
+import Agda.Syntax.Common as Common
+import Agda.Syntax.Concrete.Name as C
+import qualified Agda.Syntax.Concrete as C
+import qualified Agda.Syntax.Abstract as A
+import Agda.Syntax.Position as P
+import Agda.Syntax.Fixity
+import Agda.Syntax.Notation
+import Agda.Syntax.Literal
+import Agda.Interaction.FindFile
+
+import Agda.TypeChecking.Serialise.Base
+
+import Agda.Utils.BiMap (BiMap)
+import qualified Agda.Utils.BiMap as BiMap
+import Agda.Utils.HashMap (HashMap)
+import qualified Agda.Utils.HashMap as HMap
+import Agda.Utils.FileName
+import qualified Agda.Utils.Maybe.Strict as Strict
+
+import Agda.Utils.Except
+
+#include "undefined.h"
+import Agda.Utils.Impossible
+
+#if __GLASGOW_HASKELL__ >= 710
+instance {-# OVERLAPPING #-} EmbPrj String where
+#else
+instance EmbPrj String where
+#endif
+ icod_ = icodeString
+ value i = (! i) `fmap` gets stringE
+
+instance EmbPrj Integer where
+ icod_ = icodeInteger
+ value i = (! i) `fmap` gets integerE
+
+instance EmbPrj Word64 where
+ icod_ i = icode2' (int32 q) (int32 r)
+ where (q, r) = quotRem i (2^32)
+ int32 :: Word64 -> Int32
+ int32 = fromIntegral
+
+ value = vcase valu where
+ valu [a, b] = return $ n * mod (fromIntegral a) n + mod (fromIntegral b) n
+ valu _ = malformed
+ n = 2^32
+
+instance EmbPrj Int32 where
+ icod_ i = return i
+ value i = return i
+
+instance EmbPrj Int where
+ icod_ i = return (fromIntegral i)
+ value i = return (fromIntegral i)
+
+instance EmbPrj Char where
+ icod_ c = return (fromIntegral $ fromEnum c)
+ value i = return (toEnum $ fromInteger $ toInteger i)
+
+instance EmbPrj Double where
+ icod_ = icodeDouble
+ value i = (! i) `fmap` gets doubleE
+
+instance EmbPrj () where
+ icod_ () = icode0'
+
+ value = vcase valu where
+ valu [] = valu0 ()
+ valu _ = malformed
+
+instance (EmbPrj a, EmbPrj b) => EmbPrj (a, b) where
+ icod_ (a, b) = icode2' a b
+
+ value = vcase valu where
+ valu [a, b] = valu2 (,) a b
+ valu _ = malformed
+
+instance (EmbPrj a, EmbPrj b, EmbPrj c) => EmbPrj (a, b, c) where
+ icod_ (a, b, c) = icode3' a b c
+
+ value = vcase valu where
+ valu [a, b, c] = valu3 (,,) a b c
+ valu _ = malformed
+
+instance EmbPrj a => EmbPrj (Maybe a) where
+ icod_ Nothing = icode0'
+ icod_ (Just x) = icode1' x
+
+ value = vcase valu where
+ valu [] = valu0 Nothing
+ valu [x] = valu1 Just x
+ valu _ = malformed
+
+instance EmbPrj Bool where
+ icod_ True = icode0'
+ icod_ False = icode0 0
+
+ value = vcase valu where
+ valu [] = valu0 True
+ valu [0] = valu0 False
+ valu _ = malformed
+
+instance EmbPrj AbsolutePath where
+ icod_ file = do
+ d <- asks absPathD
+ liftIO $ fromMaybe __IMPOSSIBLE__ <$> H.lookup d file
+
+ value m = do
+ m :: TopLevelModuleName
+ <- value m
+ mf <- gets modFile
+ incs <- gets includes
+ (r, mf) <- liftIO $ findFile'' incs m mf
+ modify $ \s -> s { modFile = mf }
+ case r of
+ Left err -> throwError $ findErrorToTypeError m err
+ Right f -> return f
+
+instance EmbPrj Position where
+ icod_ (P.Pn file pos line col) = icode4' file pos line col
+
+ value = vcase valu where
+ valu [f, p, l, c] = valu4 P.Pn f p l c
+ valu _ = malformed
+
+instance EmbPrj TopLevelModuleName where
+ icod_ (TopLevelModuleName a) = icode1' a
+
+ value = vcase valu where
+ valu [a] = valu1 TopLevelModuleName a
+ valu _ = malformed
+
+#if __GLASGOW_HASKELL__ >= 710
+instance {-# OVERLAPPABLE #-} EmbPrj a => EmbPrj [a] where
+#else
+instance EmbPrj a => EmbPrj [a] where
+#endif
+ icod_ xs = icodeN =<< mapM icode xs
+ value = vcase (mapM value)
+-- icode [] = icode0'
+-- icode (x : xs) = icode2' x xs
+-- value = vcase valu where valu [] = valu0 []
+-- valu [x, xs] = valu2 (:) x xs
+-- valu _ = malformed
+
+instance (Ord a, Ord b, EmbPrj a, EmbPrj b) => EmbPrj (BiMap a b) where
+ icod_ m = icode (BiMap.toList m)
+ value m = BiMap.fromList <$> value m
+
+instance (Ord a, EmbPrj a, EmbPrj b) => EmbPrj (Map a b) where
+ icod_ m = icode (Map.toList m)
+ value m = Map.fromList `fmap` value m
+
+instance (Ord a, EmbPrj a) => EmbPrj (Set a) where
+ icod_ s = icode (Set.toList s)
+ value s = Set.fromList `fmap` value s
+
+instance EmbPrj P.Interval where
+ icod_ (P.Interval p q) = icode2' p q
+
+ value = vcase valu where
+ valu [p, q] = valu2 P.Interval p q
+ valu _ = malformed
+
+instance EmbPrj Range where
+ icod_ (P.Range is) = icode1' is
+
+ value = vcase valu where
+ valu [is] = valu1 P.Range is
+ valu _ = malformed
+
+instance EmbPrj C.Name where
+ icod_ (C.NoName a b) = icode2 0 a b
+ icod_ (C.Name r xs) = icode2' r xs
+
+ value = vcase valu where
+ valu [0, a, b] = valu2 C.NoName a b
+ valu [r, xs] = valu2 C.Name r xs
+ valu _ = malformed
+
+instance EmbPrj NamePart where
+ icod_ Hole = icode0'
+ icod_ (Id a) = icode1' a
+
+ value = vcase valu where
+ valu [] = valu0 Hole
+ valu [a] = valu1 Id a
+ valu _ = malformed
+
+instance EmbPrj C.QName where
+ icod_ (Qual a b) = icode2' a b
+ icod_ (C.QName a ) = icode1' a
+
+ value = vcase valu where
+ valu [a, b] = valu2 Qual a b
+ valu [a] = valu1 C.QName a
+ valu _ = malformed
+
+instance EmbPrj Agda.Syntax.Fixity.Associativity where
+ icod_ LeftAssoc = icode0'
+ icod_ RightAssoc = icode0 1
+ icod_ NonAssoc = icode0 2
+
+ value = vcase valu where
+ valu [] = valu0 LeftAssoc
+ valu [1] = valu0 RightAssoc
+ valu [2] = valu0 NonAssoc
+ valu _ = malformed
+
+instance EmbPrj Agda.Syntax.Fixity.Fixity where
+ icod_ (Fixity a b c) = icode3' a b c
+
+ value = vcase valu where
+ valu [a, b, c] = valu3 Fixity a b c
+ valu _ = malformed
+
+instance EmbPrj Agda.Syntax.Fixity.Fixity' where
+ icod_ (Fixity' a b) = icode2' a b
+
+ value = vcase valu where
+ valu [a,b] = valu2 Fixity' a b
+ valu _ = malformed
+
+instance EmbPrj GenPart where
+ icod_ (BindHole a) = icode1 0 a
+ icod_ (NormalHole a) = icode1 1 a
+ icod_ (IdPart a) = icode1' a
+
+ value = vcase valu where
+ valu [0, a] = valu1 BindHole a
+ valu [1, a] = valu1 NormalHole a
+ valu [a] = valu1 IdPart a
+ valu _ = malformed
+
+instance EmbPrj A.QName where
+ icod_ n@(A.QName a b) = icodeMemo qnameD qnameC (qnameId n) $ icode2' a b
+
+ value = vcase valu where
+ valu [a, b] = valu2 A.QName a b
+ valu _ = malformed
+
+instance EmbPrj A.AmbiguousQName where
+ icod_ (A.AmbQ a) = icode a
+ value n = A.AmbQ `fmap` value n
+
+instance EmbPrj A.ModuleName where
+ icod_ (A.MName a) = icode a
+ value n = A.MName `fmap` value n
+
+instance EmbPrj A.Name where
+ icod_ (A.Name a b c d) = icodeMemo nameD nameC a $ icode4' a b c d
+
+ value = vcase valu where
+ valu [a, b, c, d] = valu4 A.Name a b c d
+ valu _ = malformed
+
+instance (EmbPrj s, EmbPrj t) => EmbPrj (Named s t) where
+ icod_ (Named a b) = icode2' a b
+
+ value = vcase valu where
+ valu [a, b] = valu2 Named a b
+ valu _ = malformed
+
+instance EmbPrj a => EmbPrj (Ranged a) where
+ icod_ (Ranged r x) = icode2' r x
+
+ value = vcase valu where
+ valu [r, x] = valu2 Ranged r x
+ valu _ = malformed
+
+instance EmbPrj c => EmbPrj (Common.ArgInfo c) where
+ icod_ (ArgInfo h r cs) = icode3' h r cs
+
+ value = vcase valu where
+ valu [h, r, cs] = valu3 ArgInfo h r cs
+ valu _ = malformed
+
+instance EmbPrj NameId where
+ icod_ (NameId a b) = icode2' a b
+
+ value = vcase valu where
+ valu [a, b] = valu2 NameId a b
+ valu _ = malformed
+
+instance (Eq k, Hashable k, EmbPrj k, EmbPrj v) => EmbPrj (HashMap k v) where
+ icod_ m = icode (HMap.toList m)
+ value m = HMap.fromList `fmap` value m
+
+instance EmbPrj a => EmbPrj (WithHiding a) where
+ icod_ (WithHiding a b) = icode2' a b
+
+ value = vcase valu where
+ valu [a, b] = valu2 WithHiding a b
+ valu _ = malformed
+
+instance (EmbPrj a, EmbPrj c) => EmbPrj (Common.Arg c a) where
+ icod_ (Arg i e) = icode2' i e
+
+ value = vcase valu where
+ valu [i, e] = valu2 Arg i e
+ valu _ = malformed
+
+instance (EmbPrj a, EmbPrj c) => EmbPrj (Common.Dom c a) where
+ icod_ (Dom i e) = icode2' i e
+
+ value = vcase valu where
+ valu [i, e] = valu2 Dom i e
+ valu _ = malformed
+
+instance EmbPrj Common.Induction where
+ icod_ Inductive = icode0'
+ icod_ CoInductive = icode0 1
+
+ value = vcase valu where
+ valu [] = valu0 Inductive
+ valu [1] = valu0 CoInductive
+ valu _ = malformed
+
+instance EmbPrj Common.Hiding where
+ icod_ Hidden = return 0
+ icod_ NotHidden = return 1
+ icod_ Instance = return 2
+
+ value 0 = return Hidden
+ value 1 = return NotHidden
+ value 2 = return Instance
+ value _ = malformed
+
+instance EmbPrj Common.Relevance where
+ icod_ Relevant = return 0
+ icod_ Irrelevant = return 1
+ icod_ (Forced Small) = return 2
+ icod_ (Forced Big) = return 3
+ icod_ NonStrict = return 4
+ icod_ UnusedArg = return 5
+
+ value 0 = return Relevant
+ value 1 = return Irrelevant
+ value 2 = return (Forced Small)
+ value 3 = return (Forced Big)
+ value 4 = return NonStrict
+ value 5 = return UnusedArg
+ value _ = malformed
+
+-- instance EmbPrj Common.Relevance where
+-- icod_ Relevant = icode0'
+-- icod_ Irrelevant = icode0 1
+-- icod_ (Forced Small) = icode0 2
+-- icod_ (Forced Big) = icode0 5
+-- icod_ NonStrict = icode0 3
+-- icod_ UnusedArg = icode0 4
+-- value = vcase valu where valu [] = valu0 Relevant
+-- valu [1] = valu0 Irrelevant
+-- valu [2] = valu0 (Forced Small)
+-- valu [5] = valu0 (Forced Big)
+-- valu [3] = valu0 NonStrict
+-- valu [4] = valu0 UnusedArg
+-- valu _ = malformed
+
+instance EmbPrj ConPOrigin where
+ icod_ ConPImplicit = return 0
+ icod_ ConPCon = return 1
+ icod_ ConPRec = return 2
+
+ value 0 = return ConPImplicit
+ value 1 = return ConPCon
+ value 2 = return ConPRec
+ value _ = malformed
+
+instance EmbPrj Agda.Syntax.Literal.Literal where
+ icod_ (LitInt a b) = icode2' a b
+ icod_ (LitFloat a b) = icode2 1 a b
+ icod_ (LitString a b) = icode2 2 a b
+ icod_ (LitChar a b) = icode2 3 a b
+ icod_ (LitQName a b) = icode2 5 a b
+
+ value = vcase valu where
+ valu [a, b] = valu2 LitInt a b
+ valu [1, a, b] = valu2 LitFloat a b
+ valu [2, a, b] = valu2 LitString a b
+ valu [3, a, b] = valu2 LitChar a b
+ valu [5, a, b] = valu2 LitQName a b
+ valu _ = malformed
+
+instance EmbPrj Common.IsAbstract where
+ icod_ AbstractDef = icode0 0
+ icod_ ConcreteDef = icode0'
+
+ value = vcase valu where
+ valu [0] = valu0 AbstractDef
+ valu [] = valu0 ConcreteDef
+ valu _ = malformed
+
+instance EmbPrj Delayed where
+ icod_ Delayed = icode0 0
+ icod_ NotDelayed = icode0'
+
+ value = vcase valu where
+ valu [0] = valu0 Delayed
+ valu [] = valu0 NotDelayed
+ valu _ = malformed
diff --git a/src/full/Agda/TypeChecking/Serialise/Instances/Compilers.hs b/src/full/Agda/TypeChecking/Serialise/Instances/Compilers.hs
new file mode 100644
index 0000000..5ca7ade
--- /dev/null
+++ b/src/full/Agda/TypeChecking/Serialise/Instances/Compilers.hs
@@ -0,0 +1,126 @@
+{-# OPTIONS_GHC -fno-warn-orphans #-}
+{-# OPTIONS_GHC -fwarn-unused-imports #-}
+
+module Agda.TypeChecking.Serialise.Instances.Compilers where
+
+import qualified Agda.Compiler.Epic.Interface as Epic
+import qualified Agda.Compiler.JS.Syntax as JS
+
+import Agda.TypeChecking.Serialise.Base
+import Agda.TypeChecking.Serialise.Instances.Common ()
+
+import Agda.TypeChecking.Monad
+
+instance EmbPrj HaskellExport where
+ icod_ (HsExport a b) = icode2' a b
+
+ value = vcase valu where
+ valu [a,b] = valu2 HsExport a b
+ valu _ = malformed
+
+instance EmbPrj HaskellRepresentation where
+ icod_ (HsType a) = icode1' a
+ icod_ (HsDefn a b) = icode2' a b
+
+ value = vcase valu where
+ valu [a] = valu1 HsType a
+ valu [a, b] = valu2 HsDefn a b
+ valu _ = malformed
+
+instance EmbPrj CompiledRepresentation where
+ icod_ (CompiledRep a b c d) = icode4' a b c d
+
+ value = vcase valu where
+ valu [a, b, c, d] = valu4 CompiledRep a b c d
+ valu _ = malformed
+
+instance EmbPrj JS.Exp where
+ icod_ (JS.Self) = icode0 0
+ icod_ (JS.Local i) = icode1 1 i
+ icod_ (JS.Global i) = icode1 2 i
+ icod_ (JS.Undefined) = icode0 3
+ icod_ (JS.String s) = icode1 4 s
+ icod_ (JS.Char c) = icode1 5 c
+ icod_ (JS.Integer n) = icode1 6 n
+ icod_ (JS.Double d) = icode1 7 d
+ icod_ (JS.Lambda n e) = icode2 8 n e
+ icod_ (JS.Object o) = icode1 9 o
+ icod_ (JS.Apply e es) = icode2 10 e es
+ icod_ (JS.Lookup e l) = icode2 11 e l
+ icod_ (JS.If e f g) = icode3 12 e f g
+ icod_ (JS.BinOp e op f) = icode3 13 e op f
+ icod_ (JS.PreOp op e) = icode2 14 op e
+ icod_ (JS.Const i) = icode1 15 i
+
+ value = vcase valu where
+ valu [0] = valu0 JS.Self
+ valu [1, a] = valu1 JS.Local a
+ valu [2, a] = valu1 JS.Global a
+ valu [3] = valu0 JS.Undefined
+ valu [4, a] = valu1 JS.String a
+ valu [5, a] = valu1 JS.Char a
+ valu [6, a] = valu1 JS.Integer a
+ valu [7, a] = valu1 JS.Double a
+ valu [8, a, b] = valu2 JS.Lambda a b
+ valu [9, a] = valu1 JS.Object a
+ valu [10, a, b] = valu2 JS.Apply a b
+ valu [11, a, b] = valu2 JS.Lookup a b
+ valu [12, a, b, c] = valu3 JS.If a b c
+ valu [13, a, b, c] = valu3 JS.BinOp a b c
+ valu [14, a, b] = valu2 JS.PreOp a b
+ valu [15, a] = valu1 JS.Const a
+ valu _ = malformed
+
+instance EmbPrj JS.LocalId where
+ icod_ (JS.LocalId l) = icode l
+ value n = JS.LocalId `fmap` value n
+
+instance EmbPrj JS.GlobalId where
+ icod_ (JS.GlobalId l) = icode l
+ value n = JS.GlobalId `fmap` value n
+
+instance EmbPrj JS.MemberId where
+ icod_ (JS.MemberId l) = icode l
+ value n = JS.MemberId `fmap` value n
+
+-- This is used for the Epic compiler backend.
+instance EmbPrj Epic.EInterface where
+ icod_ (Epic.EInterface a b c d e f g h) = icode8' a b c d e f g h
+
+ value = vcase valu where
+ valu [a, b, c, d, e, f, g, h] = valu8 Epic.EInterface a b c d e f g h
+ valu _ = malformed
+
+instance EmbPrj Epic.InjectiveFun where
+ icod_ (Epic.InjectiveFun a b) = icode2' a b
+
+ value = vcase valu where
+ valu [a,b] = valu2 Epic.InjectiveFun a b
+ valu _ = malformed
+
+instance EmbPrj Epic.Relevance where
+ icod_ Epic.Irr = icode0 0
+ icod_ Epic.Rel = icode0 1
+
+ value = vcase valu where
+ valu [0] = valu0 Epic.Irr
+ valu [1] = valu0 Epic.Rel
+ valu _ = malformed
+
+instance EmbPrj Epic.Forced where
+ icod_ Epic.Forced = icode0 0
+ icod_ Epic.NotForced = icode0 1
+
+ value = vcase valu where
+ valu [0] = valu0 Epic.Forced
+ valu [1] = valu0 Epic.NotForced
+ valu _ = malformed
+
+instance EmbPrj Epic.Tag where
+ icod_ (Epic.Tag a) = icode1 0 a
+ icod_ (Epic.PrimTag a) = icode1 1 a
+
+ value = vcase valu where
+ valu [0, a] = valu1 Epic.Tag a
+ valu [1, a] = valu1 Epic.PrimTag a
+ valu _ = malformed
diff --git a/src/full/Agda/TypeChecking/Serialise/Instances/Highlighting.hs b/src/full/Agda/TypeChecking/Serialise/Instances/Highlighting.hs
new file mode 100644
index 0000000..8b12e07
--- /dev/null
+++ b/src/full/Agda/TypeChecking/Serialise/Instances/Highlighting.hs
@@ -0,0 +1,93 @@
+{-# OPTIONS_GHC -fno-warn-orphans #-}
+
+module Agda.TypeChecking.Serialise.Instances.Highlighting where
+
+import qualified Agda.Interaction.Highlighting.Range as HR
+import qualified Agda.Interaction.Highlighting.Precise as HP
+
+import Agda.TypeChecking.Serialise.Base
+import Agda.TypeChecking.Serialise.Instances.Common ()
+
+instance EmbPrj HR.Range where
+ icod_ (HR.Range a b) = icode2' a b
+
+ value = vcase valu where
+ valu [a, b] = valu2 HR.Range a b
+ valu _ = malformed
+
+instance EmbPrj HP.NameKind where
+ icod_ HP.Bound = icode0'
+ icod_ (HP.Constructor a) = icode1 1 a
+ icod_ HP.Datatype = icode0 2
+ icod_ HP.Field = icode0 3
+ icod_ HP.Function = icode0 4
+ icod_ HP.Module = icode0 5
+ icod_ HP.Postulate = icode0 6
+ icod_ HP.Primitive = icode0 7
+ icod_ HP.Record = icode0 8
+ icod_ HP.Argument = icode0 9
+
+ value = vcase valu where
+ valu [] = valu0 HP.Bound
+ valu [1 , a] = valu1 HP.Constructor a
+ valu [2] = valu0 HP.Datatype
+ valu [3] = valu0 HP.Field
+ valu [4] = valu0 HP.Function
+ valu [5] = valu0 HP.Module
+ valu [6] = valu0 HP.Postulate
+ valu [7] = valu0 HP.Primitive
+ valu [8] = valu0 HP.Record
+ valu [9] = valu0 HP.Argument
+ valu _ = malformed
+
+instance EmbPrj HP.Aspect where
+ icod_ HP.Comment = icode0 0
+ icod_ HP.Keyword = icode0 1
+ icod_ HP.String = icode0 2
+ icod_ HP.Number = icode0 3
+ icod_ HP.Symbol = icode0'
+ icod_ HP.PrimitiveType = icode0 5
+ icod_ (HP.Name mk b) = icode2 6 mk b
+
+ value = vcase valu where
+ valu [0] = valu0 HP.Comment
+ valu [1] = valu0 HP.Keyword
+ valu [2] = valu0 HP.String
+ valu [3] = valu0 HP.Number
+ valu [] = valu0 HP.Symbol
+ valu [5] = valu0 HP.PrimitiveType
+ valu [6, mk, b] = valu2 HP.Name mk b
+ valu _ = malformed
+
+instance EmbPrj HP.OtherAspect where
+ icod_ HP.Error = icode0 0
+ icod_ HP.DottedPattern = icode0'
+ icod_ HP.UnsolvedMeta = icode0 2
+ icod_ HP.TerminationProblem = icode0 3
+ icod_ HP.IncompletePattern = icode0 4
+ icod_ HP.TypeChecks = icode0 5
+ icod_ HP.UnsolvedConstraint = icode0 6
+
+ value = vcase valu where
+ valu [0] = valu0 HP.Error
+ valu [] = valu0 HP.DottedPattern
+ valu [2] = valu0 HP.UnsolvedMeta
+ valu [3] = valu0 HP.TerminationProblem
+ valu [4] = valu0 HP.IncompletePattern
+ valu [5] = valu0 HP.TypeChecks
+ valu [6] = valu0 HP.UnsolvedConstraint
+ valu _ = malformed
+
+instance EmbPrj HP.Aspects where
+ icod_ (HP.Aspects a b c d) = icode4' a b c d
+
+ value = vcase valu where
+ valu [a, b, c, d] = valu4 HP.Aspects a b c d
+ valu _ = malformed
+
+instance EmbPrj HP.CompressedFile where
+ icod_ (HP.CompressedFile f) = icode1' f
+
+ value = vcase valu where
+ valu [f] = valu1 HP.CompressedFile f
+ valu _ = malformed
diff --git a/src/full/Agda/TypeChecking/Serialise/Instances/Internal.hs b/src/full/Agda/TypeChecking/Serialise/Instances/Internal.hs
new file mode 100644
index 0000000..a4c5ee9
--- /dev/null
+++ b/src/full/Agda/TypeChecking/Serialise/Instances/Internal.hs
@@ -0,0 +1,418 @@
+{-# LANGUAGE CPP #-}
+
+{-# OPTIONS_GHC -fno-warn-orphans #-}
+
+module Agda.TypeChecking.Serialise.Instances.Internal where
+
+import Control.Applicative
+import Control.Monad.State.Strict
+
+import Agda.Syntax.Internal as I
+import Agda.Syntax.Position as P
+
+import Agda.TypeChecking.Serialise.Base
+import Agda.TypeChecking.Serialise.Instances.Common ()
+import Agda.TypeChecking.Serialise.Instances.Compilers ()
+
+import Agda.TypeChecking.Monad
+import Agda.TypeChecking.CompiledClause
+import Agda.TypeChecking.Positivity.Occurrence
+
+import Agda.Utils.Permutation
+
+#include "undefined.h"
+import Agda.Utils.Impossible
+
+instance EmbPrj Signature where
+ icod_ (Sig a b c) = icode3' a b c
+
+ value = vcase valu where
+ valu [a, b, c] = valu3 Sig a b c
+ valu _ = malformed
+
+instance EmbPrj Section where
+ icod_ (Section a) = icode1' a
+
+ value = vcase valu where
+ valu [a] = valu1 Section a
+ valu _ = malformed
+
+instance EmbPrj a => EmbPrj (Tele a) where
+ icod_ EmptyTel = icode0'
+ icod_ (ExtendTel a b) = icode2' a b
+
+ value = vcase valu where
+ valu [] = valu0 EmptyTel
+ valu [a, b] = valu2 ExtendTel a b
+ valu _ = malformed
+
+instance EmbPrj Permutation where
+ icod_ (Perm a b) = icode2' a b
+
+ value = vcase valu where
+ valu [a, b] = valu2 Perm a b
+ valu _ = malformed
+
+instance EmbPrj a => EmbPrj (Drop a) where
+ icod_ (Drop a b) = icode2' a b
+
+ value = vcase valu where
+ valu [a, b] = valu2 Drop a b
+ valu _ = malformed
+
+instance EmbPrj a => EmbPrj (Elim' a) where
+ icod_ (Apply a) = icode1' a
+ icod_ (Proj a) = icode1 0 a
+
+ value = vcase valu where
+ valu [a] = valu1 Apply a
+ valu [0, a] = valu1 Proj a
+ valu _ = malformed
+
+instance EmbPrj I.ConHead where
+ icod_ (ConHead a b c) = icode3' a b c
+
+ value = vcase valu where
+ valu [a, b, c] = valu3 ConHead a b c
+ valu _ = malformed
+
+instance (EmbPrj a) => EmbPrj (I.Type' a) where
+ icod_ (El a b) = icode2' a b
+
+ value = vcase valu where
+ valu [a, b] = valu2 El a b
+ valu _ = malformed
+
+instance (EmbPrj a) => EmbPrj (I.Abs a) where
+ icod_ (NoAbs a b) = icode2 0 a b
+ icod_ (Abs a b) = icode2' a b
+
+ value = vcase valu where
+ valu [a, b] = valu2 Abs a b
+ valu [0, a, b] = valu2 NoAbs a b
+ valu _ = malformed
+
+instance EmbPrj I.Term where
+ icod_ (Var a []) = icode1' a
+ icod_ (Var a b) = icode2 0 a b
+ icod_ (Lam a b) = icode2 1 a b
+ icod_ (Lit a ) = icode1 2 a
+ icod_ (Def a b) = icode2 3 a b
+ icod_ (Con a b) = icode2 4 a b
+ icod_ (Pi a b) = icode2 5 a b
+ icod_ (Sort a ) = icode1 7 a
+ icod_ (MetaV a b) = __IMPOSSIBLE__
+ icod_ ExtLam{} = __IMPOSSIBLE__
+ icod_ (DontCare a ) = icode1 8 a
+ icod_ (Level a ) = icode1 9 a
+ icod_ (Shared p) = icodeMemo termD termC p $ icode (derefPtr p)
+
+ value r = vcase valu' r where
+ valu' xs = shared <$> valu xs
+ valu [a] = valu1 var a
+ valu [0, a, b] = valu2 Var a b
+ valu [1, a, b] = valu2 Lam a b
+ valu [2, a] = valu1 Lit a
+ valu [3, a, b] = valu2 Def a b
+ valu [4, a, b] = valu2 Con a b
+ valu [5, a, b] = valu2 Pi a b
+ valu [7, a] = valu1 Sort a
+ valu [8, a] = valu1 DontCare a
+ valu [9, a] = valu1 Level a
+ valu _ = malformed
+
+instance EmbPrj Level where
+ icod_ (Max a) = icode1' a
+
+ value = vcase valu where
+ valu [a] = valu1 Max a
+ valu _ = malformed
+
+instance EmbPrj PlusLevel where
+ icod_ (ClosedLevel a) = icode1' a
+ icod_ (Plus a b) = icode2' a b
+
+ value = vcase valu where
+ valu [a] = valu1 ClosedLevel a
+ valu [a, b] = valu2 Plus a b
+ valu _ = malformed
+
+instance EmbPrj LevelAtom where
+ icod_ (NeutralLevel _ a) = icode1' a
+ icod_ (UnreducedLevel a) = icode1 1 a
+ icod_ MetaLevel{} = __IMPOSSIBLE__
+ icod_ BlockedLevel{} = __IMPOSSIBLE__
+
+ value = vcase valu where
+ valu [a] = valu1 UnreducedLevel a -- we forget that we are a NeutralLevel,
+ -- since we do not want do (de)serialize
+ -- the reason for neutrality
+ valu [1, a] = valu1 UnreducedLevel a
+ valu _ = malformed
+
+instance EmbPrj I.Sort where
+ icod_ (Type a ) = icode1' a
+ icod_ Prop = icode1 1 ()
+ icod_ SizeUniv = icode1 3 ()
+ icod_ Inf = icode1 4 ()
+ icod_ (DLub a b) = __IMPOSSIBLE__
+
+ value = vcase valu where
+ valu [a] = valu1 Type a
+ valu [1, _] = valu0 Prop
+ valu [3, _] = valu0 SizeUniv
+ valu [4, _] = valu0 Inf
+ valu _ = malformed
+
+instance EmbPrj DisplayForm where
+ icod_ (Display a b c) = icode3' a b c
+
+ value = vcase valu where
+ valu [a, b, c] = valu3 Display a b c
+ valu _ = malformed
+
+instance EmbPrj a => EmbPrj (Open a) where
+ icod_ (OpenThing a b) = icode2' a b
+
+ value = vcase valu where
+ valu [a, b] = valu2 OpenThing a b
+ valu _ = malformed
+
+instance EmbPrj CtxId where
+ icod_ (CtxId a) = icode a
+ value n = CtxId `fmap` value n
+
+instance EmbPrj DisplayTerm where
+ icod_ (DTerm a ) = icode1' a
+ icod_ (DDot a ) = icode1 1 a
+ icod_ (DCon a b) = icode2 2 a b
+ icod_ (DDef a b) = icode2 3 a b
+ icod_ (DWithApp a b c) = icode3 4 a b c
+
+ value = vcase valu where
+ valu [a] = valu1 DTerm a
+ valu [1, a] = valu1 DDot a
+ valu [2, a, b] = valu2 DCon a b
+ valu [3, a, b] = valu2 DDef a b
+ valu [4, a, b, c] = valu3 DWithApp a b c
+ valu _ = malformed
+
+instance EmbPrj MutualId where
+ icod_ (MutId a) = icode a
+ value n = MutId `fmap` value n
+
+instance EmbPrj Definition where
+ icod_ (Defn rel a b c d e f g h i) = icode10' rel a (P.killRange b) c d e f g h i
+
+ value = vcase valu where
+ valu [rel, a, b, c, d, e, f, g, h, i] = valu10 Defn rel a b c d e f g h i
+ valu _ = malformed
+
+instance EmbPrj NLPat where
+ icod_ (PVar a) = icode1 0 a
+ icod_ (PWild) = icode0 1
+ icod_ (PDef a b) = icode2 2 a b
+ icod_ (PLam a b) = icode2 3 a b
+ icod_ (PPi a b) = icode2 4 a b
+ icod_ (PBoundVar a b) = icode2 5 a b
+ icod_ (PTerm a) = icode1 6 a
+
+ value = vcase valu where
+ valu [0, a] = valu1 PVar a
+ valu [1] = valu0 PWild
+ valu [2, a, b] = valu2 PDef a b
+ valu [3, a, b] = valu2 PLam a b
+ valu [4, a, b] = valu2 PPi a b
+ valu [5, a, b] = valu2 PBoundVar a b
+ valu [6, a] = valu1 PTerm a
+ valu _ = malformed
+
+instance EmbPrj RewriteRule where
+ icod_ (RewriteRule a b c d e) = icode5' a b c d e
+
+ value = vcase valu where
+ valu [a, b, c, d, e] = valu5 RewriteRule a b c d e
+ valu _ = malformed
+
+instance EmbPrj Projection where
+ icod_ (Projection a b c d e) = icode5' a b c d e
+
+ value = vcase valu where
+ valu [a, b, c, d, e] = valu5 Projection a b c d e
+ valu _ = malformed
+
+instance EmbPrj ExtLamInfo where
+ icod_ (ExtLamInfo a b) = icode2' a b
+
+ value = vcase valu where
+ valu [a, b] = valu2 ExtLamInfo a b
+ valu _ = malformed
+
+instance EmbPrj Polarity where
+ icod_ Covariant = return 0
+ icod_ Contravariant = return 1
+ icod_ Invariant = return 2
+ icod_ Nonvariant = return 3
+
+ value 0 = return Covariant
+ value 1 = return Contravariant
+ value 2 = return Invariant
+ value 3 = return Nonvariant
+ value _ = malformed
+
+-- instance EmbPrj Polarity where
+-- icod_ Covariant = icode0'
+-- icod_ Contravariant = icode0 1
+-- icod_ Invariant = icode0 2
+-- icod_ Nonvariant = icode0 3
+
+-- value = vcase valu where
+-- valu [] = valu0 Covariant
+-- valu [1] = valu0 Contravariant
+-- valu [2] = valu0 Invariant
+-- valu [3] = valu0 Nonvariant
+-- valu _ = malformed
+
+instance EmbPrj Occurrence where
+ icod_ StrictPos = return 0
+ icod_ Mixed = return 1
+ icod_ Unused = return 2
+ icod_ GuardPos = return 3
+ icod_ JustPos = return 4
+ icod_ JustNeg = return 5
+
+ value 0 = return StrictPos
+ value 1 = return Mixed
+ value 2 = return Unused
+ value 3 = return GuardPos
+ value 4 = return JustPos
+ value 5 = return JustNeg
+ value _ = malformed
+
+-- instance EmbPrj Occurrence where
+-- icod_ StrictPos = icode0'
+-- icod_ Mixed = icode0 1
+-- icod_ Unused = icode0 2
+-- icod_ GuardPos = icode0 3
+-- icod_ JustPos = icode0 4
+-- icod_ JustNeg = icode0 5
+
+-- value = vcase valu where
+-- valu [] = valu0 StrictPos
+-- valu [1] = valu0 Mixed
+-- valu [2] = valu0 Unused
+-- valu [3] = valu0 GuardPos
+-- valu [4] = valu0 JustPos
+-- valu [5] = valu0 JustNeg
+-- valu _ = malformed
+
+instance EmbPrj Defn where
+ icod_ Axiom = icode0 0
+ icod_ (Function a b c d e f g h i j k l m) = icode13 1 a b c d e f g h i j k l m
+ icod_ (Datatype a b c d e f g h i j) = icode10 2 a b c d e f g h i j
+ icod_ (Record a b c d e f g h i j k l) = icode12 3 a b c d e f g h i j k l
+ icod_ (Constructor a b c d e) = icode5 4 a b c d e
+ icod_ (Primitive a b c d) = icode4 5 a b c d
+
+ value = vcase valu where
+ valu [0] = valu0 Axiom
+ valu [1, a, b, c, d, e, f, g, h, i, j, k, l, m] = valu13 Function a b c d e f g h i j k l m
+ valu [2, a, b, c, d, e, f, g, h, i, j] = valu10 Datatype a b c d e f g h i j
+ valu [3, a, b, c, d, e, f, g, h, i, j, k, l] = valu12 Record a b c d e f g h i j k l
+ valu [4, a, b, c, d, e] = valu5 Constructor a b c d e
+ valu [5, a, b, c, d] = valu4 Primitive a b c d
+ valu _ = malformed
+
+instance EmbPrj a => EmbPrj (WithArity a) where
+ icod_ (WithArity a b) = icode2' a b
+
+ value = vcase valu where
+ valu [a, b] = valu2 WithArity a b
+ valu _ = malformed
+
+instance EmbPrj a => EmbPrj (Case a) where
+ icod_ (Branches a b c d) = icode4' a b c d
+
+ value = vcase valu where
+ valu [a, b, c, d] = valu4 Branches a b c d
+ valu _ = malformed
+
+instance EmbPrj CompiledClauses where
+ icod_ Fail = icode0'
+ icod_ (Done a b) = icode2' a (P.killRange b)
+ icod_ (Case a b) = icode2 2 a b
+
+ value = vcase valu where
+ valu [] = valu0 Fail
+ valu [a, b] = valu2 Done a b
+ valu [2, a, b] = valu2 Case a b
+ valu _ = malformed
+
+instance EmbPrj a => EmbPrj (FunctionInverse' a) where
+ icod_ NotInjective = icode0'
+ icod_ (Inverse a) = icode1' a
+
+ value = vcase valu where
+ valu [] = valu0 NotInjective
+ valu [a] = valu1 Inverse a
+ valu _ = malformed
+
+instance EmbPrj TermHead where
+ icod_ SortHead = icode0'
+ icod_ PiHead = icode0 1
+ icod_ (ConsHead a) = icode1 2 a
+
+ value = vcase valu where
+ valu [] = valu0 SortHead
+ valu [1] = valu0 PiHead
+ valu [2, a] = valu1 ConsHead a
+ valu _ = malformed
+
+instance EmbPrj I.Clause where
+ icod_ (Clause a b c d e f) = icode6' a b c d e f
+
+ value = vcase valu where
+ valu [a, b, c, d, e, f] = valu6 Clause a b c d e f
+ valu _ = malformed
+
+instance EmbPrj a => EmbPrj (I.ClauseBodyF a) where
+ icod_ (Body a) = icode1 0 a
+ icod_ (Bind a) = icode1' a
+ icod_ NoBody = icode0'
+
+ value = vcase valu where
+ valu [0, a] = valu1 Body a
+ valu [a] = valu1 Bind a
+ valu [] = valu0 NoBody
+ valu _ = malformed
+
+instance EmbPrj I.ConPatternInfo where
+ icod_ (ConPatternInfo a b) = icode2' a b
+
+ value = vcase valu where
+ valu [a, b] = valu2 ConPatternInfo a b
+ valu _ = malformed
+
+instance EmbPrj a => EmbPrj (I.Pattern' a) where
+ icod_ (VarP a ) = icode1' a
+ icod_ (ConP a b c) = icode3' a b c
+ icod_ (LitP a ) = icode1 2 a
+ icod_ (DotP a ) = icode1 3 a
+ icod_ (ProjP a ) = icode1 4 a
+
+ value = vcase valu where
+ valu [a] = valu1 VarP a
+ valu [a, b, c] = valu3 ConP a b c
+ valu [2, a] = valu1 LitP a
+ valu [3, a] = valu1 DotP a
+ valu [4, a] = valu1 ProjP a
+ valu _ = malformed
+
+instance EmbPrj a => EmbPrj (Builtin a) where
+ icod_ (Prim a) = icode1' a
+ icod_ (Builtin a) = icode1 1 a
+
+ value = vcase valu where
+ valu [a] = valu1 Prim a
+ valu [1, a] = valu1 Builtin a
+ valu _ = malformed
diff --git a/src/full/Agda/TypeChecking/Substitute.hs b/src/full/Agda/TypeChecking/Substitute.hs
index 3931abd..72a7f62 100644
--- a/src/full/Agda/TypeChecking/Substitute.hs
+++ b/src/full/Agda/TypeChecking/Substitute.hs
@@ -165,8 +165,14 @@ instance Apply Definition where
Defn info x (piApply t args) (apply pol args) (apply occ args) df m c inst (apply d args)
instance Apply RewriteRule where
- apply (RewriteRule q gamma lhs rhs t) args =
- RewriteRule q (apply gamma args) lhs rhs t
+ apply r args = RewriteRule
+ { rewName = rewName r
+ , rewContext = apply (rewContext r) args
+ , rewLHS = applySubst sub (rewLHS r)
+ , rewRHS = applySubst sub (rewRHS r)
+ , rewType = applySubst sub (rewType r)
+ }
+ where sub = parallelS (map unArg args)
#if __GLASGOW_HASKELL__ >= 710
instance {-# OVERLAPPING #-} Apply [Occ.Occurrence] where
@@ -611,6 +617,12 @@ parallelS us = us ++# idS
compactS :: Empty -> [Maybe Term] -> Substitution
compactS err us = prependS err us idS
+-- | Γ ⊢ (strengthenS ⊥ |Δ|) : Γ,Δ
+strengthenS :: Empty -> Int -> Substitution
+strengthenS err n
+ | n < 0 = __IMPOSSIBLE__
+ | otherwise = iterate (Strengthen err) idS !! n
+
lookupS :: Substitution -> Nat -> Term
lookupS rho i = case rho of
IdS -> var i
@@ -869,9 +881,17 @@ bindsWithHidingToTel' f (WithHiding h x : xs) t =
bindsWithHidingToTel :: [WithHiding Name] -> Dom Type -> ListTel
bindsWithHidingToTel = bindsWithHidingToTel' nameToArgName
+-- | Takes off all exposed function domains from the given type.
+-- This means that it does not reduce to expose @Pi@-types.
telView' :: Type -> TelView
-telView' t = case ignoreSharing $ unEl t of
- Pi a b -> absV a (absName b) $ telView' (absBody b)
+telView' = telView'UpTo (-1)
+
+-- | @telView'UpTo n t@ takes off the first @n@ exposed function types of @t@.
+-- Takes off all (exposed ones) if @n < 0@.
+telView'UpTo :: Int -> Type -> TelView
+telView'UpTo 0 t = TelV EmptyTel t
+telView'UpTo n t = case ignoreSharing $ unEl t of
+ Pi a b -> absV a (absName b) $ telView'UpTo (n - 1) (absBody b)
_ -> TelV EmptyTel t
where
absV a x (TelV tel t) = TelV (ExtendTel a (Abs x tel)) t
@@ -1059,6 +1079,7 @@ deriving instance (Subst a, Eq a) => Eq (Tele a)
deriving instance (Subst a, Ord a) => Ord (Tele a)
deriving instance Eq Constraint
+deriving instance Eq Section
instance Ord PlusLevel where
compare ClosedLevel{} Plus{} = LT
diff --git a/src/full/Agda/TypeChecking/With.hs b/src/full/Agda/TypeChecking/With.hs
index ef2623b..db7cd6e 100644
--- a/src/full/Agda/TypeChecking/With.hs
+++ b/src/full/Agda/TypeChecking/With.hs
@@ -1,5 +1,6 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE PatternGuards #-}
+{-# LANGUAGE TupleSections #-}
module Agda.TypeChecking.With where
@@ -23,6 +24,7 @@ import Agda.TypeChecking.Monad
import Agda.TypeChecking.Reduce
import Agda.TypeChecking.Datatypes
import Agda.TypeChecking.EtaContract
+import Agda.TypeChecking.Free
import Agda.TypeChecking.Patterns.Abstract
import Agda.TypeChecking.Pretty
import Agda.TypeChecking.Records
@@ -37,39 +39,197 @@ import Agda.Utils.Functor
import Agda.Utils.List
import Agda.Utils.Monad
import Agda.Utils.Permutation
+import Agda.Utils.Pretty (prettyShow)
import Agda.Utils.Size
#include "undefined.h"
import Agda.Utils.Impossible
-withFunctionType :: Telescope -> [Term] -> [Type] -> Telescope -> Type -> TCM Type
-withFunctionType delta1 vs as delta2 b = {-dontEtaContractImplicit $-} do
- (vas, b) <- addCtxTel delta1 $ do
- reportSLn "tc.with.abstract" 20 $ "preparing for with-abstraction"
+
+-- | Split pattern variables according to with-expressions.
+
+-- Input:
+--
+-- [@Δ@] context of types and with-arguments.
+--
+-- [@Δ ⊢ t@] type of rhs.
+--
+-- [@Δ ⊢ as@] types of with arguments.
+--
+-- [@Δ ⊢ vs@] with arguments.
+--
+--
+-- Output:
+--
+-- [@Δ₁@] part of context not needed for with arguments and their types.
+--
+-- [@Δ₂@] part of context needed for with arguments and their types.
+--
+-- [@π@] permutation from Δ to Δ₁Δ₂ as returned by 'splitTelescope'.
+--
+-- [@Δ₁Δ₂ ⊢ t'@] type of rhs under @π@
+--
+-- [@Δ₁ ⊢ as'@] types with with-arguments depending only on @Δ₁@.
+--
+-- [@Δ₁ ⊢ vs'@] with-arguments under @π@.
+
+splitTelForWith
+ -- Input:
+ :: Telescope -- ^ __@Δ@__ context of types and with-arguments.
+ -> Type -- ^ __@Δ ⊢ t@__ type of rhs.
+ -> [Type] -- ^ __@Δ ⊢ as@__ types of with arguments.
+ -> [Term] -- ^ __@Δ ⊢ vs@__ with arguments.
+ -- Output:
+ -> ( Telescope -- @Δ₁@ part of context not needed for with arguments and their types.
+ , Telescope -- @Δ₂@ part of context needed for with arguments and their types.
+ , Permutation -- @π@ permutation from Δ to Δ₁Δ₂ as returned by 'splitTelescope'.
+ , Type -- @Δ₁Δ₂ ⊢ t'@ type of rhs under @π@
+ , [Type] -- @Δ₁ ⊢ as'@ types with with-arguments depending only on @Δ₁@.
+ , [Term] -- @Δ₁ ⊢ vs'@ with-arguments under @π@.
+ ) -- ^ (__@Δ₁@__,__@Δ₂@__,__@π@__,__@t'@__,__@as'@__,__@vs'@__) where
+--
+-- [@Δ₁@] part of context not needed for with arguments and their types.
+--
+-- [@Δ₂@] part of context needed for with arguments and their types.
+--
+-- [@π@] permutation from Δ to Δ₁Δ₂ as returned by 'splitTelescope'.
+--
+-- [@Δ₁Δ₂ ⊢ t'@] type of rhs under @π@
+--
+-- [@Δ₁ ⊢ as'@] types with with-arguments depending only on @Δ₁@.
+--
+-- [@Δ₁ ⊢ vs'@] with-arguments under @π@.
+
+splitTelForWith delta t as vs = let
+ -- Split the telescope into the part needed to type the with arguments
+ -- and all the other stuff
+ fv = allFreeVars as
+ SplitTel delta1 delta2 perm = splitTelescope fv delta
+
+ -- Δ₁Δ₂ ⊢ π : Δ
+ pi = renaming (reverseP perm)
+ -- Δ₁ ⊢ ρ : Δ₁Δ₂ (We know that as does not depend on Δ₂.)
+ rho = strengthenS __IMPOSSIBLE__ $ size delta2
+ -- Δ₁ ⊢ ρ ∘ π : Δ
+ rhopi = composeS rho pi
+
+ -- We need Δ₁Δ₂ ⊢ t'
+ t' = applySubst pi t
+ -- and Δ₁ ⊢ as'
+ as' = applySubst rhopi as
+ -- and Δ₁ ⊢ vs' : as'
+ vs' = applySubst pi vs
+
+ in (delta1, delta2, perm, t', as', vs')
+
+
+-- | Abstract with-expressions @vs@ to generate type for with-helper function.
+
+withFunctionType
+ :: Telescope -- ^ @Δ₁@ context for types of with types.
+ -> [Term] -- ^ @Δ₁,Δ₂ ⊢ vs : raise Δ₂ as@ with-expressions.
+ -> [Type] -- ^ @Δ₁ ⊢ as@ types of with-expressions.
+ -> Telescope -- ^ @Δ₁ ⊢ Δ₂@ context extension to type with-expressions.
+ -> Type -- ^ @Δ₁,Δ₂ ⊢ b@ type of rhs.
+ -> TCM Type -- ^ @Δ₁ → wtel → Δ₂′ → b′@ such that
+ -- @[vs/wtel]wtel = as@ and
+ -- @[vs/wtel]Δ₂′ = Δ₂@ and
+ -- @[vs/wtel]b′ = b@.
+
+withFunctionType delta1 vs as delta2 b = addCtxTel delta1 $ do
+
+ -- Normalize and η-contract the types @as@ of the with-expressions.
+
+ reportSLn "tc.with.abstract" 20 $ "preparing for with-abstraction"
+ as <- etaContract =<< normalise as
+ reportSDoc "tc.with.abstract" 20 $ text " as = " <+> prettyTCM as
+
+ -- Normalize and η-contract the type @b@ of the rhs and the types @delta2@
+ -- of the pattern variables not mentioned in @as@.
+
+ d2b <- return $ telePi_ delta2 b
+ reportSDoc "tc.with.abstract" 30 $ text "normalizing d2b = " <+> prettyTCM d2b
+ d2b <- normalise d2b
+ reportSDoc "tc.with.abstract" 30 $ text "eta-contracting d2b = " <+> prettyTCM d2b
+ d2b <- etaContract d2b
+ reportSDoc "tc.with.abstract" 20 $ text " d2b = " <+> prettyTCM d2b
+ let n2 = size delta2
+ TelV delta2 b <- telViewUpTo n2 d2b
+
+ addContext delta2 $ do
+
+ -- Normalize and η-contract the with-expressions @vs@.
+
vs <- etaContract =<< normalise vs
reportSDoc "tc.with.abstract" 20 $ text " vs = " <+> prettyTCM vs
- as <- etaContract =<< normalise as
- reportSDoc "tc.with.abstract" 20 $ text " as = " <+> prettyTCM as
- b <- return $ telePi_ delta2 b
- reportSDoc "tc.with.abstract" 30 $ text "normalizing b = " <+> prettyTCM b
- b <- normalise b
- reportSDoc "tc.with.abstract" 30 $ text "eta-contracting b = " <+> prettyTCM b
- b <- etaContract b
- reportSDoc "tc.with.abstract" 20 $ text " b = " <+> prettyTCM b
reportSDoc "tc.with.abstract" 40 $
sep [ text "abstracting"
, nest 2 $ vcat $
- [ text "vs = " <+> prettyTCM vs
- , text "as = " <+> prettyTCM as
- , text "b = " <+> prettyTCM b ]
+ [ text "vs = " <+> prettyTCM vs
+ , text "as = " <+> escapeContext n2 (prettyTCM as)
+ , text "delta2 = " <+> escapeContext n2 (prettyTCM delta2)
+ , text "b = " <+> prettyTCM b ]
]
reportSLn "tc.with.abstract" 50 $ " raw vs = " ++ show vs ++ "\n raw b = " ++ show b
- return (zip vs as, b)
- return $ telePi_ delta1 $ foldr (uncurry piAbstractTerm) b vas
+
+ -- Abstract in @b@ and in @as@, generating @wtel@ and @b'@.
+ -----------------------------------------------------------
+
+ -- Δ₁, Δ₂ ⊢ wtel0
+ -- Δ₁, Δ₂, wtel0 ⊢ b0
+ let TelV wtel0 b0 = telView'UpTo (size as) $
+ foldr (uncurry piAbstractTerm) b $ zip vs $ raise n2 as
+
+ -- We know the types in wtel0 (abstracted versions of @as@) do not depend on Δ₂.
+ -- Δ₁ ⊢ wtel
+ let wtel = applySubst (strengthenS __IMPOSSIBLE__ n2) wtel0
+
+ -- Δ₁, Δ₂, wtel ⊢ ρ : Δ₁, wtel, Δ₂
+ let m = n2 + size wtel
+ let rho = (map var $ [n2..m-1] ++ [0..n2-1]) ++# raiseS m
+
+ -- Using ρ, swap the variables of wtel and Δ₂ to get
+ -- Δ₁, wtel, Δ₂ ⊢ b'
+ let b' = applySubst rho b0
+
+ -- Abstract in @Δ₂@ to get @Δ₁, wtel ⊢ Δ₂′@.
+ ------------------------------------------
+
+ -- Δ₁, Δ₂ ⊢ Δ₂flat
+ let delta2flat = flattenTel delta2
+
+ let abstrvs t = foldl (flip abstractTerm) t $ zipWith raise [0..] vs
+ -- Δ₁, Δ₂, wtel ⊢ Δ₂abs
+ let delta2abs = abstrvs delta2flat
+
+ -- Δ₁, wtel, Δ₂ ⊢ Δ₂flat'
+ let delta2flat' = applySubst rho delta2abs
+
+ -- Δ₁, wtel ⊢ Δ₂′
+ let delta2' = unflattenTel (teleNames delta2) delta2flat'
+
+ -- Assemble final type of with-function.
+ ----------------------------------------
+
+ let ty = telePi_ delta1 $ telePi_ wtel $ telePi_ delta2' b'
+ reportSDoc "tc.with.abstract" 20 $ sep $
+ [ text "finished with-abstraction"
+ , text " wtel0 = " <+> prettyTCM wtel0
+ , text " wtel = " <+> do escapeContext n2 $ prettyTCM wtel
+ , text " b0 = " <+> addContext wtel (prettyTCM b0)
+ , text " b' = " <+> do escapeContext n2 $ addContext wtel $ addContext delta2 $ prettyTCM b'
+ , text " delta2flat = " <+> prettyTCM delta2flat
+ , text " delta2flat' = " <+> do addContext wtel $ prettyTCM delta2flat'
+ , text " delta2' = " <+> do escapeContext n2 $ addContext wtel $ prettyTCM delta2'
+ , text " ty = " <+> do escapeContext n2 $ escapeContext (size delta1) $ prettyTCM delta2'
+ ]
+ return ty
+
-- | Compute the clauses for the with-function given the original patterns.
buildWithFunction
- :: QName -- ^ Name of the with-function.
+ :: QName -- ^ Name of the parent function.
+ -> QName -- ^ Name of the with-function.
-> Type -- ^ Types of the parent function.
-> [I.NamedArg Pattern] -- ^ Parent patterns.
-> Permutation -- ^ Final permutation.
@@ -77,13 +237,13 @@ buildWithFunction
-> Nat -- ^ Number of with expressions.
-> [A.SpineClause] -- ^ With-clauses.
-> TCM [A.SpineClause] -- ^ With-clauses flattened wrt. parent patterns.
-buildWithFunction aux t qs perm n1 n cs = mapM buildWithClause cs
+buildWithFunction f aux t qs perm n1 n cs = mapM buildWithClause cs
where
buildWithClause (A.Clause (A.SpineLHS i _ ps wps) rhs wh) = do
let (wps0, wps1) = genericSplitAt n wps
ps0 = map defaultNamedArg wps0
rhs <- buildRHS rhs
- (ps1, ps2) <- genericSplitAt n1 <$> stripWithClausePatterns aux t qs perm ps
+ (ps1, ps2) <- genericSplitAt n1 <$> stripWithClausePatterns f aux t qs perm ps
let result = A.Clause (A.SpineLHS i aux (ps1 ++ ps0 ++ ps2) wps1) rhs wh
reportSDoc "tc.with" 20 $ vcat
[ text "buildWithClause returns" <+> prettyA result
@@ -96,23 +256,24 @@ buildWithFunction aux t qs perm n1 n cs = mapM buildWithClause cs
mapM (A.spineToLhs <.> buildWithClause . A.lhsToSpine) cs
buildRHS (A.RewriteRHS qes rhs wh) = flip (A.RewriteRHS qes) wh <$> buildRHS rhs
-{-| @stripWithClausePatterns f t qs π ps = ps'@
+{-| @stripWithClausePatterns parent f t qs π ps = ps'@
- @Δ@ - context bound by lhs of original function (not an argument)
+[@Δ@] context bound by lhs of original function (not an argument).
- @f@ - name of with-function
+[@f@] name of @with@-function.
- @t@ - type of the original function
+[@t@] type of the original function.
- @qs@ - internal patterns for original function
+[@qs@] internal patterns for original function.
- @π@ - permutation taking @vars(qs)@ to @support(Δ)@
+[@π@] permutation taking @vars(qs)@ to @support(Δ)@.
- @ps@ - patterns in with clause (eliminating type @t@)
+[@ps@] patterns in with clause (eliminating type @t@).
- @ps'@ - patterns for with function (presumably of type @Δ@)
+[@ps'@] patterns for with function (presumably of type @Δ@).
Example:
+
@
record Stream (A : Set) : Set where
coinductive
@@ -129,9 +290,11 @@ record SEq (s t : Stream A) : Set where
test : (s : Nat × Stream Nat) (t : Stream Nat) → SEq (delay s) t → SEq t (delay s)
~force (test (a , as) t p) with force t
~force (test (suc n , as) t p) | b , bs = {!!}
+@
With function:
+@
f : (t : Stream Nat) (w : Nat × Stream Nat) (a : Nat) (as : Stream Nat)
(p : SEq (delay (a , as)) t) → (fst w ≡ a) × SEq (snd w) as
@@ -140,27 +303,33 @@ With function:
qs = (a , as) t p ~force
ps = (suc n , as) t p ~force
ps' = (suc n) as t p
+@
Resulting with-function clause is:
+@
f t (b , bs) (suc n) as t p
+@
-Note: stripWithClausePatterns factors ps through qs, thus
+Note: stripWithClausePatterns factors @ps@ through @qs@, thus
+@
ps = qs[ps']
-
-where [..] is to be understood as substitution.
-The projection patterns have vanished from ps' (as they are already in qs).
@
+
+where @[..]@ is to be understood as substitution.
+The projection patterns have vanished from @ps'@ (as they are already in @qs@).
-}
+
stripWithClausePatterns
- :: QName -- ^ @f@
- -> Type -- ^ @t@
- -> [I.NamedArg Pattern] -- ^ @qs@
- -> Permutation -- ^ @π@
- -> [A.NamedArg A.Pattern] -- ^ @ps@
- -> TCM [A.NamedArg A.Pattern] -- ^ @ps'@
-stripWithClausePatterns f t qs perm ps = do
+ :: QName -- ^ Name of the parent function.
+ -> QName -- ^ Name of with-function.
+ -> Type -- ^ __@t@__ type of the original function.
+ -> [I.NamedArg Pattern] -- ^ __@qs@__ internal patterns for original function.
+ -> Permutation -- ^ __@π@__ permutation taking @vars(qs)@ to @support(Δ)@.
+ -> [A.NamedArg A.Pattern] -- ^ __@ps@__ patterns in with clause (eliminating type @t@).
+ -> TCM [A.NamedArg A.Pattern] -- ^ __@ps'@__ patterns for with function (presumably of type @Δ@).
+stripWithClausePatterns parent f t qs perm ps = do
-- Andreas, 2014-03-05 expand away pattern synoyms (issue 1074)
ps <- expandPatternSynonyms ps
psi <- insertImplicitPatternsT ExpandLast ps t
@@ -170,7 +339,8 @@ stripWithClausePatterns f t qs perm ps = do
, nest 2 $ text "psi = " <+> fsep (punctuate comma $ map prettyA psi)
, nest 2 $ text "qs = " <+> fsep (punctuate comma $ map (prettyTCM . namedArg) qs)
]
- ps' <- strip (Def f []) t psi $ numberPatVars perm qs
+ -- Andreas, 2015-11-09 Issue 1710: self starts with parent-function, not with-function!
+ ps' <- strip (Def parent []) t psi $ numberPatVars perm qs
let psp = permute perm ps'
reportSDoc "tc.with.strip" 10 $ vcat
[ nest 2 $ text "ps' = " <+> fsep (punctuate comma $ map prettyA ps')
@@ -233,6 +403,7 @@ stripWithClausePatterns f t qs perm ps = do
, nest 2 $ text "ps0 =" <+> fsep (punctuate comma $ map prettyA ps0)
, nest 2 $ text "exp =" <+> prettyA p
, nest 2 $ text "qs0 =" <+> fsep (punctuate comma $ map (prettyTCM . namedArg) qs0)
+ , nest 2 $ text "self=" <+> prettyTCM self
, nest 2 $ text "t =" <+> prettyTCM t
]
let failDotPat = do
@@ -325,6 +496,7 @@ stripWithClausePatterns f t qs perm ps = do
-- Compute the new type
let v = Con c [ Arg info (var i) | (i, Arg info _) <- zip (downFrom $ size qs') qs' ]
t' = tel' `abstract` absApp (raise (size tel') b) v
+ self' = tel' `abstract` apply1 (raise (size tel') self) v -- Issue 1546
reportSDoc "tc.with.strip" 15 $ sep
[ text "inserting implicit"
@@ -338,7 +510,7 @@ stripWithClausePatterns f t qs perm ps = do
WrongNumberOfConstructorArguments (conName c) (size tel') (size psi')
-- Keep going
- strip (self `apply1` v) t' (psi' ++ ps) (qs' ++ qs)
+ strip self' t' (psi' ++ ps) (qs' ++ qs)
p@(A.PatternSynP pi' c' ps') -> do
reportSDoc "impossible" 10 $
@@ -371,18 +543,26 @@ stripWithClausePatterns f t qs perm ps = do
-- | Construct the display form for a with function. It will display
-- applications of the with function as applications to the original function.
--- For instance, @aux a b c@ as @f (suc a) (suc b) | c@
+-- For instance,
+--
+-- @
+-- aux a b c
+-- @
--
--- @n@ is the number of with arguments.
+-- as
+--
+-- @
+-- f (suc a) (suc b) | c
+-- @
withDisplayForm
- :: QName -- ^ The name of parent function.
- -> QName -- ^ The name of the with-function.
- -> Telescope -- ^ The arguments of the with function before the with exprs.
- -> Telescope -- ^ The arguments of the with function after the with exprs.
- -> Nat -- ^ The number of with expressions.
- -> [I.NamedArg Pattern] -- ^ The parent patterns.
- -> Permutation -- ^ Permutation to split into needed and unneeded vars.
- -> Permutation -- ^ Permutation reordering the variables in parent patterns.
+ :: QName -- ^ The name of parent function.
+ -> QName -- ^ The name of the @with@-function.
+ -> Telescope -- ^ __@Δ₁@__ The arguments of the @with@ function before the @with@ expressions.
+ -> Telescope -- ^ __@Δ₂@__ The arguments of the @with@ function after the @with@ expressions.
+ -> Nat -- ^ __@n@__ The number of @with@ expressions.
+ -> [I.NamedArg Pattern] -- ^ __@qs@__ The parent patterns.
+ -> Permutation -- ^ __@perm@__ Permutation to split into needed and unneeded vars.
+ -> Permutation -- ^ __@lhsPerm@__ Permutation reordering the variables in parent patterns.
-> TCM DisplayForm
withDisplayForm f aux delta1 delta2 n qs perm@(Perm m _) lhsPerm = do
@@ -400,7 +580,8 @@ withDisplayForm f aux delta1 delta2 n qs perm@(Perm m _) lhsPerm = do
-- Build a substitution to replace the parent pattern vars
-- by the pattern vars of the with-function.
(ys0, ys1) = splitAt (size delta1) $ permute perm $ downFrom m
- ys = reverse $ map Just ys0 ++ replicate n Nothing ++ map Just ys1
+ ys = reverse (map Just ys0 ++ replicate n Nothing ++ map Just ys1)
+ ++ map (Just . (m +)) [0..top-1]
rho = sub top ys wild
tqs = applySubst rho tqs0
-- Build the arguments to the with function.
@@ -426,22 +607,27 @@ withDisplayForm f aux delta1 delta2 n qs perm@(Perm m _) lhsPerm = do
, text "n =" <+> text (show n)
, text "perm =" <+> text (show perm)
, text "top =" <+> do addFullCtx $ prettyTCM topArgs
- , text "qs =" <+> text (show qs)
- , text "dt =" <+> do addFullCtx $ prettyTCM dt
- , text "ys =" <+> text (show ys)
- , text "raw =" <+> text (show display)
+ , text "qs =" <+> sep (map (prettyTCM . namedArg) qs)
, text "qsToTm =" <+> prettyTCM tqs0 -- ctx would be permuted form of delta1 ++ delta2
- , text "sub qs =" <+> prettyTCM tqs
+ , text "ys =" <+> text (show ys)
+ , text "rho =" <+> text (prettyShow rho)
+ , text "qs[rho]=" <+> do addFullCtx $ prettyTCM tqs
+ , text "dt =" <+> do addFullCtx $ prettyTCM dt
]
]
+ reportSDoc "tc.with.display" 70 $ nest 2 $ vcat
+ [ text "raw =" <+> text (show display)
+ ]
return display
where
-- Ulf, 2014-02-19: We need to rename the module parameters as well! (issue1035)
- sub top ys wild = map term [0 .. m - 1] ++# raiseS (length qs)
+ -- sub top ys wild = map term [0 .. m - 1] ++# raiseS (length qs)
+ -- Andreas, 2015-10-28: Yes, but properly! (Issue 1407)
+ sub top ys wild = parallelS $ map term [0 .. m + top - 1]
where
term i = maybe wild var $ findIndex (Just i ==) ys
- -- OLD
+ -- -- OLD
-- sub top rho wild = parallelS $ map term [0 .. m - 1] ++ topTerms
-- where
-- -- Ulf, 2014-02-19: We need to rename the module parameters as well! (issue1035)
diff --git a/src/full/Agda/Utils/Pretty.hs b/src/full/Agda/Utils/Pretty.hs
index 97af44b..1c86b69 100644
--- a/src/full/Agda/Utils/Pretty.hs
+++ b/src/full/Agda/Utils/Pretty.hs
@@ -37,6 +37,11 @@ class Pretty a where
prettyShow :: Pretty a => a -> String
prettyShow = render . pretty
+-- | Space separated list of pretty things.
+
+prettyList :: Pretty a => [a] -> Doc
+prettyList = sep . map (prettyPrec 10000)
+
-- * Pretty instances
instance Pretty Bool where pretty = text . show