!̴[@      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                           ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N OPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                                           !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      Safe279^k1flpfBool is whether or not anything was changed (so no need to do Eq check in fixed-point transformations)2  #"! $(%'&)*+,-./0122,+*)$(%'&-#"! ./01  2  SafeXqCflpgDefault core expression type for FLP compiler targeting Rust library (with contains(...) attibutes):MflpPrimitive number of bytesNflp ConstrainedOflp AlignmentPflp SequencingQflpUnion / alternationRflpLayer (and field) name bindingSflpFormal name bindingTflp RepetitionsUflpExtensible attributesZflpQAccumulate the results of applying some function to every node in the Exp AST.[flpwCall the given function on all subexpressions. Good for fixedpoint functions calling on themselves in recursive case where they don't care which type they see. This is slightly dangerous in the case where something gets added to the core calculus. If this happens, PLEASE check all callers of this function to see if they should handle the new case personally.]flptConservatively computes the size of the given expression, returning Nothing when a fixed size isn't easily known.^flp Just like accumq, but also tracks the number of bytes of memory that come before the subexpression for which we call the fncn.Vflp Names of bound layers and fieldsWflp$Formal identifiers (bound by Exists)CDHGFEIKJLUTSRQOMPNVWXYZ[\]^YXWVLUTSRQOMPNIKJDHGFECZ[\]^Safe279rhlkjimnohlkjimnoSafe~sflpBuild the dictionary / map of layer (and field) identifiers to their inner Demarc. Todo: warning when multiple layers have the same name (which one union picks is undefined behavior)uflpGrafting pre-processing passwflpFThis can be done before or after grafting phase. It checks that every Layer and FieldO has a globally unique name, reporting an error when the name is not unique.yflpxHow many bytes are required for an Enum containing the given fields. This computes ceiling(log_2(length(flags)) / 8).zflp>TODO: parametrized delta_prim for architecture-dependent types|flp9Computes over arithmetic expressions in terms of literals}flpComputes number of bitsflp Rounds up  SizeArith to the nearest whole byte.stuvwxyz{|}~stuvwxyz{|}~NoneFflpBEncode a Haskell String to a list of Word8 values, in UTF8 format.%%None=?Fh\      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~9 9 Nonev    !"#$&'%()*+,-./012      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Identifiers(c) Alec Theriault, 2017-2018 BSD-stylealec.theriault@gmail.com experimentalportableSafe279 flpThe payload of an identifierflp An identifierflppayload of the identifierflpwhether the identifier is rawflphash for quick comparisionflp Smart constructor for making an .flpHash a string into an flpForgets4 about whether either argument was raw <<<<<<< HEADflpForgets& about whether either argument was rawflpUses  to short-circuitflpUses  to short-circuitflp/Shows the identifier as a string (for use with -XOverloadedStrings)   ,Interface to the underlying input of parsing(c) Alec Theriault, 2017-2018 BSD-stylealec.theriault@gmail.com experimentalportableNone flpOpaque input type.flpRead the first byte from an 0 and return that byte with what remains of the . Behaviour is undefined when  returns .takeByte "foo bar"(102, "oo bar")takeByte "$8<<"(196, "\ETX\168\&8\235<<")flp!Read the first character from an  and return that  with what remains of the . Behaviour is undefined when  returns .takeChar "foo bar"('f', "oo bar")takeChar "$8<<"('$', "8<<")flpReturn True$ if the given input stream is empty.inputStreamEmpty ""TrueinputStreamEmpty "foo"FalseflpReturns the first n= characters of the given input stream, without removing them.peekChars 5 "foo bar""foo ba"peekChars 5 "foo""foo"peekChars 3 "$8<<""$"flpRead an encoded file into an flpRead an  from a  flpConvert  to !.flp Convert a ! to an .flp.Returns the number of text lines in the given  countLines ""0countLines "foo"1countLines "foo\n\nbar"3countLines "foo\n\nbar\n"3flpUses    Non-empty lists(c) Alec Theriault, 2017-2018 BSD-stylealec.theriault@gmail.com experimentalGHCNone12456=?HMV   Positions and spans in files(c) Alec Theriault, 2017-2018 BSD-stylealec.theriault@gmail.com experimentalGHCNone279] flpDescribes nodes that can be located - their span can be extracted from them. In general, we expect that for a value constructed as  Con x y z where Con is an arbitrary constructorH(spanOf x <> spanOf y <> spanOf z) `subsetOf` spanOf (Con x y z) == True flp A "tagging" of something with a   that describes its extent. flp>Spans represent a contiguous region of code, delimited by two Us. The endpoints are inclusive. Analogous to the information encoded in a selection.flpA position in a source file. The row and column information is kept only for its convenience and human-readability. Analogous to the information encoded in a cursor.flp absolute offset the source file.flprow (line) in the source file.flpcolumn in the source file.flpPretty print a flp4Maximum of two positions, bias for actual positions.+maxPos (Position 30 5 8) (Position 37 5 15)Position 37 5 15#maxPos NoPosition (Position 30 5 8)Position 30 5 8flp9Maximum and minimum positions, bias for actual positions.+minPos (Position 30 5 8) (Position 37 5 15)Position 30 5 8#minPos NoPosition (Position 30 5 8)Position 30 5 8flpStarting position in a file.flp)Advance column a certain number of times.flpAdvance to the next line.flptAdvance only the absolute offset, not the row and column information. Only use this if you know what you are doing!flp+Check if a span is a subset of another spanflpConvenience function lifting " to work on all   things flpPretty print a  !flpExtract the wrapped value from  "flpField names are not shown$flpsmallest covering  %flpField names are not shown *flpO(n) time complexity+flpO(n) time complexity      ! !     Parsing literals(c) Alec Theriault, 2017-2018 BSD-stylealec.theriault@gmail.com experimentalGHCNone 12=?HVg>flp6Wrap a data type where all the operations are reversed@flpConvert a reversed  back into a normal one.Aflp?Remove an element from the end of a non-empty reversed sequenceBflpZAdd an element to the end of a reversed sequence to produce a non-empty reversed sequence>?@AB>?@ABNon-token AST definitions(c) Alec Theriault, 2017-2018 BSD-stylealec.theriault@gmail.com experimentalGHCNone24790OflpAn individual predicate in a S (syntax::ast::WherePredicate).Pflp type bound ( syntax::ast::WhereBoundPredicate ) (example: for<'c> Foo: Send+Clone+'c)Qflplifetime predicate (!syntax::ast::WhereRegionPredicate ) (example:  'a: 'b+'c)Rflpequality predicate (syntax::ast::WhereEqPredicate ) (example: T=int.). Note that this is not currently supported.SflpA wherel clause in a definition, where one can apply a series of constraints to the types introduced and used by a # clause (syntax::ast::WhereClause). In many cases, where is the only way to express certain bounds (since those bounds may not be immediately on a type defined in the generic, but on a type derived from types defined in the generic).Note that while S is a field of #s, not all uses of generics are coupled with a where clause. In those cases, we leave the list of predicates empty. Example: where Option<T>: Debug as in 7impl<T> PrintInOption for T where Option<T>: Debug { } UflpGThe visibility modifier dictates from where one can access something (ast::syntax::Visibility). Ihttps://github.com/rust-lang/rfcs/blob/master/text/1422-pub-restricted.md'RFC about adding restricted visibilityVflppub is accessible from everywhere Wflp pub(crate)$ is accessible from within the crateXflpfor some path p, pub(p) is visible at that pathYflp1if no visbility is specified, this is the defaultZflpPaths used in  items (ast::syntax::UseTree). Examples: // Simple use paths use foo::bar::baz as quux; use foo::bar::baz; // Glob use paths use foo::bar::*; // Nested use paths use foo::bar::{a, b, c::quux as d} [flp%Simple path, optionally ending in an as\flpPath ending in a glob pattern]flp$Path ending in a list of more paths ^flpMain payload in a b (syntax::ast::VariantData). Examples: renum Foo { // Struct variant Bar { x: f64 }, // Tuple variant Baz(i32, i32), // Unit variant Qux, } _flpStruct variant`flp Tuple variantaflp Unit variantbflp0A variant in Rust is a constructor (either in a , , or !) which groups together fields (syntax::ast::VariantY). In the case of a unit variant, there can also be an explicit discriminant expression.dflp9Qualifies whether something is using unsafe Rust or not (syntax::ast::Unsafety5). Note that we also use this to describe whether a Q9 is unsafe or not, while Rust has a seperate structure (syntax::ast::BlockCheckModek) for that. This is because they also need to keep track of whether an unsafe block is compiler generated.gflpUnary operators, used in the ( constructor of   (syntax::ast::UnOp). Example: ! as in !truehflp* operator (dereferencing)iflp! operator (logical inversion)jflp- operator (negation)kflp$Bounds that can be placed on types (syntax::ast::TyParamBound,). These can be either traits or lifetimes.lflp trait boundmflplifetime boundnflp"Type parameter definition used in  (syntax::ast::TyParams). Note that each parameter can have any number of (lifetime or trait) bounds, as well as possibly a default type.pflpTypes (syntax::ast::Ty).qflp variable length slice (example: [T])rflpfixed length array (example: [T; n])sflpraw pointer (example: *const T or *mut T)tflpreference (example: &'a T or  &'a mut T)uflpbare function (example: fn(usize) -> bool)vflp never type: !wflptuple (example:  (i32, i32))xflppath type (examples:  std::math::pi, <Vec<T> as SomeTrait>::SomeType).yflptrait object type (example: Bound1 + Bound2 + Bound3)zflpimpl trait type (see the  Rhttps://github.com/rust-lang/rfcs/blob/master/text/1522-conservative-impl-trait.mdRFC ) (example: impl Bound1 + Bound2 + Bound3).{flp9no-op; kept solely so that we can pretty print faithfully|flp!typeof, currently unsupported in rustc (example:  typeof(1))}flpinferred type: _~flp+generated from a call to a macro (example: HList![i32,(),u8])flpA % is a path which identifies a trait (syntax::ast::TraitRef).flp-Item declaration within a trait declaration (syntax::ast::TraitItem with syntax::ast::TraitItemKind inlined), possibly including a default implementation. A trait item is either required (meaning it doesn't have an implementation, just a signature) or provided (meaning it has a default implementation). Examples: trait MyTrait { // Associated constant const ID: i32 = 1; // Method fn area(&self) -> f64; // Associated type type N: fmt::Display; // Call to a macro foo!{} } flpAssociated constantsflpMethod with optional bodyflp"Possibly abstract associated typesflpCall to a macroflp5Modifier on a bound, currently this is only used for ?Sized, where the modifier is Maybe/. Negative bounds should also be handled here.flpEWhen the parser encounters a macro call, it parses what follows as a A token tree. Basically, token trees let you store raw tokens or Sequence forms inside of balanced parens, braces, or brackets. This is a very loose structure, such that all sorts of different AST-fragments can be passed to syntax extensions using a uniform type.flpA single tokenflp A delimited sequence of tokens (syntax::tokenstream::Delimited ) Example:  { [->+<] } in brainfuck!{ [->+<] };flptype of delimiterflpdelimited sequence of tokensflpKAn abstract sequence of tokens, organized into a sequence (e.g. stream) of , each of which is a single  or a  subsequence of tokens.flp2a single token or a single set of delimited tokensflpstream of streams of tokensflpField of a struct (syntax::ast::StructField) used in declarations Example:  bar: usize as in struct Foo { bar: usize }flpStyle of a string literal (syntax::ast::StrStyle).flpregular strings (example: "foo")flp raw strings, with the number of # delimiters (example: r#\"foo\"#)flp A statement (syntax::ast::Stmt). Rust has relatively few types of statements by turning both expressions (sometimes with a required semicolon at the end) and items into statements.flpA local let binding (syntax::ast::Local ) (example: let x: i32 = 1;)flpItem definition (example: fn foo(x: i32) { return x + 1 })flp2Expression without a trailing semicolon (example: x + 1)flp/Expression with a trailing semicolon (example: x + 1;)flpA macro call (example: println!("hello world"))flpLimit types of a ;flp0Inclusive at the beginning, exclusive at the endflp"Inclusive at the beginning and endflp The explicit Self type in a "qualified path". The actual path, including the trait and the associated item, is stored separately. The first argument is the type given to SelfD and the second is the index of the associated qualified with this Self typeflp6Trait ref parametrized over lifetimes introduced by a for (syntax::ast::PolyTraitRef). Example: for<'a,'b> Foo<&'a Bar> flpSegment of a path (syntax::ast::PathSegment).flpParameters on a path segment (syntax::ast::PathParameters).flp.Parameters in a chevron comma-delimited list ((syntax::ast::AngleBracketedParameterData). Note that lifetimes must come before types, which must come before bindings. Bindings are equality constraints on associated types (example:  Foo<A=Bar>) Example: <'a,A,B,C=i32> in a path segment like foo::<'a,A,B,C=i32>flpSParameters in a parenthesized comma-delimited list, with an optional output type ('syntax::ast::ParenthesizedParameterData). Example:  (A,B) -> C in a path segment  Foo(A,B) -> Cflp9Everything in Rust is namespaced using nested modules. A _ represents a path into nested modules, possibly instantiating type parameters along the way (syntax::ast::Pathj). Much like file paths, these paths can be relative or absolute (global) with respect to the crate root.,Paths are used to identify expressions (see <), types (see x$), and modules (indirectly through ViewPath and such).The > argument identifies whether the path is relative or absolute. Example: std::cmp::PartialEqflp Patterns (syntax::ast::Pat).flpwildcard pattern: _flpidentifier pattern - either a new bound variable or a unit (tuple) struct pattern, or a const pattern. Disambiguation cannot be done with parser alone, so it happens during name resolution. (example: mut x)flpstruct pattern. The  signals the presence of a .. . (example: Variant { x, y, .. })flptuple struct pattern. If the ..F pattern is present, the 'Maybe Int' denotes its position. (example: Variant(x, y, .., z))flppath pattern (example A::B::C)flptuple pattern. If the ..F pattern is present, the 'Maybe Int' denotes its position. (example: (a, b))flpbox pattern (example: box _)flpreference pattern (example:  &mut (a, b))flpliteral (example: 1)flprange pattern (example: 1...2)flpslice pattern where, as per  ]https://github.com/P1start/rfcs/blob/array-pattern-changes/text/0000-array-pattern-changes.mdthis RFC;, the pattern is split into the patterns before/after the .. and the pattern at the .. . (example: [a, b, ..i, y, z])flp+generated from a call to a macro (example: LinkedList!(1,2,3))flp*For interpolation during macro expansion (syntax::ast::NonTerminal).flp5Encodes whether something can be updated or changed (syntax::ast::Mutability).flp1The movability of a generator / closure literal (syntax::ast::Movability).flpPRepresents a method's signature in a trait declaration, or in an implementation.flpStyle of the macro statement (syntax::ast::MacStmtStyle).flptrailing semicolon (example:  foo! { ... };,  foo!(...);, and  foo![...];)flpbraces (example:  foo! { ... })flpRepresents a macro invocation (syntax::ast::Mac). The 2 indicates which macro is being invoked, and the - contains the source of the macro invocation.flpThe base of the number in an Int literal can be binary (e.g. 0b1100), octal (e.g. 0o14), decimal (e.g. 12), or hexadecimal (e.g. 0xc).flpLiterals in Rust (syntax::ast::Lit). As discussed in e, Rust AST is designed to parse suffixes for all literals, even if they are currently only valid on  and  literals.flpstring (example: "foo")flpbyte string (example: b"foo")flpcharacter (example: 'a')flpbyte (example: b'f')flpinteger (example: 1i32)flpfloat (example: 1.12e4)flpboolean (example: true)flp!The suffix on a literal (unifies syntax::ast::LitIntType, syntax::ast::IntTy, syntax::ast::UintTy, and syntax::ast::FloatTy). As of today, only numeric types can have suffixes, but the possibility of adding more (possibly arbitrary) suffixes to literals in general is being kept open intentionally. Xhttps://github.com/rust-lang/rfcs/blob/master/text/0463-future-proof-literal-suffixes.md+RFC about future-proofing literal suffixes Examples: i32, isize, and f32flpThis is the fundamental unit of parsing - it represents the contents of one source file. It is composed of an optional shebang line, inner attributes that follow, and then the module items.Example: S#!/usr/bin/env rust #![allow(dead_code)] fn main() { println!("Hello world") } flpVA lifetime definition, introducing a lifetime and the other lifetimes that bound it (syntax::ast::LifetimeDef). Example: 'a: 'b + 'c + 'dflp/A lifetime is a name for a scope in a program (syntax::ast::Lifetime). One of the novel features of Rust is that code can be parametrized over lifetimes. Syntactically, they are like regular identifiers, but start with a tick ' mark. The  argument is not supposed to include that tick. Examples: 'a or 'staticflp/Used to annotate loops, breaks, continues, etc.flp A top-level item, possibly in a  or a  (syntax::ast::Item with syntax::ast::ItemKind inlined). Example: fn main() { return; }flpAextern crate item, with optional original crate name. Examples: extern crate foo or extern crate foo_bar as fooflpuse declaration (use or pub use) item. Examples: use foo;,  use foo::bar;, or use foo::bar as FooBar;flp static item (static or  pub static). Examples: static FOO: i32 = 42; or !static FOO: &'static str = "bar";flpconstant item (const or  pub const ). Example: const FOO: i32 = 42;flpfunction declaration (fn or pub fn ). Example: "fn foo(bar: usize) -> usize { .. }flpmodule declaration (mod or pub mod) (syntax::ast::Mod ). Example: mod foo; or mod foo { .. }flpexternal module (extern or  pub extern) (syntax::ast::ForeignMod ). Example:  extern { .. } or extern "C" { .. }flp type alias (type or pub type ). Example: type Foo = Bar<u8>;flpenum definition (enum or pub enum) (syntax::ast::EnumDef ). Example: enum Foo<A, B> { C(A), D(B) }flpstruct definition (struct or  pub struct ). Example: struct Foo<A> { x: A }flpunion definition (union or  pub union ). Example: union Foo<A, B> { x: A, y: B }flptrait declaration (trait or  pub trait ). Example: trait Foo { .. } or trait Foo<T> { .. }flptrait alias Example: trait Foo = Bar + Quux; flpimplementation Example: impl<A> Foo<A> { .. } or impl<A> Trait for Foo<A> { .. } flp,generated from a call to a macro Example:  foo!{ .. } flpdefinition of a macro via  macro_rules Example: macro_rules! foo { .. } flp`For traits with a default impl, one can "opt out" of that impl with a negative impl, by adding ! mark before the trait name. Phttps://github.com/rust-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.mdRFC on builtin traits Example: ! as in impl !Trait for Foo { }flpAn item within an impl (syntax::ast::ImplItem with syntax::ast::ImplItemKind inlined). Examples: impl MyTrait { // Associated constant const ID: i32 = 1; // Method fn area(&self) -> f64 { 1f64 } // Associated type type N = i32; // Call to a macro foo!{} } flpAssociated constantflpMethodflpAssociated typeflp Macro callflpiRepresents lifetimes and type parameters attached to a declaration of a functions, enums, traits, etc. (syntax::ast::GenericsX). Note that lifetime definitions are always required to be before the type parameters.This one AST node is also a bit weird: it is the only node whose source representation is not compact - the lifetimes and type parameters occur by themselves between < and >5 then a bit further the where clause occurs after a where. Example: <'a, 'b: 'c, T: 'a> and where Option<T>: Copy as inQ fn nonsense<'a, 'b: 'c, T: 'a>(x: i32) -> i32 where Option<T>: Copy { 1 }.flp An item within an extern block (syntax::ast::ForeignItem with syntax::ast::ForeignItemKind inlined). Example: static ext: u8 in extern "C" { static ext: u8 }flpForeign function Example: fn foo(x: i32); in extern "C" { fn foo(x: i32); }flp+Foreign static variable, optionally mutable Example: static mut bar: i32; in #extern "C" { static mut bar: i32; }flp Foreign type Example:  type Boo;flp1Header (not the body) of a function declaration (syntax::ast::FnDecl). The Z argument indicates whether the header is variadic (so whether the argument list ends in ...). Example: (bar: i32) -> i32 as in &fn foo(bar: i32) -> i32 { bar + 2 } flp#Field in a struct literal pattern (syntax::ast::FieldPat). The field name  is optional but, when it is $3, the pattern the field is destructured to must be . Example: x in Point { x, y }flp&Field in a struct literal expression (syntax::ast::Field). Example: x: 1 in Point { x: 1, y: 2 } flp Expression (syntax::ast::ExprU). Note that Rust pushes into expressions an unusual number of constructs including if, while, match, etc.!flpbox expression (example: box x)"flpin-place expression - first  1 is the place, second one is the value (example: x <- y)#flparray literal (example:  [a, b, c, d])$flpfunction call where the first  ! is the function itself, and the [ ]% is the list of arguments (example:  foo(1,2,x))%flpmethod call where the first   is the receiver,  is the method name, Maybe [p]R the list of type arguments and '[Expr]' the arguments to the method. (example: x.foo::<Bar, Baz>(a, b, c, d)&flptuple (example:  (a, b, c ,d))'flpbinary operation (example: a + b, a * b)(flpunary operation (example: !x, *x))flpliteral (example: 1, "foo")*flpcast (example:  foo as f64)+flptype annotation (example: x: i32) ,flp if expression, with an optional else block. In the case the else$ block is missing, the type of the if is inferred to be () . (example: "if 1 == 2 { (1,1) } else { (2,2) }-flp8if-let expression with an optional else block (example: if let Some(x) = None { () }).flp-while loop, with an optional label (example: !'lbl: while 1 == 1 { break 'lbl })/flp1while-let loop, with an optional label (example: while let Some(x) = None { x })0flp+for loop, with an optional label (example: #for i in 1..10 { println!("{}",i) })1flp'conditionless loop (can be exited with >, ?, or @)2flp match block3flpclosure (example: move |a, b, c| { a + b + c })4flp"(possibly unsafe) block (example:  unsafe { 1 })5flpa catch block (example: do catch { 1 })6flpassignment (example:  a = foo())7flp&assignment with an operator (example: a += 1)8flp)access of a named struct field (example: obj.foo)9flpAaccess of an unnamed field of a struct or tuple-struct (example: foo.0):flpindexing operation (example: foo[2]);flprange (examples: 1..2, 1.., ..2, 1...2, 1..., ...2)<flpvariable reference =flp referencing operation (example:  &a or &mut a)>flpbreakc with an optional label and expression denoting what to break out of and what to return (example:  break 'lbl 1) ?flpcontinue" with an optional label (example: continue)@flpreturn1 with an optional value to be returned (example: return 1)Aflp!macro invocation before expansionBflp%struct literal expression (examples: Foo { x: 1, y: 2 } or Foo { x: 1, ..base })Cflp>array literal constructed from one repeated element (example: [1; 5])Dflp4no-op: used solely so we can pretty print faithfullyEflpsugar for error handling with Result (example: parsed_result?)Fflpyield+ with an optional value to yield (example: yield 1)Gflp4embedded Haskell expressions for use by quasiquotersHflpAn  can be marked default (syntax::ast::Defaultness). Kflp{Const annotation to specify if a function or method is allowed to be called in constants context with constant arguments (syntax::ast::Constness).  Chttps://github.com/rust-lang/rfcs/blob/master/text/0911-const-fn.md Relevant RFC  Example: const in %const fn inc(x: i32) -> i32 { x + 1 }NflpDescribes how a 3' should close over its free variables (syntax::ast::CaptureBy).Oflp+make copies of free variables closed over (move closures)Pflp!borrow free variables closed overQflp0A curly brace delimited sequence of statements (syntax::ast::Block4). The last statement in the block can always be a  expression. Example: { let x = 1; return x + y } as in $fn foo() { let x = 1; return x + y }SflpTDescribes how a value bound to an identifier in a pattern is going to be borrowed (syntax::ast::BindingMode).  Example: &mut in |&mut x: i32| -> { x += 1 }VflpBinary operators, used in the ' and 7 constructors of   (syntax::ast::BinOp). Example: + as in 1 + 1 or 1 += 1Wflp+ operator (addition)Xflp- operator (subtraction)Yflp* operator (multiplication)Zflp/ operator (division)[flp% operator (modulus)\flp&& operator (logical and)]flp|| operator (logical or)^flp^ operator (bitwise xor)_flp& operator (bitwise and)`flp| operator (bitwise or)aflp<< operator (shift left)bflp>> operator (shift right)cflp== operator (equality)dflp< operator (less than)eflp<=! operator (less than or equal to)fflp!= operator (not equal to)gflp>=$ operator (greater than or equal to)hflp> operator (greater than)iflpDistinguishes between attributes that are associated with the node that follows them and attributes that are associated with the node that contains them (syntax::ast::AttrStyleu). These two cases need to be distinguished only for pretty printing - they are otherwise fundamentally equivalent. Example:  #[repr(C)] is an outer attribute while #![feature(slice_patterns)] is an inner onelflpl's are annotations for other AST nodes (syntax::ast::Attribute6). Note that doc-comments are promoted to attributes. Example: #[derive(Copy,Clone)] as in ;#[derive(Clone, Copy)] struct Complex { re: f32, im: f32 } mflpRegular attributes of the form #[...]nflpDoc comment attributes. The ? argument identifies if the comment is inline or not, and the ) contains the actual doc comment content.oflp An arm of a 2 expression (syntax::ast::ArmW). An arm has at least one patten, possibly a guard expression, and a body expression. Example: 0n if n % 4 == 3 => { println!("{} % 4 = 3", n) } as in match n { n if n % 4 == 3 => { println!("{} % 4 = 3", n) } n if n % 4 == 1 => { println!("{} % 4 = 1", n) } _ => println!("{} % 2 = 0", n) } qflp"An argument in a function header (syntax::ast::Arg, except with SelfKind and  ExplicitSelf inlined). Example: x: usize, self, mut self, &self,  &'lt mut self,  mut self: Foo as in %trait Foo { // Regular argument fn new(x: usize) -> Foo; // Self argument, by value fn foo(self) -> i32; fn bar(mut self); // Self argument, by reference fn baz(&self) -> Bar<'lt>; fn qux(&'lt mut self) -> Bar<'lt>; // Explicit self argument fn quux(mut self: Foo); } rflpRegular argument sflpSelf argument, by value tflpSelf argument, by referenceuflpExplicit self argumentvflp3ABIs support by Rust's foreign function interface (syntax::abi::Abi). Note that of these, only , , , , , and  and : are cross-platform - all the rest are platform-specific. Example: "C" as in extern "C" fn foo(x: i32);flp Extract the where clause from a .flpSmart constructor for .flpExtract the suffix from a  .flpA ! is at its core just a stream of . This function lets you get at that directly. For example, you can use 'Data.List.unfoldr unconsTokenStream' to convert between a  and '[TokenTree]'.flpPartition a list of k into a tuple of the l and m variants.flp  is not stored on  - it is computed>OPQRSTUVWXYZ[\]^_`abcdefgihjklmnoprsqtuvwxyz{|}~      '2,);F5!G"#$%&(*+-./01346789:<=>?@ABCDEHJIKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~>defqrstulmnijk '2,);F5!G"#$%&(*+-./01346789:<=>?@ABCDEvwxyz{|}~opgihjVWXYZ[\]^_`abcdefghNOPprsqtuvwxyz{|}~noklmSTOPQRSTU   HJI  bc^_`aZ[\]UVWXYKLMQR Token definitions(c) Alec Theriault, 2017-2018 BSD-stylealec.theriault@gmail.com experimentalGHCNone279`zNKflpsRust is whitespace independent. Short of providing space between tokens, whitespace is all the same to the parser.LflpA delimiter token ( syntax::parse::token::DelimToken).MflpA general token (based on syntax::parse::token::Token). Unlike its  libsyntax counterpart, M has folded in  syntax::parse::token::BinOpToken and "syntax::parse::token::BinOpEqToken as regular tokens.NflpA literal token (syntax::parse::token::Lit)flpbyteflp characterflp"integral literal (could have type i32, int, u128, etc.)flp(floating point literal (could have type f32, f64, etc.)flpstring literalflp%raw string literal and the number of # marks around itflpbyte string literalflp*raw byte string literal and the number of # marks around itflpround parenthesis: ( or )flpsquare bracket: [ or ]flp curly brace: { or }flpempty delimiterflpusual white space: [\ \t\n\f\v\r]+flpcomment (either inline or not)flp= token flp< token flp> token flp& token flp| token flp! token flp~ token flp+ token flp- token flp* token flp/ token flp% token flp^ token flp>= tokenflp>>= tokenflp&& tokenflp|| tokenflp<< tokenflp>> tokenflp== tokenflp!= tokenflp<= tokenflp<<= tokenflp-= tokenflp&= tokenflp|= tokenflp+= tokenflp*= tokenflp/= tokenflp^= tokenflp%= tokenflp@ tokenflp. tokenflp.. tokenflp..= tokenflp... tokenflp, tokenflp; tokenflp: tokenflp:: tokenflp-> tokenflp<- tokenflp=> tokenflp# tokenflp$ tokenflp? tokenflp${ ... } token containing embedded codeflp${ ... } token containing embedded codeflpOne of (, [, {flpOne of ), ], }flp8a literal token with an optional suffix (something like i32)flp(an arbitrary identifier (something like x or foo or and_then)flpa lifetime (something like 'a or 'static)flp whitespaceflpYdoc comment with its contents, whether it is outer/inner, and whether it is inline or notflp#! shebang tokenflpend of file tokenflp6can be expanded into several tokens in macro-expansionflpFCheck whether a space is needed between two tokens to avoid confusion.flp@This instance is only for error messages and debugging purposes.PKLMNijkPMKLNijkSyntax data defintions(c) Alec Theriault, 2017-2018 BSD-stylealec.theriault@gmail.com experimentalGHCNonedKLMNOPQRSTUVWXYZ[\]^_`abcdefgihjklmnoprsqtuvwxyz{|}~      '2,);F5!G"#$%&(*+-./01346789:<=>?@ABCDEHJIKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~pretty printing utilities(c) Alec Theriault, 2017-2018 BSD-stylealec.theriault@gmail.com experimentalportableNoneZflpIndentation levelflp Similar to %, but where the $ case is an empty flpVertically concatenate two &s with a collapsible line between themflp Flatten a flpMap the list of items into 7s using the provided function and add comma punctuationflpVTake a binary operation on docs and lift it to one that has (left and right) identity &flpLifted version of Wadler's  +flpLifted version of Wadler's hsepflpLifted version of Wadler's  #flpLifted version of Wadler's vsepflpLifted version of Wadler's  /flp.Unless the condition holds, print the documentflp,When the condition holds, print the documentflp@Apply a printing function to an optional value. If the value is $,  returns the empty .flpIndent the given , but only if multi-lineflp:Undo what group does. This function is pretty dangerous...flpRemove all indentflp Translate '\n' in a string using the provided  instead of lineflpThis is the most general function for printing blocks. It operates with any delimiter, any seperator, an optional leading attribute doc (which isn't followed by a seperator), and wraps a list of entries. It has been tweaked to look Just Right (TM) for the usual cases.fNote that this will try to fit things on one line when possible, so if you want a block that is sure notV to be condensed on one line (e.g. for a function), you have to construct it manually.flpresult if scrutinee is emptyflp+how to process scrutinee if it is not emptyflp scrutinee flpouter delimitersflp4prefer to be on one line (as opposed to multiline)? flp seperatorflp3attributes doc, after which no seperator will (use & to ignore)flpentriesParsing literals(c) Alec Theriault, 2017-2018 BSD-stylealec.theriault@gmail.com experimentalportableNoneflpPrint a literal ( print_literal)flpPrint literal suffix'flpPrint an integer literal(flp&Extend a byte into a unicode character)flpaConstrain a unicode character to a byte This assumes the character is in the right range already*flpEscape a byte. Based on std::ascii::escape_default.kIf the first argument is true, newlines may become a literal newline characters if the string is too long.+flp%Escape a unicode character. Based on std::ascii::escape_default.kIf the first argument is true, newlines may become a literal newline characters if the string is too long.,flp/Convert a number to its padded hexadecimal formRust pretty printer(c) Alec Theriault, 2017-2018 BSD-stylealec.theriault@gmail.com experimentalportableNoneܠL-flpPrint a source file.flp Print a name/flpPrint an identifier0flpPrint a type ( print_type with  print_ty_fn8 inlined) Types are expected to always be only one line1flpPrint a macro ( print_mac)2flpTGiven two positions, find out how to print appropriate amounts of space between them3flpPrint a token tree (print_tt)4flpWPrint a list of token trees, with the right amount of space between successive elements5flpAPrint the space between a token stream and the mod-path before it6flpPrint a token stream7flpPrint a token (token_to_string0) Single character expression-operator symbols.8flpPrint a literal token9flpPrint a nonterminal:flpPrint a statement ( print_stmt);flpPrint an expression<flpPrint an expression (print_expr_outer_attr_style ) Inlined print_expr_in_place, print_expr_call, print_expr_method_call, print_expr_tup, print_expr_binary, print_expr_unary, print_expr_addr_of, print_if,  print_if_let, print_expr_repeat(TODO: attributes on chained method calls=flpPrint a string literal>flp)Extract from an expression its attributes?flp Print a field@flpPrint range limitsAflp&Print a closure function declaration (print_fn_block_args)Bflp%Print the arm of a match expression ( print_arm)Cflp Print a blockDflpPrint a block with attributes (print_block_with_attrs or print_block_maybe_unclosed)Eflp Print an else expression ( print_else)FflpPrint a binary operator GflpPrint a unary operatorHflpPrint inner attributes (print_inner_attributes or print_inner_attributes_inline or print_inner_attributes_nodbreakD - distinction has to be made at callsite whether to force newline)IflpPrint outer attributes (print_outer_attributes or ,print_outer_attributes_no_trailing_hardbreak)Jflp!Print either type of attributes (print_either_attributes)KflpPrint an attribute (print_attribute_inline or print_attribute)LflpEPrint an identifier as is, or as cooked string if containing a hyphenMflpPrint an item ( print_item)NflpPrint a trait item (print_trait_item)OflpUPrint type parameter bounds with the given prefix, but only if there are any bounds ( print_bounds)PflpPrint a type parameter boundQflp Print the formal lifetime list (print_formal_lifetime_list)RflpPrint an impl item (print_impl_item)SflpPrint defaultness ( Defaultness)TflpPrint an associated type (printAssociatedType)UflpPrint a method signature (print_method_sig)VflpPrint an associated constant (print_associated_const)WflpPrint the polarity of a traitXflpPrint visibility (print_visibility)YflpPrint a foreign item (print_foreign_item)ZflpPrint a struct definition ( print_struct)[flpPrint a struct field\flpPretty print unsafety (print_unsafety)]flpPrint an enum definition (print_enum_def)^flpPrint a variant ( print_variant)_flpPrint a where clause (print_where_clause). The = argument indicates whether to have a trailing comma or not.`flpPrint a where clause predicateaflpPrint a function (print_fn)bflp2Print the function arguments and the return type (print_fn_args_and_ret)cflpPrint an argument ( print_arg)dflpPrint a lifetime (print_lifetime)eflpPrint a lifetime definitionfflpPrint mutability (print_mutability)gflpLike f , but prints const in the immutable case hflpPrint a pattern ( print_pat)iflpPrint a field patternjflpPrint a binding modekflpCPrint the prefix of a function - all the stuff up to and including fn (print_fn_header_info)lflp Print the ABImflpMPrint the interior of a module given the list of items and attributes in it ( print_mod)nflpUPrint the interior of a foreign module given the list of items and attributes in it ( print_mod)oflpPrint generics (print_genericso) Remark: we are discarding the where clause because it gets printed seperately from the rest of the generic.pflpPrint a poly-trait ref (print_poly_trait_ref)qflpPrint a trait ref (print_trait_ref)rflpZPrint a path parameter and signal whether its generic (if any) should start with a colon (print_path_parameters)sflp@Print a path, specifiying explicitly whether to include colons (::H) before generics or not (so expression style or type style generics) ( print_path)tflpPrint a path segmentuflpJPrint a qualified path, specifiying explicitly whether to include colons (::H) before generics or not (so expression style or type style generics) ( print_qpath)vflpPrint a use treewflpPrint a type parameters (print_ty_param)xflpPrint lifetime bounds (print_lifetime_bounds)A-./0136789:;?@CFGKMNPRWXY[\^_`bdefhijlopqsvwParsing monad for lexer/parser(c) Alec Theriault, 2017-2018 BSD-stylealec.theriault@gmail.com experimentalGHCNone2SX%flp$Exceptions that occur during parsingflp%State that the lexer and parser shareflp"position at current input locationflpthe current inputflp#position at previous input locationflp"tokens manually pushed by the userflpfunction to swap token flp*Parsing and lexing monad. A value of type   a- represents a parser that can be run (using  &) to possibly produce a value of type a. flpExecute the given parser on the supplied input stream at the given start position, returning either the position of an error and the error message, or the value parsed. flpGeneralized version of  x that expects an extra argument that lets you hot-swap a token that was just lexed before it gets passed to the parser. flp%Swap a token using the swap function. flp'Extract the state stored in the parser.flp&Update the state stored in the parser.yflp&Modify the state stored in the parser.flp,Retrieve the current position of the parser.flp*Update the current position of the parser.flpRetrieve the current  of the parser.flpUpdate the current  of the parser.flpManually push a   Mi. This turns out to be useful when parsing tokens that need to be broken up. For example, when seeing a  token but only expecting a  token, one can consume the  token and push back an   token.flpManually pop a   M) (if there are no tokens to pop, returns $). See  for more details.flpSignal a syntax error.          Parsing literals(c) Alec Theriault, 2017-2018 BSD-stylealec.theriault@gmail.com experimentalportableNone u flpParse a valid N into a .zflpGiven a string of characters read from a Rust source, extract the next underlying char taking into account escapes and unicode.{flptGiven a string of characters read from a Rust source, extract the next underlying byte taking into account escapes.|flpLGiven a string Rust representation of a character, parse it into a character}flpBGiven a string Rust representation of a byte, parse it into a byte~flpHGiven a string Rust representation of an integer, parse it into a numberflpGiven a string Rust representation of a float, parse it into a float. NOTE: this is a bit hacky. Eventually, we might not do this and change the internal representation of a float to a string (what language-c has opted to do).flpTry to read a hexadecimal number of the specified length off of the front of the string provided. If there are not enough characters to do this, or the characters don't fall in the right range, this fails with $.flp:Convert a list of characters to the number they represent.zflpmulti-line strings allowedflp input string{flpmulti-line strings allowedflp input string Rust lexer(c) Alec Theriault, 2017-2018 BSD-stylealec.theriault@gmail.com experimentalportableNoneF(flp7type passed around by Alex functions (required by Alex)flp Make a token.flp'Given the first part of a literal, try to parse also a suffix. Even if the allowed suffixes are very well defined and only valid on integer and float literals, we need to put in the same token whatever suffix follows. This is for backwards compatibility if Rust decides to ever add suffixes. flpKParses a raw string, the closing quotation, and the appropriate number of  characters.flp4Consume a full inline comment (which may be nested).flpURetrieve the next character (if there is one), updating the parser state accordingly.flpRRetrieve the next character (if there is one), without updating the parser state.flpGreedily try to eat as many of a given character as possible (and return how many characters were eaten). The second argument is an upper limit.flpSignal a lexical error.flpnget previous character (required by Alex). Since this is never used, the implementation just raises an error.flpNget the next byte and new input from the current input (required by Alex 3.0)flp.find the new position given the next characterflpLexer for one M(. The only token this cannot produce is .  flpLexer for one non-whitespace M*. The only tokens this cannot produce are  and M4 (which includes comments that aren't doc comments).!flp?Apply the given lexer repeatedly until (but not including) the ^ token. Meant for debugging purposes - in general this defeats the point of a threaded lexer."flp2Lex the first line, if it immediately starts with #! (but not #![c - that should be an inner attribute). If this fails to find a shebang line, it consumes no input.flp{If we're running on Windows, we need to normalize to "n" instead of "rn", to match Rust's handling of newlines in strings.@M !"@ !"M(c) Alec Theriault, 2017-2018 BSD-stylealec.theriault@gmail.com experimentalportableNone UVcflpstruct style fieldflptuple-struct style fieldflpCorresponds to  stmt_item, - basically limited visbility and no macrosflp General itemflpGrequire a statement be terminated (so another statement can follow it)?flp any statementflpAny expression, no restrictionsflp1Either an immediate literal, or a negated literalflpIA literal, negated literal, expression path, or qualified expression pathflpNo struct literals are allowedflp@No struct literals or block expressions (block-like things like 'if' are fine)flpForbids expressions starting with blocks (things like '{ 1 } + 2') unless the leading block has a postfix expression, allows expressions that are just one big block. Forbids '{ 1 }[0]' since it is treated as '{ 1 }; [0]' and '{ 1 }(0)' since it is treated as '{ 1 }; (0)'flp7There are several restricted forms of arguments allowedflp`Arguments allowed in places without implementation (optional limited pattern followed by a type)flpcArguments allowed in most places (any pattern followed by any type) This includes lambda argumentsflpBOnly some type parameter bounds allow trait bounds to start with ?flpDon't allow '? poly_trait_ref'flpAllow '? poly_trait_ref'flp!the first argument cannot be selfflpCthe first argument cannot be self, and the function can be variadicflpthe first argument can be selfflpTThere a a variety of constraints imposed on types, representing different invariantsflpNo restrictionsflpAny type except for y with a flpTypes not starting with 0 or '(', or paren types with no sum types insideflp"Non-sum types not starting with a forflp}Recall that paths are reused for expressions, modules, and types. However, these paths have different underlying invariants.flp similar to , but can have no segmentsflp*Attribute type to against which to resolveflpinner or outer attributeflponly innner attributeflponly outer attribute#flpSince it is possible to have well-typed Haskell expressions which represent invalid Rust ASTs, it is convenient to fix, warn, or fail ASTs before printing them. The #% typeclass provides such a facility.;A non-exhaustive list of the more obvious issues it covers:missing parensinvalid identifiers?invalid paths (for example, generic arguments on a module path)Ninner attributes on things that support only outer attributes (and vice-versa)$flpConvert some value to its resolved form. Informally, resolving a value involves checking that its invariants hold and, if they don't, report an error message or adjust the value so that the invariant holds.A value of a type satsifying ! and " is resolved if # . $9 is an identity operation on it. We further expect that $, be an identity operation on any output of #.%flpSame as $, but throws a 'r exception if it cannot resolve. Although this function should not be used, it summarizes nicely the laws around #:!parse' . pretty' . resolve' == idresolve' . parse' = parse'&flpARun resolution and get back the altered syntax tree, the highest . of issues, and the list of issues found. This allows you to see what corrections were applied to the tree. If the output severity is 21, the syntax tree returned will still be invalid.flpInternal recursive helper'flpExceptions that occur during resolving. Unlike parse errors, we don't have positional information. Instead, we try to provide some context via a list of syntax trees which let you "zoom out" from the problematic node.flp(Monad in which to resolve a syntax tree. Reader is []; storing the path from root to the current syntax tree node Writer is [)]. accumulating issues met through the traversal State is . accumulating the most severe ) found so far in the traversal)flp6Localized information about an issue in a syntax tree.+flpDescription of the issue,flpSeverity of the issue-flpThe first element in this list is the syntax tree where the issue occurs. The next elements are increasingly zoomed out syntax trees centered on the first element. In lieu of positional information, this provides a next best way of debugging exactly where the problem is..flpDiagnostic for how severe an ) is./flpQEverything is normal (this variant is returned when there was nothing to resolve)0flpOThere is something fishy looking (AST is valid, but may not be what you expect)1flp9The AST was invalid, but in a way that could be corrected2flpEThe AST was invalid in some way that could not be automatically fixedflpLog an )flpLog a 0flpLog a 1flpLog an 2flpEnter a new syntax treeflpA valid sourcefile needs:the shebang to be one-line not conflicting with attributesthe attributes to be innerthe items to be ModItemsflpAn identifier can be invalid if"it does not lex into an identifierit is a keywordflpA sugared doc is invalid if:the expected attribute style does not match the actual oneits content starts with a    when it is an outer line  inline comment7it is a line comment whose content spans multiple lines!A regular attribute is invalid if:the expected attribute style does not match the actual one-the underlying path / tokenstream are invalidthe tokenstream starts with a '::'flpA literal cannot be invalidflpA path can be invalid if(it has path parameters of the wrong type&it has identifiers not meant for paths'TODO: guard against no path segments...flpPA path parameter can be invalid if any of its constituent components are invalidflp=A QSelf by itself is only invalid when the underlying type isflpiA lifetime can only be invalid if the underlying identifier is. Note that lifetimes cannot use keywords.flp6A trait ref is invalid if the underlying type path is.flp=Resolve a given type, and a constraint on it (see the parser %&$ for more details on these cases). flpjA function declaration can be invalid if it has self arguments in the wrong places (or when it shouldn't)flp4Check whether an argument is one of the "self" formsflp$A type parameter bound is invalid if%an underlying lifetime or traitref isit is  but is a trait bound with a ? (as in  ObjectTrait)flpIThe only types of patterns supported by arguments are wild or identifiersflp:Check whether an argument is one of the "self"-alike formsflp?A Poly trait ref is valid whenever the underlying trait ref is.flp9A lifetime def is invalid if it has non-outer attributes flpA pattern can be invalid ofthe index of the ...* in the tuple/tuple-struct is out of range+the index of the qself path is out of range#any underlying component is invalidflpIField patterns are only invalid if the underlying pattern / identifier isflpKGiven the type of expression, what type of expression is allowed on the RHSflpSGiven the type of expression, what type of expression is allowed on the RHS (after  '..'/'...')flp<Resolve an expression of the given type in a general contextflpOThis has a double role: to resolve the expression and keep track of precedencesflp9Wrap an expression in parens if the condition given holdsflp?A field just requires the identifier and expression to be validflp8Arms are invalid only if the underlying consitutents areflp?Statements are invalid only when the underlying components are.flpWA block must a a series of terminated statements ended by one possibly unterminated oneflpAn item can be invalid ifit is a macro but has  restriction6it has visibility other than public/inherited but has  restriction"an underlying component is invalidflpIA foreign item is invalid only if any of its underlying constituents are flp=A where clause is valid only if the underlying predicates areflpLGenerics are only invalid if the underlying lifetimes or type parameters areflpCA type parameter is invalid only when the underlying components areflp3A variant is valid if the underlying components areflp8A variant data is valid if the underlying components areflpA struct field is invalid ifIit has the invariant that it needs an identifier, but it doesn't have oneLit has the invariant that should not have an identifier, but it doe have one,any of the underlying components are invalidflpAA where predicate is invalid only if the underlying lifetimes areflp6A trait item is valid if the underlying components areflp6An impl item is valid if the underlying components areflpThe | constraint is theoretically not necessary - restricted visibility paths are mod paths, so they should never have generics.flp<A method signature is valid if the underlying components areflp5A view path is valid if the underlying components areflpDA macro call is only invalid if any of the underlying components areflpA token tree is invalid whenGthere is an open or close delim token (those should be balanced and in )&the underlying token trees are invalid4flp!Does not show context informationRflp^There are three potential instances for resolving a path (depending on what type it is). The # instance for  will let through any path.flpdescription of the issueflpseverity of the issue#$%&'()*-+,.2/01#$%&)*-+,.2/01'(Pretty printing(c) Alec Theriault, 2017-2018 BSD-stylealec.theriault@gmail.com experimentalportableNone݈ eflp Similar to g?, but for types which are parametrized over an annotation type.fflpMPretty print the given value without resolving it, adding annotations in the M whenever possible.gflp,Describes things that can be pretty printed.hflp2Pretty print the given value without resolving it.iflpResolve (see the #' typeclass) and pretty print something.-let one = Lit [] (Int Dec 1 Unsuffixed ()) ()-let two = Lit [] (Int Dec 2 Unsuffixed ()) ()/let three = Lit [] (Int Dec 3 Unsuffixed ()) ()Tlet bogusVar = PathExpr [] Nothing (Path False [PathSegment "let" Nothing ()] ()) ()>pretty (Binary [] MulOp (Binary [] AddOp one two ()) three ())Right (1 + 2) * 3(pretty (Binary [] AddOp one bogusVar ())2Left (invalid AST (identifier `let' is a keyword))jflpSame as i, but throws a ' exception on invalid ASTs. This function is intended for situations in which you are already stuck catching exceptions - otherwise you should prefer i.-let one = Lit [] (Int Dec 1 Unsuffixed ()) ()-let two = Lit [] (Int Dec 2 Unsuffixed ()) ()/let three = Lit [] (Int Dec 3 Unsuffixed ()) ()Tlet bogusVar = PathExpr [] Nothing (Path False [PathSegment "let" Nothing ()] ()) ()?pretty' (Binary [] MulOp (Binary [] AddOp one two ()) three ()) (1 + 2) * 3)pretty' (Binary [] AddOp one bogusVar ());*** Exception: invalid AST (identifier `let' is a keyword))kflpResolve (see the #Y typeclass) and pretty print something with annotations. Read more about annotations in Data.Text.Prettyprint.Doc.Dfmap Data.Text.Prettyprint.Doc.noAnnotate . prettyAnnotated = prettylflpSame as k, but throws a ' exception on invalid ASTs. This function is intended for situations in which you are already stuck catching exceptions - otherwise you should prefer k.AData.Text.Prettyprint.Doc.noAnnotate . prettyAnnotated' = pretty'mflp"Given a handle to a file, write a + in with a desired width of 100 characters.nflp"Given a handle to a file, write a + in with a desired width of 100 characters.The  g associated with the tokens (if present) will be used as a hint for laying out and spacing the tokens.flp&This instance prints attributes inline#$%&'()*-+,.2/01efghijklmnijklmnghef#$%&'()*-+,.2/01' Rust parser(c) Alec Theriault, 2017-2018 BSD-stylealec.theriault@gmail.com experimentalGHCNone =?FhflpParser for literals.flpParser for attributes.flpParser for types.flpParser for patterns.flpParser for statements.flpParser for expressions.flpParser for items.flpParser for blocks.flp Parser for impl items.flp Parser for trait items.flpParser for token trees.flpParser for token streams.flpParser for a type parameter.flp Parser for lifetime definitions.flpParser for a where clause.flpParser for generics (although S is always empty here).flp>Generate a nice looking error message based on expected tokensflp Convert an  into an flpjTry to convert an expression to a statement given information about whether there is a trailing semicolonflp9Return the second argument, as long as the visibility is Yflp%Fill in the where clause in a genericflp5Return the second argument, as long as the safety is fflp"Make a macro item, which may be a  flpAdd attributes to an expressionflpGiven a N token that is expected to result in a valid literal, construct the associated literal. Note that this should _never_ fail on a token produced by the lexer.flpParse a source fileflpNudge the span endpoints of a   value9 9 Quasiquotes for Rust AST(c) Alec Theriault, 2017-2018 BSD-stylealec.theriault@gmail.com experimentalGHCNoneSXc flpGiven a parser, convert it into a quasiquoter. The quasiquoter produced does not support declarations and types. For patterns, it replaces any   and  field with a wild pattern.flpQuasiquoter for literals (see ().void [lit| 1.4e29f64 |]Float 1.4e29 F64 ()flp Quasiquoter for attributes (see ))void [attr| #[no_mangle] |]SAttribute Outer (Path False [PathSegment "no_mangle" Nothing ()] ()) (Stream []) ()flpQuasiquoter for types (see *)void [ty| &(_,_) |]8Rptr Nothing Immutable (TupTy [Infer (),Infer ()] ()) ()flpQuasiquoter for patterns (see +)void [pat| x @ 1...5 |]RIdentP (ByValue Immutable) "x" (Just (RangeP (Lit [] (Int Dec 1 Unsuffixed ()) ())Z (Lit [] (Int Dec 5 Unsuffixed ()) ()) ())) ()flp Quasiquoter for statements (see ,)void [stmt| let x = 4i32; |]eLocal (IdentP (ByValue Immutable) "x" Nothing ()) Nothing (Just (Lit [] (Int Dec 4 I32 ()) ())) [] ()flp!Quasiquoter for expressions (see -)void [expr| (x,) |]STupExpr [] [PathExpr [] Nothing (Path False [PathSegment "x" Nothing ()] ()) ()] ()flpQuasiquoter for items (see .)void [item| type Unit = (); |]UTyAlias [] InheritedV "Unit" (TupTy [] ()) (Generics [] [] (WhereClause [] ()) ()) ()flp)Quasiquoter for a whole source file (see /)"void [sourceFile| fn main() { } |].SourceFile Nothing [] [Fn [] InheritedV "main"6 (FnDecl [] Nothing False ()). Normal NotConst RustA (Generics [] [] (WhereClause [] ()) ())2 (Block [] Normal ()) ()]flpQuasiquoter for blocks (see 0)void [block| unsafe { 1i32 } |]:Block [NoSemi (Lit [] (Int Dec 1 I32 ()) ()) ()] Unsafe ()flp Quasiquoter for impl items (see 1)"void [implItem| type Item = (); |]1TypeI [] InheritedV Final "Item" (TupTy [] ()) ()flp!Quasiquoter for trait items (see 2)void [traitItem| type Item; |]TypeT [] "Item" [] Nothing ()flp!Quasiquoter for token trees (see 3)[tokenTree| fn |]3Token (Span (Position 1 2 14) (Position 3 2 16)) fnParsing and lexing(c) Alec Theriault, 2017-2018 BSD-stylealec.theriault@gmail.com experimentalGHCNone=?3.flp#Describes things that can be parsedflp;Complete parser (fails if not all of the input is consumed)flpLParse something from an input stream (it is assumed the initial position is ).&fmap void $ parse @(Expr Span) "x + 1"\Right (Binary [] AddOp (PathExpr [] Nothing (Path False [PathSegment "x" Nothing ()] ()) ())< (Lit [] (Int Dec 1 Unsuffixed ()) ()) ())%fmap void $ parse @(Expr Span) "x + "WLeft (parse failure at 1:4 (Syntax error: unexpected `<EOF>' (expected an expression)))flpSame as , but throws a  exception if it cannot parse. This function is intended for situations in which you are already stuck catching exceptions - otherwise you should prefer ."void $ parse' @(Expr Span) "x + 1"UBinary [] AddOp (PathExpr [] Nothing (Path False [PathSegment "x" Nothing ()] ()) ())5 (Lit [] (Int Dec 1 Unsuffixed ()) ()) ()!void $ parse' @(Expr Span) "x + "_*** Exception: parse failure at 1:4 (Syntax error: unexpected `<EOF>' (expected an expression))flpSame as  2, but working from a list of tokens instead of an .flpIGiven a handle to a Rust source file, read that file and parse it into a )writeFile "empty_main.rs" "fn main() { }"<fmap void $ withFile "empty_main.rs" ReadMode readSourceFile.SourceFile Nothing [] [Fn [] InheritedV "main"6 (FnDecl [] Nothing False ()). Normal NotConst RustA (Generics [] [] (WhereClause [] ()) ())2 (Block [] Normal ()) ()]flp\Given a path pointing to a Rust source file, read that file and lex it (ignoring whitespace))writeFile "empty_main.rs" "fn main() { }",withFile "empty_main.rs" ReadMode readTokens[fn,main,(,),{,}]    !    !None84flpStripped-down Rust Impl item with just the pieces we care about (name and item entries) so that we can merge lists of impls together by NameID equality.flpe.g. CellAddrflpContents of the Implflp'Associated Items that go *outside* the implNone=flp Log base i of n rounded up.flp*Makes a Rust expression of from an integerflp#All named entities get an addrName:flp*Only for (known to be) fixed-width things:flpDetermine all existential-bound names brought into scope by this expression. Alignment and Constrained can be traversed because only a ":#" can refer to names..     .     None?NoneZ  flp7TODO: modules with same name should be merged into one. flpMust return a nonempty list flpRGenerate the items associated with an Impl, as necessary for making a new e.g. FooAddr type. flpDistribute the 'contains(...)' attributes on layers onto all of the named fields (and other layers) one-level-deep (don't traverse the AST through names), such that we get out conversion functions to/from the "contained" thing and the inner names found. These casting functions get associated with the container itself, not the addresses being cast so as to keep how the contains() attribute works simple to understand.lTODO: We can do *all* sorts of assertions here, such as checking alignment constraints e.g. if you cast an immix Cell to an immix Line, then that Cell *should* have started on an aligned-Line. If this was not the case, either there was an error, or we should provide support for optional types that fail when alignment fails. It's probably better for now though to just require that the system developer check alignment constraints on there own and have FLP print out an error message when alignments are broken, that way we can figure out what to do with bad alignments when we have an actual example. flpFinds all the NameIDs for which the first (possibly only) instance of some NameID occurs flush with the beginning of the top-level expression (zero bytes distanceflpCMakes a plain-vanilla pass-by-value paramument with the given type:flp&Makes a plain-vanilla type from a nameflpYGenerate all things pertaining to neighboring names, along with their common parent name.flp7TODO: Remove allow(dead_code) and allow(unused_imports)4NoneZ5Safe[6789:;<=>?@AB(CDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~){f      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~T                   ! " " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 8 9 9 : ; < < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h h i j k l m n o p q r s t u  vwxyz{{|}~*23,+(^//  .    HJ1 !"#$$%%PP-&'()*+,-(./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRST00UVWXYZ[\]^_`abcdefghijklm))nooDDpqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~nop      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{| } ~                    > ?                                   Q          t 8                                   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLM"N$OPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!#      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Z''''''''''''''''''''''''''''''''55555555"flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9vLanguage.Rust.PrettyLanguage.Floorplan.SyntaxLanguage.Floorplan.Core.SyntaxLanguage.Floorplan.Semantics Language.Floorplan.Core.CompilerLanguage.Floorplan.TokenLanguage.Floorplan.ParserLanguage.Rust.Data.IdentLanguage.Rust.Data.InputStreamLanguage.Rust.Parser.NonEmptyLanguage.Rust.Data.PositionLanguage.Rust.Parser.ReversedLanguage.Rust.Syntax.TokenLanguage.Rust.Syntax.ASTLanguage.Rust.Pretty.UtilLanguage.Rust.Pretty.LiteralsLanguage.Rust.Parser.ParseMonadLanguage.Rust.Parser.LiteralsLanguage.Rust.Parser.LexerLanguage.Rust.Pretty.ResolveLanguage.Rust.QuoteLanguage.Rust.ParserLanguage.Floorplan.Rust.TypesLanguage.Floorplan.Rust.CommonLanguage.Floorplan.Rust.Mapping Language.Floorplan.Rust.CompilerLanguage.FloorplanLanguage.Rust.SyntaxLanguage.Rust.Pretty.Internal GreaterEqualGreaterEqualParsePrettyparseprettyInternalyLanguage.Rust.Parser.InternalLit AttributeTyPatStmtExprItem SourceFileBlockImplItem TraitItem TokenTreeLanguage.Floorplan.Rust Paths_flp+prettyprinter-1.2.1.1-G1ohLXOgHGIVWiPQmSHwO"Data.Text.Prettyprint.Doc.InternalDoc SizeArithSizePlus SizeMinusSizeLitLitArithPlusMinusTimesDivExponentLiteralArgArgLArgFDemarcEnumBitsUnionSeqPtrFPtrLBlobGraftFieldPound RepetitionLayernameformals magnitude alignmentmagAligncontainsrhs PrimitivePageWordByteBitFieldIDFlagIDFormalIDLayerID lexeme2prim free_varsaccum countMatchesfmapDbin2int$fReadPrimitive $fEqPrimitive$fOrdPrimitive$fShowPrimitive$fEqArg$fOrdArg $fShowArg $fEqLitArith $fOrdLitArith$fShowLitArith $fEqSizeArith$fOrdSizeArith$fShowSizeArith $fEqDemarc $fOrdDemarc $fShowDemarcBaseExpBaseTypeEnumBTBitsBTPtrBTSizeBTContainsExpPrimCon:@:+:||:::Exists:#AttrNameIDExistsIDAlignNatcallSubplusexpSizel2r$fEqExp$fOrdExp $fShowExp $fEqAttribute$fOrdAttribute$fShowAttribute $fEqBaseType $fOrdBaseType$fShowBaseTypeTreeTNB0B1leavesaddStepg$fEqTree $fOrdTree $fShowTreebuildMapgetNames grafting'graftingcheckUniqNames countGrafting enumBytes delta_primpow delta_litdelta delta_bits bits2bytesUP delta_bytesfreshcompileTokenTokenSeq TokenUnion TokenContains TokenBits TokenBytes TokenWords TokenPagesTokenPtr TokenEnum TokenArrow TokenAtParen TokenParenAt TokenAtBar TokenBarAt TokenLParen TokenRParen TokenLess TokenGreater TokenLessD TokenGreaterDTokenBar TokenBarBar TokenLCurl TokenRCurl TokenPound TokenColon TokenComma TokenPlus TokenMinus TokenTimesTokenDiv TokenExponentTokenNum TokenUpperID TokenLowerID scanTokens $fEqToken $fOrdToken $fShowToken HappyAddrHappyA#HappyStk Happy_IntList HappyCons HappyIdentityHappyAny HappyAbsSynhappyIn4 happyOut4happyIn5 happyOut5happyIn6 happyOut6happyIn7 happyOut7happyIn8 happyOut8happyIn9 happyOut9 happyIn10 happyOut10 happyIn11 happyOut11 happyIn12 happyOut12 happyIn13 happyOut13 happyIn14 happyOut14 happyIn15 happyOut15 happyIn16 happyOut16 happyIn17 happyOut17 happyIn18 happyOut18 happyIn19 happyOut19 happyIn20 happyOut20 happyIn21 happyOut21 happyIn22 happyOut22 happyIn23 happyOut23 happyIn24 happyOut24 happyIn25 happyOut25 happyIn26 happyOut26 happyIn27 happyOut27 happyIn28 happyOut28 happyIn29 happyOut29 happyIn30 happyOut30 happyIn31 happyOut31 happyIn32 happyOut32 happyIn33 happyOut33 happyIn34 happyOut34 happyIn35 happyOut35 happyIn36 happyOut36 happyInTok happyOutTok happyExpListhappyExpListPerStatehappyActOffsetshappyGotoOffsetshappyAdjustOffsethappyDefActions happyCheck happyTablehappyReduceArr happy_n_termshappy_n_nonterms happyReduce_1happyReduction_1 happyReduce_2happyReduction_2 happyReduce_3happyReduction_3 happyReduce_4happyReduction_4 happyReduce_5happyReduction_5 happyReduce_6happyReduction_6 happyReduce_7happyReduction_7 happyReduce_8happyReduction_8 happyReduce_9happyReduction_9happyReduce_10happyReduction_10happyReduce_11happyReduction_11happyReduce_12happyReduction_12happyReduce_13happyReduction_13happyReduce_14happyReduction_14happyReduce_15happyReduction_15happyReduce_16happyReduction_16happyReduce_17happyReduction_17happyReduce_18happyReduction_18happyReduce_19happyReduction_19happyReduce_20happyReduction_20happyReduce_21happyReduction_21happyReduce_22happyReduction_22happyReduce_23happyReduction_23happyReduce_24happyReduction_24happyReduce_25happyReduction_25happyReduce_26happyReduction_26happyReduce_27happyReduction_27happyReduce_28happyReduction_28happyReduce_29happyReduction_29happyReduce_30happyReduction_30happyReduce_31happyReduction_31happyReduce_32happyReduction_32happyReduce_33happyReduction_33happyReduce_34happyReduction_34happyReduce_35happyReduction_35happyReduce_36happyReduction_36happyReduce_37happyReduction_37happyReduce_38happyReduction_38happyReduce_39happyReduction_39happyReduce_40happyReduction_40happyReduce_41happyReduction_41happyReduce_42happyReduction_42happyReduce_43happyReduction_43happyReduce_44happyReduction_44happyReduce_45happyReduction_45happyReduce_46happyReduction_46happyReduce_47happyReduction_47happyReduce_48happyReduction_48happyReduce_49happyReduction_49happyReduce_50happyReduction_50happyReduce_51happyReduction_51happyReduce_52happyReduction_52happyReduce_53happyReduction_53happyReduce_54happyReduction_54happyReduce_55happyReduction_55happyReduce_56happyReduction_56happyReduce_57happyReduction_57happyReduce_58happyReduction_58happyReduce_59happyReduction_59happyReduce_60happyReduction_60happyReduce_61happyReduction_61happyReduce_62happyReduction_62happyReduce_63happyReduction_63happyReduce_64happyReduction_64happyReduce_65happyReduction_65happyReduce_66happyReduction_66happyReduce_67happyReduction_67happyReduce_68happyReduction_68happyReduce_69happyReduction_69happyReduce_70happyReduction_70happyReduce_71happyReduction_71happyReduce_72happyReduction_72happyReduce_73happyReduction_73happyReduce_74happyReduction_74happyReduce_75happyReduction_75happyReduce_76happyReduction_76happyReduce_77happyReduction_77happyReduce_78happyReduction_78happyReduce_79happyReduction_79happyReduce_80happyReduction_80happyReduce_81happyReduction_81 happyNewToken happyError_ happyIdentityhappyRunIdentity happyThen happyReturn happyThen1 happyReturn1 happyError'layershappySeq parseError parseLayers happyParse happyAccept happyDoActionindexShortOffAddrhappyLt readArrayBit happyShifthappySpecReduce_0happySpecReduce_1happySpecReduce_2happySpecReduce_3 happyReducehappyMonadReducehappyMonad2Reduce happyDrop happyDropStk happyGoto happyFail notHappyAtAll happyTcHack happyDoSeq happyDontSeq$fMonadHappyIdentity$fApplicativeHappyIdentity$fFunctorHappyIdentity IdentNameName HaskellNameIdentrawhashmkIdent$fShowIdentName$fSemigroupIdent $fMonoidIdent $fOrdIdent $fEqIdent$fIsStringIdent $fShowIdent $fEqIdentName$fOrdIdentName$fDataIdentName$fGenericIdentName$fNFDataIdentName $fDataIdent$fGenericIdent $fNFDataIdent InputStreamtakeBytetakeCharinputStreamEmpty peekCharsreadInputStreamhReadInputStreaminputStreamToStringinputStreamFromString countLines$fShowInputStream$fIsStringInputStream$fEqInputStream$fOrdInputStreamNonEmptylistConsheadtailreverseinitlast<||:|>$fSemigroupNonEmpty$fIsListNonEmpty$fFoldableNonEmpty $fEqNonEmpty $fOrdNonEmpty$fShowNonEmpty$fFunctorNonEmpty$fDataNonEmpty$fNFDataNonEmpty$fTraversableNonEmptyLocatedspanOfSpannedSpanlohiPosition NoPositionabsoluteOffsetrowcolprettyPositionmaxPosminPosinitPosincPosretPos incOffsetsubsetOf# prettySpanunspan$fShowPosition $fMonoidSpan$fSemigroupSpan $fShowSpan $fShowSpanned$fMonadSpanned$fApplicativeSpanned$fFunctorSpanned$fLocatedNonEmpty $fLocated[]$fLocatedMaybe$fLocatedSpanned $fLocatedSpan $fEqPosition $fOrdPosition$fDataPosition$fGenericPosition$fNFDataPosition$fEqSpan $fOrdSpan $fDataSpan $fGenericSpan $fNFDataSpan $fEqSpanned $fOrdSpanned $fDataSpanned$fGenericSpanned$fNFDataSpannedReversed toNonEmptyunsnocsnoc$fLocatedReversed$fIsListReversed$fMonoidReversed$fSemigroupReversed$fFoldableReversed$fFoldableReversed0$fFunctorReversed$fDataReversedSpaceDelimLitTokWherePredicateBoundPredicateRegionPredicate EqPredicate WhereClause VisibilityPublicVCrateV RestrictedV InheritedVUseTree UseTreeSimple UseTreeGlob UseTreeNested VariantDataStructDTupleDUnitDVariantUnsafetyUnsafeNormalUnOpDerefNotNeg TyParamBoundTraitTyParamBoundRegionTyParamBoundTyParamSliceArrayPtrRptrBareFnNeverTupTyPathTy TraitObject ImplTraitParenTyTypeofInferMacTyTraitRefConstTMethodTTypeTMacroTTraitBoundModifierNoneMaybe Delimitedspandelimtts TokenStreamStream StructFieldStrStyleCookedRawLocalItemStmtNoSemiSemiMacStmt RangeLimitsHalfOpenClosedQSelf PolyTraitRef PathSegmentPathParametersAngleBracketed ParenthesizedPathWildPIdentPStructP TupleStructPPathPTuplePBoxPRefPLitPRangePSlicePMacP NonterminalNtItemNtBlockNtStmtNtPatNtExprNtTyNtIdentNtPathNtTTNtArm NtImplItem NtTraitItem NtGenerics NtWhereClauseNtArgNtLit MutabilityMutable Immutable Movability ImmovableMovable MethodSig MacStmtStyle SemicolonMac BracesMacMacIntRepBinOctDecHexStrByteStrCharIntFloatBoolSuffix UnsuffixedIsI8I16I32I64I128UsU8U16U32U64U128F32F64 LifetimeDefLifetimeLabel ExternCrateUseStatic ConstItemFnMod ForeignModTyAlias StructItemTrait TraitAliasImplMacItemMacroDef ImplPolarityPositiveNegativeConstIMethodITypeIMacroIGenerics ForeignItem ForeignFn ForeignStatic ForeignTyFnDeclFieldPatBoxInPlaceVecCall MethodCallTupExprBinaryUnaryCastTypeAscriptionIfIfLetWhileWhileLetForLoopLoopMatchClosure BlockExprCatchAssignAssignOp FieldAccessTupFieldIndexRangePathExprAddrOfBreakContinueRetMacExprStructRepeat ParenExprTryYield EmbeddedExpr DefaultnessDefaultFinal ConstnessConstNotConst CaptureByValueRef BindingModeByRefByValueBinOpAddOpSubOpMulOpDivOpRemOpAndOpOrOpBitXorOpBitAndOpBitOrOpShlOpShrOpEqOpLtOpLeOpNeOpGeOpGtOp AttrStyleOuterInner SugaredDocArm SelfValue SelfRegion SelfExplicitAbiCdeclStdcallFastcall VectorcallAapcsWin64SysV64 PtxKernelMsp430Interrupt X86InterruptRustCSystem RustIntrinsicRustCallPlatformIntrinsic Unadjusted whereClausebyteStrsuffixunconsTokenStreampartitionTyParamBounds$fLocatedLabel$fLocatedLifetime $fLocatedLit$fLocatedTokenTree$fLocatedTokenStream$fLocatedWherePredicate$fMonoidWhereClause$fSemigroupWhereClause$fLocatedWhereClause$fLocatedUseTree$fLocatedVariantData$fLocatedVariant$fLocatedTyParamBound$fLocatedTyParam $fLocatedTy$fLocatedTraitRef$fLocatedTraitItem$fLocatedStructField $fLocatedStmt$fLocatedPolyTraitRef$fLocatedPathSegment$fLocatedPathParameters $fLocatedPath $fLocatedPat $fLocatedMac$fLocatedLifetimeDef $fLocatedItem$fLocatedImplItem$fMonoidGenerics$fSemigroupGenerics$fLocatedGenerics$fLocatedForeignItem$fLocatedFnDecl$fLocatedFieldPat$fLocatedField $fLocatedExpr$fLocatedBlock$fLocatedAttribute $fLocatedArm $fLocatedArg$fEqAbi$fOrdAbi $fShowAbi $fReadAbi $fEnumAbi $fBoundedAbi $fDataAbi $fGenericAbi $fNFDataAbi $fEqAttrStyle$fOrdAttrStyle$fEnumAttrStyle$fBoundedAttrStyle$fShowAttrStyle$fDataAttrStyle$fGenericAttrStyle$fNFDataAttrStyle $fEqBinOp $fOrdBinOp $fEnumBinOp$fBoundedBinOp $fShowBinOp $fDataBinOp$fGenericBinOp $fNFDataBinOp $fEqCaptureBy$fOrdCaptureBy$fEnumCaptureBy$fBoundedCaptureBy$fShowCaptureBy$fDataCaptureBy$fGenericCaptureBy$fNFDataCaptureBy $fEqConstness$fOrdConstness$fEnumConstness$fBoundedConstness$fShowConstness$fDataConstness$fGenericConstness$fNFDataConstness$fEqDefaultness$fOrdDefaultness$fEnumDefaultness$fBoundedDefaultness$fShowDefaultness$fDataDefaultness$fGenericDefaultness$fNFDataDefaultness$fEqImplPolarity$fOrdImplPolarity$fEnumImplPolarity$fBoundedImplPolarity$fShowImplPolarity$fDataImplPolarity$fGenericImplPolarity$fNFDataImplPolarity $fEqLabel $fOrdLabel$fFunctorLabel $fShowLabel $fDataLabel$fGenericLabel$fGeneric1Label $fNFDataLabel $fEqLifetime $fOrdLifetime$fFunctorLifetime$fShowLifetime$fDataLifetime$fGenericLifetime$fGeneric1Lifetime$fNFDataLifetime $fEqSuffix $fOrdSuffix $fShowSuffix $fEnumSuffix$fBoundedSuffix $fDataSuffix$fGenericSuffix$fNFDataSuffix $fEqIntRep $fOrdIntRep $fShowIntRep $fEnumIntRep$fBoundedIntRep $fDataIntRep$fGenericIntRep$fNFDataIntRep$fEqMacStmtStyle$fOrdMacStmtStyle$fEnumMacStmtStyle$fBoundedMacStmtStyle$fShowMacStmtStyle$fDataMacStmtStyle$fGenericMacStmtStyle$fNFDataMacStmtStyle$fEqMovability$fOrdMovability$fEnumMovability$fBoundedMovability$fShowMovability$fDataMovability$fGenericMovability$fNFDataMovability$fEqMutability$fOrdMutability$fEnumMutability$fBoundedMutability$fShowMutability$fDataMutability$fGenericMutability$fNFDataMutability$fEqBindingMode$fOrdBindingMode$fShowBindingMode$fDataBindingMode$fGenericBindingMode$fNFDataBindingMode$fEqRangeLimits$fOrdRangeLimits$fEnumRangeLimits$fBoundedRangeLimits$fShowRangeLimits$fDataRangeLimits$fGenericRangeLimits$fNFDataRangeLimits $fEqStrStyle $fOrdStrStyle$fShowStrStyle$fDataStrStyle$fGenericStrStyle$fNFDataStrStyle$fEqLit$fOrdLit $fFunctorLit $fShowLit $fDataLit $fGenericLit $fGeneric1Lit $fNFDataLit $fEqTokenTree$fOrdTokenTree$fShowTokenTree$fDataTokenTree$fGenericTokenTree$fNFDataTokenTree$fEqTokenStream$fOrdTokenStream$fShowTokenStream$fDataTokenStream$fGenericTokenStream$fNFDataTokenStream$fEqTraitBoundModifier$fOrdTraitBoundModifier$fEnumTraitBoundModifier$fBoundedTraitBoundModifier$fShowTraitBoundModifier$fDataTraitBoundModifier$fGenericTraitBoundModifier$fNFDataTraitBoundModifier$fEqUnOp $fOrdUnOp $fEnumUnOp $fBoundedUnOp $fShowUnOp $fDataUnOp $fGenericUnOp $fNFDataUnOp $fEqUnsafety $fOrdUnsafety$fEnumUnsafety$fBoundedUnsafety$fShowUnsafety$fDataUnsafety$fGenericUnsafety$fNFDataUnsafety$fEqWherePredicate$fOrdWherePredicate$fFunctorWherePredicate$fShowWherePredicate$fDataWherePredicate$fGenericWherePredicate$fGeneric1WherePredicate$fNFDataWherePredicate$fEqTyParamBound$fOrdTyParamBound$fFunctorTyParamBound$fShowTyParamBound$fDataTyParamBound$fGenericTyParamBound$fGeneric1TyParamBound$fNFDataTyParamBound$fEqPolyTraitRef$fOrdPolyTraitRef$fFunctorPolyTraitRef$fShowPolyTraitRef$fDataPolyTraitRef$fGenericPolyTraitRef$fGeneric1PolyTraitRef$fNFDataPolyTraitRef $fEqTraitRef $fOrdTraitRef$fFunctorTraitRef$fShowTraitRef$fDataTraitRef$fGenericTraitRef$fGeneric1TraitRef$fNFDataTraitRef$fEqPath $fOrdPath $fFunctorPath $fShowPath $fDataPath $fGenericPath$fGeneric1Path $fNFDataPath$fEqPathSegment$fOrdPathSegment$fFunctorPathSegment$fShowPathSegment$fDataPathSegment$fGenericPathSegment$fGeneric1PathSegment$fNFDataPathSegment$fEqPathParameters$fOrdPathParameters$fFunctorPathParameters$fShowPathParameters$fDataPathParameters$fGenericPathParameters$fGeneric1PathParameters$fNFDataPathParameters$fEqTy$fOrdTy $fFunctorTy$fShowTy$fDataTy $fGenericTy $fGeneric1Ty $fNFDataTy $fEqQSelf $fOrdQSelf$fFunctorQSelf $fShowQSelf $fDataQSelf$fGenericQSelf$fGeneric1QSelf $fNFDataQSelf$fEqMac$fOrdMac $fFunctorMac $fShowMac $fDataMac $fGenericMac $fGeneric1Mac $fNFDataMac$fEqLifetimeDef$fOrdLifetimeDef$fFunctorLifetimeDef$fShowLifetimeDef$fDataLifetimeDef$fGenericLifetimeDef$fGeneric1LifetimeDef$fNFDataLifetimeDef$fFunctorAttribute$fDataAttribute$fGenericAttribute$fGeneric1Attribute$fNFDataAttribute $fEqFnDecl $fOrdFnDecl$fFunctorFnDecl $fShowFnDecl $fDataFnDecl$fGenericFnDecl$fGeneric1FnDecl$fNFDataFnDecl $fFunctorArg $fDataArg $fGenericArg $fGeneric1Arg $fNFDataArg$fEqPat$fOrdPat $fFunctorPat $fShowPat $fDataPat $fGenericPat $fGeneric1Pat $fNFDataPat $fEqFieldPat $fOrdFieldPat$fFunctorFieldPat$fShowFieldPat$fDataFieldPat$fGenericFieldPat$fGeneric1FieldPat$fNFDataFieldPat$fEqExpr $fOrdExpr $fFunctorExpr $fShowExpr $fDataExpr $fGenericExpr$fGeneric1Expr $fNFDataExpr $fEqField $fOrdField$fFunctorField $fShowField $fDataField$fGenericField$fGeneric1Field $fNFDataField $fEqBlock $fOrdBlock $fShowBlock$fFunctorBlock $fDataBlock$fGenericBlock$fGeneric1Block $fNFDataBlock$fEqStmt $fOrdStmt $fFunctorStmt $fShowStmt $fDataStmt $fGenericStmt$fGeneric1Stmt $fNFDataStmt$fEqItem $fOrdItem $fFunctorItem $fShowItem $fDataItem $fGenericItem$fGeneric1Item $fNFDataItem$fEqVisibility$fOrdVisibility$fFunctorVisibility$fShowVisibility$fDataVisibility$fGenericVisibility$fGeneric1Visibility$fNFDataVisibility $fEqUseTree $fOrdUseTree$fFunctorUseTree $fShowUseTree $fDataUseTree$fGenericUseTree$fGeneric1UseTree$fNFDataUseTree$fEqVariantData$fOrdVariantData$fFunctorVariantData$fShowVariantData$fDataVariantData$fGenericVariantData$fGeneric1VariantData$fNFDataVariantData$fEqStructField$fOrdStructField$fFunctorStructField$fShowStructField$fDataStructField$fGenericStructField$fGeneric1StructField$fNFDataStructField $fEqVariant $fOrdVariant$fFunctorVariant $fShowVariant $fDataVariant$fGenericVariant$fGeneric1Variant$fNFDataVariant $fEqTraitItem$fOrdTraitItem$fFunctorTraitItem$fShowTraitItem$fDataTraitItem$fGenericTraitItem$fGeneric1TraitItem$fNFDataTraitItem $fEqMethodSig$fOrdMethodSig$fFunctorMethodSig$fShowMethodSig$fDataMethodSig$fGenericMethodSig$fGeneric1MethodSig$fNFDataMethodSig $fEqGenerics $fOrdGenerics$fFunctorGenerics$fShowGenerics$fDataGenerics$fGenericGenerics$fGeneric1Generics$fNFDataGenerics$fEqWhereClause$fOrdWhereClause$fFunctorWhereClause$fShowWhereClause$fDataWhereClause$fGenericWhereClause$fGeneric1WhereClause$fNFDataWhereClause $fEqTyParam $fOrdTyParam$fFunctorTyParam $fShowTyParam $fDataTyParam$fGenericTyParam$fGeneric1TyParam$fNFDataTyParam $fEqImplItem $fOrdImplItem$fFunctorImplItem$fShowImplItem$fDataImplItem$fGenericImplItem$fGeneric1ImplItem$fNFDataImplItem$fEqForeignItem$fOrdForeignItem$fFunctorForeignItem$fShowForeignItem$fDataForeignItem$fGenericForeignItem$fGeneric1ForeignItem$fNFDataForeignItem$fEqArm$fOrdArm $fShowArm $fFunctorArm $fDataArm $fGenericArm $fGeneric1Arm $fNFDataArm$fEqNonterminal$fOrdNonterminal$fFunctorNonterminal$fShowNonterminal$fDataNonterminal$fGenericNonterminal$fGeneric1Nonterminal$fNFDataNonterminal$fEqSourceFile$fOrdSourceFile$fFunctorSourceFile$fShowSourceFile$fDataSourceFile$fGenericSourceFile$fGeneric1SourceFile$fNFDataSourceFileByteTokCharTok IntegerTokFloatTokStrTok StrRawTok ByteStrTok ByteStrRawTokParenBracketBraceNoDelim WhitespaceCommentLess AmpersandPipe ExclamationTildeStarSlashPercentCaretGreaterGreaterEqualAmpersandAmpersandPipePipeLessLessGreaterGreater EqualEqualNotEqual LessEqual LessLessEqual MinusEqualAmpersandEqual PipeEqual PlusEqual StarEqual SlashEqual CaretEqual PercentEqualAtDotDotDot DotDotEqual DotDotDotComma SemicolonColonModSepRArrowLArrowFatArrowDollarQuestion EmbeddedCode EmbeddedIdent OpenDelim CloseDelim LiteralTokIdentTok LifetimeTokShebangEof Interpolated spaceNeeded $fEqSpace $fOrdSpace $fShowSpace $fEnumSpace$fBoundedSpace $fDataSpace$fGenericSpace $fNFDataSpace $fEqDelim $fOrdDelim $fEnumDelim$fBoundedDelim $fShowDelim $fDataDelim$fGenericDelim $fNFDataDelim $fEqLitTok $fOrdLitTok $fShowLitTok $fDataLitTok$fGenericLitTok$fNFDataLitTok $fDataToken$fGenericToken $fNFDataTokenn emptyElim<##>flattencommasliftOp<+>hsep<#>vsepunlesswhenperhapsindentungroupnoIndentstringblockprintLitprintLitSuffix ParseFailPStatecurPoscurInputprevPos pushedTokens swapFunctionP execParser execParser' swapToken getPState setPState getPosition setPositiongetInputsetInput pushTokenpopToken $fMonadFailP$fMonadP$fApplicativeP $fFunctorP$fExceptionParseFail$fShowParseFail $fEqParseFail translateLit lexicalErrorlexToken lexNonSpace lexTokenslexShebangLineResolveresolveresolve'resolveVerbose ResolveFailIssue descriptionseveritylocationSeverityCleanWarning CorrectionError$fExceptionResolveFail$fShowResolveFail$fResolveTokenStream$fResolveTokenTree $fResolveMac$fResolveUseTree$fResolveVisibility$fResolveImplItem$fResolveTraitItem$fResolveWherePredicate$fResolveVariantData$fResolveVariant$fResolveTyParam$fResolveGenerics$fResolveWhereClause$fResolveForeignItem$fResolveBlock $fResolveArm$fResolveField$fResolveFieldPat $fResolvePat$fResolveLifetimeDef$fResolvePolyTraitRef$fResolveTraitRef$fResolveLifetime$fResolveQSelf$fResolvePathParameters $fResolveLit$fResolveIdent$fResolveSourceFile$fResolveAttribute $fResolvePath$fShowPathType $fResolveTy$fResolveTyParamBound$fResolveMethodSig $fResolveArg$fResolveFnDecl $fResolveExpr $fResolveStmt $fResolveItem$fResolveStructField $fEqSeverity $fOrdSeverity$fEnumSeverity$fBoundedSeverity$fShowSeverity $fShowIssue $fEqPathType$fEqFnDeclTypePrettyAnnotatedprettyAnnUnresolvedprettyUnresolvedpretty'prettyAnnotatedprettyAnnotated'writeSourceFile writeTokens $fPrettySpan$fPrettyPosition$fPrettyUnsafety $fPrettyUnOp$fPrettyTokenStream$fPrettyTokenTree $fPrettyToken$fPrettyRangeLimits$fPrettyMutability$fPrettyLitTok$fPrettySuffix$fPrettyImplPolarity $fPrettyIdent $fPrettyBinOp$fPrettyBindingMode $fPrettyAbi$fPrettyAnnotatedWherePredicate$fPrettyAnnotatedWhereClause$fPrettyAnnotatedVisibility$fPrettyAnnotatedUseTree$fPrettyAnnotatedVariant$fPrettyAnnotatedTyParamBound$fPrettyAnnotatedTyParam$fPrettyAnnotatedTy$fPrettyAnnotatedTraitRef$fPrettyAnnotatedTraitItem$fPrettyAnnotatedStructField$fPrettyAnnotatedStmt$fPrettyAnnotatedPolyTraitRef$fPrettyAnnotatedPath$fPrettyAnnotatedPat$fPrettyAnnotatedNonterminal$fPrettyAnnotatedMac$fPrettyAnnotatedLit$fPrettyAnnotatedLifetimeDef$fPrettyAnnotatedLifetime$fPrettyAnnotatedItem$fPrettyAnnotatedImplItem$fPrettyAnnotatedGenerics$fPrettyAnnotatedForeignItem$fPrettyAnnotatedFnDecl$fPrettyAnnotatedFieldPat$fPrettyAnnotatedField$fPrettyAnnotatedExpr$fPrettyAnnotatedSourceFile$fPrettyAnnotatedBlock$fPrettyAnnotatedAttribute$fPrettyWherePredicate$fPrettyWhereClause$fPrettyVisibility$fPrettyUseTree$fPrettyVariant$fPrettyTyParamBound$fPrettyTyParam $fPrettyTy$fPrettyTraitRef$fPrettyTraitItem$fPrettyStructField $fPrettyStmt$fPrettyPolyTraitRef $fPrettyPath $fPrettyPat$fPrettyNonterminal $fPrettyMac $fPrettyLit$fPrettyLifetimeDef$fPrettyLifetime $fPrettyItem$fPrettyImplItem$fPrettyGenerics$fPrettyForeignItem$fPrettyFnDecl$fPrettyFieldPat $fPrettyField $fPrettyExpr$fPrettySourceFile $fPrettyBlock$fPrettyAttributelitattrtypatstmtstmtsexpritemitems sourceFileimplItem implItems traitItem tokenTreeparserparse'execParserTokensreadSourceFile readTokens$fParseWhereClause$fParseGenerics$fParseLifetimeDef$fParseTyParam$fParseTraitItem$fParseImplItem $fParseBlock$fParseTokenStream$fParseTokenTree$fParseSourceFile $fParseItem $fParseStmt $fParseExpr $fParsePat $fParseTy$fParseAttribute $fParseLitRustItemRustImplTopLevelrustItemComparator$fShowRustItem bytesInWord bitsInByteisPow2log'log2fakeSpanfSmkIntExpmkBin'mkBinU8mkBinExp offsetNamecontainsFnName firstLower firstUpperallUpper initSeqName bumpAllocName bumpValidName initAfterNamememsetUntilName castFromName fromIdxName toIdxName logBytesName bytesNameaddrName addrEndNameenumName structName getterNamereverseGetterName skipperName jumperNamenextNamebitsGetterNamebitsFromerNamefirstGetterNamemkTybytesAlignName logAlignNamefieldPtrGetterNamefieldPtrSetterNamefieldStructGetterNamefieldStructSetterName findExistsgenFixedWidthStructsgenMapsgenRust writeModule utf8Encode hashStringghc-prim GHC.TypesTruebaseGHC.IO.Handle.TypesHandleGHC.BaseString<> GHC.GenericsGeneric GHC.MaybeNothing Data.Maybemaybemempty printIntLit byte2Char char2Byte escapeByte escapeCharpadHexprintSourceFile printName printIdent printTypeprintMacprintSpaceBetweenprintTtprintTokenTreesprintTokenStreamSpprintTokenStream printToken printLitTokprintNonterminal printStmt printExprprintExprOuterAttrStyleprintStrexpressionAttrs printFieldprintRangeLimitsprintFnBlockArgsprintArm printBlockprintBlockWithAttrs printElse printBinOp printUnOpprintInnerAttrsprintOuterAttrsprintEitherAttrs printAttrprintCookedIdent printItemprintTraitItem printBounds printBoundprintFormalLifetimeList printImplItemprintDefprintAssociatedTypeprintMethodSigprintAssociatedConst printPolarityprintVisprintForeignItem printStructprintStructField printUnsafety printEnumDef printVariantprintWhereClauseprintWherePredicateprintFnprintFnArgsAndRetprintArg printLifetimeprintLifetimeDefprintMutabilityprintFullMutabilityprintPat printFieldPatprintBindingModeprintFnHeaderInfoprintAbiprintModprintForeignMod printGenericsprintPolyTraitRef printTraitRefprintPathParameters printPath printSegment printQPath printUseTree printTyParamprintLifetimeBounds modifyPState unescapeChar unescapeByte unescapeChar' unescapeByte'unescapeInteger unescapeFloatreadHexnumBase AlexInputtokenliteral rawString nestedCommentnextCharpeekChar greedyCharalexInputPrevChar alexGetBytealexMovecleanWindowsNewlinesIdentStructFieldBareStructFieldStmtItemModItemTermStmtAnyStmtAnyExprLitExpr LitOrPathExpr NoStructExprNoStructBlockExprSemiExprArgType GeneralArgNamedArgTyParamBoundType NoneBoundModBoundNoSelf VarNoSelf AllowSelfTyTypeAnyType NoSumTypeGHC.Num+ PrimParenType GHC.Classes< NoForTypePathTypeUsePathModPathAttrType EitherAttr InnerAttr OuterAttrresolveMResolveM Data.DynamicDynamiclogIssuewarncorrecterrscoperesolveSourceFile resolveIdent resolveAttrGHC.Real/* resolveLit resolvePathresolvePathParameters resolveQSelfresolveLifetimeresolveTraitRef resolveTy resolveFnDecl isSelfArgresolveTyParamBound resolveArg isSelfAlikeresolvePolyTraitRefresolveLifetimeDef resolvePatresolveFieldPatrhs2 resolveExpr resolveExprPparenE resolveField resolveArm resolveStmt resolveBlock resolveItemresolveForeignItemresolveWhereClauseresolveGenericsresolveTyParamresolveVariantresolveVariantDataresolveStructFieldresolveWherePredicateresolveTraitItemresolveImplItemresolveVisibilityMonoidresolveMethodSigresolveUseTree resolveMac resolveTtparseLit parseAttrparseTyparsePat parseStmt parseExpr parseItem parseBlock parseImplItemparseTraitItemparseTtparseTokenStream parseTyParamparseLifetimeDefparseWhereClause parseGenerics expParseErrortoIdenttoStmtnoVis withWherenoSafety macroItemaddAttrsparseSourceFilenudge parseStmts parseItemsparseImplItemsquoter mergeImpls findAlignment genAssocItemsgenDistributeContainsAttr subexpFirstsmkParammkRustTygenNeighborParents headerAttrsversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName