language-rust-0.1.0.0: Parsing and pretty printing of Rust code

Copyright(c) Alec Theriault 2017-2018
LicenseBSD-style
Maintaineralec.theriault@gmail.com
Stabilityexperimental
PortabilityGHC
Safe HaskellNone
LanguageHaskell2010

Language.Rust.Syntax

Contents

Description

This module defines Haskell data types corresponding to the abstract syntax tree(s) of the Rust language, based on the definitions rustc uses (defined in libsyntax) whenever possible. Unfortunately, since the internals of rustc are not exposed, there are no official docs. https://manishearth.github.io/rust-internals-docs/syntax/ast/index.html are the unofficial docs.

Synopsis

Abstract syntax trees

Top level

data SourceFile a Source #

This 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:

#!/usr/bin/env rust

#![allow(dead_code)]

fn main() {
  println!("Hello world")
}

Constructors

SourceFile (Maybe Name) [Attribute a] [Item a] 

Instances

Functor SourceFile Source # 

Methods

fmap :: (a -> b) -> SourceFile a -> SourceFile b #

(<$) :: a -> SourceFile b -> SourceFile a #

Generic1 SourceFile Source # 

Associated Types

type Rep1 (SourceFile :: * -> *) :: * -> * #

PrettyAnnotated SourceFile Source # 
Eq a => Eq (SourceFile a) Source # 

Methods

(==) :: SourceFile a -> SourceFile a -> Bool #

(/=) :: SourceFile a -> SourceFile a -> Bool #

Data a => Data (SourceFile a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SourceFile a -> c (SourceFile a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (SourceFile a) #

toConstr :: SourceFile a -> Constr #

dataTypeOf :: SourceFile a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (SourceFile a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (SourceFile a)) #

gmapT :: (forall b. Data b => b -> b) -> SourceFile a -> SourceFile a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SourceFile a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SourceFile a -> r #

gmapQ :: (forall d. Data d => d -> u) -> SourceFile a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SourceFile a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SourceFile a -> m (SourceFile a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceFile a -> m (SourceFile a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceFile a -> m (SourceFile a) #

Ord a => Ord (SourceFile a) Source # 
Show a => Show (SourceFile a) Source # 
Generic (SourceFile a) Source # 

Associated Types

type Rep (SourceFile a) :: * -> * #

Methods

from :: SourceFile a -> Rep (SourceFile a) x #

to :: Rep (SourceFile a) x -> SourceFile a #

NFData a => NFData (SourceFile a) Source # 

Methods

rnf :: SourceFile a -> () #

Parse (SourceFile Span) Source # 
(Typeable * a, Monoid a) => Resolve (SourceFile a) Source # 
Pretty (SourceFile a) Source # 
type Rep1 SourceFile Source # 
type Rep (SourceFile a) Source # 

General

data Mutability Source #

Encodes whether something can be updated or changed (syntax::ast::Mutability).

Constructors

Mutable 
Immutable 

Instances

Bounded Mutability Source # 
Enum Mutability Source # 
Eq Mutability Source # 
Data Mutability Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Mutability -> c Mutability #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Mutability #

toConstr :: Mutability -> Constr #

dataTypeOf :: Mutability -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Mutability) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Mutability) #

gmapT :: (forall b. Data b => b -> b) -> Mutability -> Mutability #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Mutability -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Mutability -> r #

gmapQ :: (forall d. Data d => d -> u) -> Mutability -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Mutability -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Mutability -> m Mutability #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Mutability -> m Mutability #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Mutability -> m Mutability #

Ord Mutability Source # 
Show Mutability Source # 
Generic Mutability Source # 

Associated Types

type Rep Mutability :: * -> * #

NFData Mutability Source # 

Methods

rnf :: Mutability -> () #

Pretty Mutability Source # 
type Rep Mutability Source # 
type Rep Mutability = D1 (MetaData "Mutability" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) (C1 (MetaCons "Mutable" PrefixI False) U1) (C1 (MetaCons "Immutable" PrefixI False) U1))

data Unsafety Source #

Qualifies whether something is using unsafe Rust or not (syntax::ast::Unsafety). Note that we also use this to describe whether a Block is unsafe or not, while Rust has a seperate structure (syntax::ast::BlockCheckMode) for that. This is because they also need to keep track of whether an unsafe block is compiler generated.

Constructors

Unsafe 
Normal 

Instances

Bounded Unsafety Source # 
Enum Unsafety Source # 
Eq Unsafety Source # 
Data Unsafety Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Unsafety -> c Unsafety #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Unsafety #

toConstr :: Unsafety -> Constr #

dataTypeOf :: Unsafety -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Unsafety) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Unsafety) #

gmapT :: (forall b. Data b => b -> b) -> Unsafety -> Unsafety #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Unsafety -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Unsafety -> r #

gmapQ :: (forall d. Data d => d -> u) -> Unsafety -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Unsafety -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Unsafety -> m Unsafety #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Unsafety -> m Unsafety #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Unsafety -> m Unsafety #

Ord Unsafety Source # 
Show Unsafety Source # 
Generic Unsafety Source # 

Associated Types

type Rep Unsafety :: * -> * #

Methods

from :: Unsafety -> Rep Unsafety x #

to :: Rep Unsafety x -> Unsafety #

NFData Unsafety Source # 

Methods

rnf :: Unsafety -> () #

Pretty Unsafety Source # 
type Rep Unsafety Source # 
type Rep Unsafety = D1 (MetaData "Unsafety" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) (C1 (MetaCons "Unsafe" PrefixI False) U1) (C1 (MetaCons "Normal" PrefixI False) U1))

data Arg a Source #

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);
}

Constructors

Arg (Maybe (Pat a)) (Ty a) a

Regular argument

SelfValue Mutability a

Self argument, by value

SelfRegion (Maybe (Lifetime a)) Mutability a

Self argument, by reference

SelfExplicit (Ty a) Mutability a

Explicit self argument

Instances

Functor Arg Source # 

Methods

fmap :: (a -> b) -> Arg a -> Arg b #

(<$) :: a -> Arg b -> Arg a #

Generic1 Arg Source # 

Associated Types

type Rep1 (Arg :: * -> *) :: * -> * #

Methods

from1 :: Arg a -> Rep1 Arg a #

to1 :: Rep1 Arg a -> Arg a #

Eq a => Eq (Arg a) Source # 

Methods

(==) :: Arg a -> Arg a -> Bool #

(/=) :: Arg a -> Arg a -> Bool #

Data a => Data (Arg a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Arg a -> c (Arg a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Arg a) #

toConstr :: Arg a -> Constr #

dataTypeOf :: Arg a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Arg a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Arg a)) #

gmapT :: (forall b. Data b => b -> b) -> Arg a -> Arg a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Arg a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Arg a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Arg a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Arg a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Arg a -> m (Arg a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Arg a -> m (Arg a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Arg a -> m (Arg a) #

Ord a => Ord (Arg a) Source # 

Methods

compare :: Arg a -> Arg a -> Ordering #

(<) :: Arg a -> Arg a -> Bool #

(<=) :: Arg a -> Arg a -> Bool #

(>) :: Arg a -> Arg a -> Bool #

(>=) :: Arg a -> Arg a -> Bool #

max :: Arg a -> Arg a -> Arg a #

min :: Arg a -> Arg a -> Arg a #

Show a => Show (Arg a) Source # 

Methods

showsPrec :: Int -> Arg a -> ShowS #

show :: Arg a -> String #

showList :: [Arg a] -> ShowS #

Generic (Arg a) Source # 

Associated Types

type Rep (Arg a) :: * -> * #

Methods

from :: Arg a -> Rep (Arg a) x #

to :: Rep (Arg a) x -> Arg a #

NFData a => NFData (Arg a) Source # 

Methods

rnf :: Arg a -> () #

Located a => Located (Arg a) Source # 

Methods

spanOf :: Arg a -> Span Source #

(Typeable * a, Monoid a) => Resolve (Arg a) Source # 

Methods

resolve :: Arg a -> Either ResolveFail (Arg a) Source #

resolve' :: Arg a -> Arg a Source #

resolveVerbose :: Arg a -> (Arg a, Severity, [Issue]) Source #

resolveM :: Arg a -> ResolveM (Arg a)

type Rep1 Arg Source # 
type Rep (Arg a) Source # 

data FnDecl a Source #

Header (not the body) of a function declaration (syntax::ast::FnDecl). The Bool 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
}

Constructors

FnDecl [Arg a] (Maybe (Ty a)) Bool a 

Instances

Functor FnDecl Source # 

Methods

fmap :: (a -> b) -> FnDecl a -> FnDecl b #

(<$) :: a -> FnDecl b -> FnDecl a #

Generic1 FnDecl Source # 

Associated Types

type Rep1 (FnDecl :: * -> *) :: * -> * #

Methods

from1 :: FnDecl a -> Rep1 FnDecl a #

to1 :: Rep1 FnDecl a -> FnDecl a #

PrettyAnnotated FnDecl Source # 
Eq a => Eq (FnDecl a) Source # 

Methods

(==) :: FnDecl a -> FnDecl a -> Bool #

(/=) :: FnDecl a -> FnDecl a -> Bool #

Data a => Data (FnDecl a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FnDecl a -> c (FnDecl a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (FnDecl a) #

toConstr :: FnDecl a -> Constr #

dataTypeOf :: FnDecl a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (FnDecl a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (FnDecl a)) #

gmapT :: (forall b. Data b => b -> b) -> FnDecl a -> FnDecl a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FnDecl a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FnDecl a -> r #

gmapQ :: (forall d. Data d => d -> u) -> FnDecl a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> FnDecl a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> FnDecl a -> m (FnDecl a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FnDecl a -> m (FnDecl a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FnDecl a -> m (FnDecl a) #

Ord a => Ord (FnDecl a) Source # 

Methods

compare :: FnDecl a -> FnDecl a -> Ordering #

(<) :: FnDecl a -> FnDecl a -> Bool #

(<=) :: FnDecl a -> FnDecl a -> Bool #

(>) :: FnDecl a -> FnDecl a -> Bool #

(>=) :: FnDecl a -> FnDecl a -> Bool #

max :: FnDecl a -> FnDecl a -> FnDecl a #

min :: FnDecl a -> FnDecl a -> FnDecl a #

Show a => Show (FnDecl a) Source # 

Methods

showsPrec :: Int -> FnDecl a -> ShowS #

show :: FnDecl a -> String #

showList :: [FnDecl a] -> ShowS #

Generic (FnDecl a) Source # 

Associated Types

type Rep (FnDecl a) :: * -> * #

Methods

from :: FnDecl a -> Rep (FnDecl a) x #

to :: Rep (FnDecl a) x -> FnDecl a #

NFData a => NFData (FnDecl a) Source # 

Methods

rnf :: FnDecl a -> () #

Located a => Located (FnDecl a) Source # 

Methods

spanOf :: FnDecl a -> Span Source #

(Typeable * a, Monoid a) => Resolve (FnDecl a) Source # 
Pretty (FnDecl a) Source # 
type Rep1 FnDecl Source # 
type Rep (FnDecl a) Source # 

Paths

data Path a Source #

Everything in Rust is namespaced using nested modules. A Path represents a path into nested modules, possibly instantiating type parameters along the way (syntax::ast::Path). 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 PathExpr), types (see PathTy), and modules (indirectly through ViewPath and such).

The Bool argument identifies whether the path is relative or absolute.

Example: std::cmp::PartialEq

Constructors

Path Bool [PathSegment a] a 

Instances

Functor Path Source # 

Methods

fmap :: (a -> b) -> Path a -> Path b #

(<$) :: a -> Path b -> Path a #

Generic1 Path Source # 

Associated Types

type Rep1 (Path :: * -> *) :: * -> * #

Methods

from1 :: Path a -> Rep1 Path a #

to1 :: Rep1 Path a -> Path a #

PrettyAnnotated Path Source # 
Eq a => Eq (Path a) Source # 

Methods

(==) :: Path a -> Path a -> Bool #

(/=) :: Path a -> Path a -> Bool #

Data a => Data (Path a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Path a -> c (Path a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Path a) #

toConstr :: Path a -> Constr #

dataTypeOf :: Path a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Path a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Path a)) #

gmapT :: (forall b. Data b => b -> b) -> Path a -> Path a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Path a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Path a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Path a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Path a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Path a -> m (Path a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Path a -> m (Path a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Path a -> m (Path a) #

Ord a => Ord (Path a) Source # 

Methods

compare :: Path a -> Path a -> Ordering #

(<) :: Path a -> Path a -> Bool #

(<=) :: Path a -> Path a -> Bool #

(>) :: Path a -> Path a -> Bool #

(>=) :: Path a -> Path a -> Bool #

max :: Path a -> Path a -> Path a #

min :: Path a -> Path a -> Path a #

Show a => Show (Path a) Source # 

Methods

showsPrec :: Int -> Path a -> ShowS #

show :: Path a -> String #

showList :: [Path a] -> ShowS #

Generic (Path a) Source # 

Associated Types

type Rep (Path a) :: * -> * #

Methods

from :: Path a -> Rep (Path a) x #

to :: Rep (Path a) x -> Path a #

NFData a => NFData (Path a) Source # 

Methods

rnf :: Path a -> () #

Located a => Located (Path a) Source # 

Methods

spanOf :: Path a -> Span Source #

(Typeable * a, Monoid a) => Resolve (Path a) Source #

There are three potential instances for resolving a path (depending on what type it is). The Resolve instance for Path will let through any path.

Methods

resolve :: Path a -> Either ResolveFail (Path a) Source #

resolve' :: Path a -> Path a Source #

resolveVerbose :: Path a -> (Path a, Severity, [Issue]) Source #

resolveM :: Path a -> ResolveM (Path a)

Pretty (Path a) Source # 

Methods

prettyUnresolved :: Path a -> Doc b Source #

type Rep1 Path Source # 
type Rep (Path a) Source # 

data PathParameters a Source #

Parameters on a path segment (syntax::ast::PathParameters).

Constructors

AngleBracketed [Lifetime a] [Ty a] [(Ident, Ty a)] a

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>

Parenthesized [Ty a] (Maybe (Ty a)) a

Parameters 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) -> C

Instances

Functor PathParameters Source # 

Methods

fmap :: (a -> b) -> PathParameters a -> PathParameters b #

(<$) :: a -> PathParameters b -> PathParameters a #

Generic1 PathParameters Source # 

Associated Types

type Rep1 (PathParameters :: * -> *) :: * -> * #

Eq a => Eq (PathParameters a) Source # 
Data a => Data (PathParameters a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PathParameters a -> c (PathParameters a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (PathParameters a) #

toConstr :: PathParameters a -> Constr #

dataTypeOf :: PathParameters a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (PathParameters a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (PathParameters a)) #

gmapT :: (forall b. Data b => b -> b) -> PathParameters a -> PathParameters a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PathParameters a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PathParameters a -> r #

gmapQ :: (forall d. Data d => d -> u) -> PathParameters a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PathParameters a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PathParameters a -> m (PathParameters a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PathParameters a -> m (PathParameters a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PathParameters a -> m (PathParameters a) #

Ord a => Ord (PathParameters a) Source # 
Show a => Show (PathParameters a) Source # 
Generic (PathParameters a) Source # 

Associated Types

type Rep (PathParameters a) :: * -> * #

NFData a => NFData (PathParameters a) Source # 

Methods

rnf :: PathParameters a -> () #

Located a => Located (PathParameters a) Source # 
(Typeable * a, Monoid a) => Resolve (PathParameters a) Source # 
type Rep1 PathParameters Source # 
type Rep (PathParameters a) Source # 

data PathSegment a Source #

Segment of a path (syntax::ast::PathSegment).

Constructors

PathSegment Ident (Maybe (PathParameters a)) a 

Instances

Functor PathSegment Source # 

Methods

fmap :: (a -> b) -> PathSegment a -> PathSegment b #

(<$) :: a -> PathSegment b -> PathSegment a #

Generic1 PathSegment Source # 

Associated Types

type Rep1 (PathSegment :: * -> *) :: * -> * #

Eq a => Eq (PathSegment a) Source # 
Data a => Data (PathSegment a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PathSegment a -> c (PathSegment a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (PathSegment a) #

toConstr :: PathSegment a -> Constr #

dataTypeOf :: PathSegment a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (PathSegment a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (PathSegment a)) #

gmapT :: (forall b. Data b => b -> b) -> PathSegment a -> PathSegment a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PathSegment a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PathSegment a -> r #

gmapQ :: (forall d. Data d => d -> u) -> PathSegment a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PathSegment a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PathSegment a -> m (PathSegment a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PathSegment a -> m (PathSegment a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PathSegment a -> m (PathSegment a) #

Ord a => Ord (PathSegment a) Source # 
Show a => Show (PathSegment a) Source # 
Generic (PathSegment a) Source # 

Associated Types

type Rep (PathSegment a) :: * -> * #

Methods

from :: PathSegment a -> Rep (PathSegment a) x #

to :: Rep (PathSegment a) x -> PathSegment a #

NFData a => NFData (PathSegment a) Source # 

Methods

rnf :: PathSegment a -> () #

Located a => Located (PathSegment a) Source # 

Methods

spanOf :: PathSegment a -> Span Source #

type Rep1 PathSegment Source # 
type Rep (PathSegment a) Source # 

data QSelf a Source #

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 Self and the second is the index of the associated qualified with this Self type

Constructors

QSelf (Ty a) Int 

Instances

Functor QSelf Source # 

Methods

fmap :: (a -> b) -> QSelf a -> QSelf b #

(<$) :: a -> QSelf b -> QSelf a #

Generic1 QSelf Source # 

Associated Types

type Rep1 (QSelf :: * -> *) :: * -> * #

Methods

from1 :: QSelf a -> Rep1 QSelf a #

to1 :: Rep1 QSelf a -> QSelf a #

Eq a => Eq (QSelf a) Source # 

Methods

(==) :: QSelf a -> QSelf a -> Bool #

(/=) :: QSelf a -> QSelf a -> Bool #

Data a => Data (QSelf a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> QSelf a -> c (QSelf a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (QSelf a) #

toConstr :: QSelf a -> Constr #

dataTypeOf :: QSelf a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (QSelf a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (QSelf a)) #

gmapT :: (forall b. Data b => b -> b) -> QSelf a -> QSelf a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> QSelf a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> QSelf a -> r #

gmapQ :: (forall d. Data d => d -> u) -> QSelf a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> QSelf a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> QSelf a -> m (QSelf a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> QSelf a -> m (QSelf a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> QSelf a -> m (QSelf a) #

Ord a => Ord (QSelf a) Source # 

Methods

compare :: QSelf a -> QSelf a -> Ordering #

(<) :: QSelf a -> QSelf a -> Bool #

(<=) :: QSelf a -> QSelf a -> Bool #

(>) :: QSelf a -> QSelf a -> Bool #

(>=) :: QSelf a -> QSelf a -> Bool #

max :: QSelf a -> QSelf a -> QSelf a #

min :: QSelf a -> QSelf a -> QSelf a #

Show a => Show (QSelf a) Source # 

Methods

showsPrec :: Int -> QSelf a -> ShowS #

show :: QSelf a -> String #

showList :: [QSelf a] -> ShowS #

Generic (QSelf a) Source # 

Associated Types

type Rep (QSelf a) :: * -> * #

Methods

from :: QSelf a -> Rep (QSelf a) x #

to :: Rep (QSelf a) x -> QSelf a #

NFData a => NFData (QSelf a) Source # 

Methods

rnf :: QSelf a -> () #

(Typeable * a, Monoid a) => Resolve (QSelf a) Source # 
type Rep1 QSelf Source # 
type Rep1 QSelf = D1 (MetaData "QSelf" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) (C1 (MetaCons "QSelf" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Ty)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))))
type Rep (QSelf a) Source # 
type Rep (QSelf a) = D1 (MetaData "QSelf" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) (C1 (MetaCons "QSelf" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ty a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))))

Attributes

data Attribute a Source #

Attributes are annotations for other AST nodes (syntax::ast::Attribute). Note that doc-comments are promoted to attributes.

Example: #[derive(Copy,Clone)] as in

#[derive(Clone, Copy)]
struct Complex { re: f32, im: f32 }

Constructors

Attribute AttrStyle (Path a) TokenStream a

Regular attributes of the form #[...]

SugaredDoc AttrStyle Bool Name a

Doc comment attributes. The Bool argument identifies if the comment is inline or not, and the Name contains the actual doc comment content.

Instances

Functor Attribute Source # 

Methods

fmap :: (a -> b) -> Attribute a -> Attribute b #

(<$) :: a -> Attribute b -> Attribute a #

Generic1 Attribute Source # 

Associated Types

type Rep1 (Attribute :: * -> *) :: * -> * #

PrettyAnnotated Attribute Source #

This instance prints attributes inline

Eq a => Eq (Attribute a) Source # 

Methods

(==) :: Attribute a -> Attribute a -> Bool #

(/=) :: Attribute a -> Attribute a -> Bool #

Data a => Data (Attribute a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Attribute a -> c (Attribute a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Attribute a) #

toConstr :: Attribute a -> Constr #

dataTypeOf :: Attribute a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Attribute a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Attribute a)) #

gmapT :: (forall b. Data b => b -> b) -> Attribute a -> Attribute a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Attribute a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Attribute a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Attribute a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Attribute a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Attribute a -> m (Attribute a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Attribute a -> m (Attribute a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Attribute a -> m (Attribute a) #

Ord a => Ord (Attribute a) Source # 
Show a => Show (Attribute a) Source # 
Generic (Attribute a) Source # 

Associated Types

type Rep (Attribute a) :: * -> * #

Methods

from :: Attribute a -> Rep (Attribute a) x #

to :: Rep (Attribute a) x -> Attribute a #

NFData a => NFData (Attribute a) Source # 

Methods

rnf :: Attribute a -> () #

Located a => Located (Attribute a) Source # 

Methods

spanOf :: Attribute a -> Span Source #

Parse (Attribute Span) Source # 
(Typeable * a, Monoid a) => Resolve (Attribute a) Source # 
Pretty (Attribute a) Source # 
type Rep1 Attribute Source # 
type Rep (Attribute a) Source # 

data AttrStyle Source #

Distinguishes between attributes that decorate what follows them and attributes that are describe the node that contains them (syntax::ast::AttrStyle). 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 one

Constructors

Outer 
Inner 

Instances

Bounded AttrStyle Source # 
Enum AttrStyle Source # 
Eq AttrStyle Source # 
Data AttrStyle Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AttrStyle -> c AttrStyle #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AttrStyle #

toConstr :: AttrStyle -> Constr #

dataTypeOf :: AttrStyle -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c AttrStyle) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AttrStyle) #

gmapT :: (forall b. Data b => b -> b) -> AttrStyle -> AttrStyle #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AttrStyle -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AttrStyle -> r #

gmapQ :: (forall d. Data d => d -> u) -> AttrStyle -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> AttrStyle -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> AttrStyle -> m AttrStyle #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AttrStyle -> m AttrStyle #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AttrStyle -> m AttrStyle #

Ord AttrStyle Source # 
Show AttrStyle Source # 
Generic AttrStyle Source # 

Associated Types

type Rep AttrStyle :: * -> * #

NFData AttrStyle Source # 

Methods

rnf :: AttrStyle -> () #

type Rep AttrStyle Source # 
type Rep AttrStyle = D1 (MetaData "AttrStyle" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) (C1 (MetaCons "Outer" PrefixI False) U1) (C1 (MetaCons "Inner" PrefixI False) U1))

Literals

data Lit a Source #

Literals in Rust (syntax::ast::Lit). As discussed in Suffix, Rust AST is designed to parse suffixes for all literals, even if they are currently only valid on Int and Float literals.

Constructors

Str String StrStyle Suffix a

string (example: "foo")

ByteStr [Word8] StrStyle Suffix a

byte string (example: b"foo")

Char Char Suffix a

character (example: 'a')

Byte Word8 Suffix a

byte (example: b'f')

Int IntRep Integer Suffix a

integer (example: 1i32)

Float Double Suffix a

float (example: 1.12e4)

Bool Bool Suffix a

boolean (example: true)

Instances

Functor Lit Source # 

Methods

fmap :: (a -> b) -> Lit a -> Lit b #

(<$) :: a -> Lit b -> Lit a #

Generic1 Lit Source # 

Associated Types

type Rep1 (Lit :: * -> *) :: * -> * #

Methods

from1 :: Lit a -> Rep1 Lit a #

to1 :: Rep1 Lit a -> Lit a #

PrettyAnnotated Lit Source # 
Eq a => Eq (Lit a) Source # 

Methods

(==) :: Lit a -> Lit a -> Bool #

(/=) :: Lit a -> Lit a -> Bool #

Data a => Data (Lit a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Lit a -> c (Lit a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Lit a) #

toConstr :: Lit a -> Constr #

dataTypeOf :: Lit a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Lit a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Lit a)) #

gmapT :: (forall b. Data b => b -> b) -> Lit a -> Lit a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Lit a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Lit a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Lit a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Lit a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Lit a -> m (Lit a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Lit a -> m (Lit a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Lit a -> m (Lit a) #

Ord a => Ord (Lit a) Source # 

Methods

compare :: Lit a -> Lit a -> Ordering #

(<) :: Lit a -> Lit a -> Bool #

(<=) :: Lit a -> Lit a -> Bool #

(>) :: Lit a -> Lit a -> Bool #

(>=) :: Lit a -> Lit a -> Bool #

max :: Lit a -> Lit a -> Lit a #

min :: Lit a -> Lit a -> Lit a #

Show a => Show (Lit a) Source # 

Methods

showsPrec :: Int -> Lit a -> ShowS #

show :: Lit a -> String #

showList :: [Lit a] -> ShowS #

Generic (Lit a) Source # 

Associated Types

type Rep (Lit a) :: * -> * #

Methods

from :: Lit a -> Rep (Lit a) x #

to :: Rep (Lit a) x -> Lit a #

NFData a => NFData (Lit a) Source # 

Methods

rnf :: Lit a -> () #

Located a => Located (Lit a) Source # 

Methods

spanOf :: Lit a -> Span Source #

Parse (Lit Span) Source # 

Methods

parser :: P (Lit Span) Source #

Resolve (Lit a) Source # 

Methods

resolve :: Lit a -> Either ResolveFail (Lit a) Source #

resolve' :: Lit a -> Lit a Source #

resolveVerbose :: Lit a -> (Lit a, Severity, [Issue]) Source #

resolveM :: Lit a -> ResolveM (Lit a)

Pretty (Lit a) Source # 

Methods

prettyUnresolved :: Lit a -> Doc b Source #

type Rep1 Lit Source # 
type Rep1 Lit = D1 (MetaData "Lit" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) ((:+:) (C1 (MetaCons "Str" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 StrStyle))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Suffix)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) ((:+:) (C1 (MetaCons "ByteStr" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Word8])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 StrStyle))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Suffix)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) (C1 (MetaCons "Char" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Char)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Suffix)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))))) ((:+:) ((:+:) (C1 (MetaCons "Byte" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Word8)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Suffix)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) (C1 (MetaCons "Int" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IntRep)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Integer))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Suffix)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) ((:+:) (C1 (MetaCons "Float" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Double)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Suffix)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) (C1 (MetaCons "Bool" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Suffix)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))))))
type Rep (Lit a) Source # 
type Rep (Lit a) = D1 (MetaData "Lit" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) ((:+:) (C1 (MetaCons "Str" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 StrStyle))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Suffix)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) ((:+:) (C1 (MetaCons "ByteStr" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Word8])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 StrStyle))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Suffix)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) (C1 (MetaCons "Char" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Char)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Suffix)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))))) ((:+:) ((:+:) (C1 (MetaCons "Byte" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Word8)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Suffix)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) (C1 (MetaCons "Int" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IntRep)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Integer))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Suffix)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) ((:+:) (C1 (MetaCons "Float" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Double)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Suffix)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) (C1 (MetaCons "Bool" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Suffix)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))))))

byteStr :: String -> StrStyle -> Suffix -> a -> Lit a Source #

Smart constructor for ByteStr

data Suffix Source #

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. RFC about future-proofing literal suffixes

Examples: i32, isize, and f32

Constructors

Unsuffixed 
Is 
I8 
I16 
I32 
I64 
I128 
Us 
U8 
U16 
U32 
U64 
U128 
F32 
F64 

Instances

Bounded Suffix Source # 
Enum Suffix Source # 
Eq Suffix Source # 

Methods

(==) :: Suffix -> Suffix -> Bool #

(/=) :: Suffix -> Suffix -> Bool #

Data Suffix Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Suffix -> c Suffix #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Suffix #

toConstr :: Suffix -> Constr #

dataTypeOf :: Suffix -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Suffix) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Suffix) #

gmapT :: (forall b. Data b => b -> b) -> Suffix -> Suffix #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Suffix -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Suffix -> r #

gmapQ :: (forall d. Data d => d -> u) -> Suffix -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Suffix -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Suffix -> m Suffix #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Suffix -> m Suffix #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Suffix -> m Suffix #

Ord Suffix Source # 
Show Suffix Source # 
Generic Suffix Source # 

Associated Types

type Rep Suffix :: * -> * #

Methods

from :: Suffix -> Rep Suffix x #

to :: Rep Suffix x -> Suffix #

NFData Suffix Source # 

Methods

rnf :: Suffix -> () #

Pretty Suffix Source # 
type Rep Suffix Source # 
type Rep Suffix = D1 (MetaData "Suffix" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "Unsuffixed" PrefixI False) U1) ((:+:) (C1 (MetaCons "Is" PrefixI False) U1) (C1 (MetaCons "I8" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "I16" PrefixI False) U1) (C1 (MetaCons "I32" PrefixI False) U1)) ((:+:) (C1 (MetaCons "I64" PrefixI False) U1) (C1 (MetaCons "I128" PrefixI False) U1)))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "Us" PrefixI False) U1) (C1 (MetaCons "U8" PrefixI False) U1)) ((:+:) (C1 (MetaCons "U16" PrefixI False) U1) (C1 (MetaCons "U32" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "U64" PrefixI False) U1) (C1 (MetaCons "U128" PrefixI False) U1)) ((:+:) (C1 (MetaCons "F32" PrefixI False) U1) (C1 (MetaCons "F64" PrefixI False) U1)))))

suffix :: Lit a -> Suffix Source #

Extract the suffix from a Lit

data IntRep Source #

The base of the number in an Int literal can be binary (like 0b1100), octal (like 0o14), decimal (like 12), or hexadecimal (like 0xc).

Constructors

Bin 
Oct 
Dec 
Hex 

Instances

Bounded IntRep Source # 
Enum IntRep Source # 
Eq IntRep Source # 

Methods

(==) :: IntRep -> IntRep -> Bool #

(/=) :: IntRep -> IntRep -> Bool #

Data IntRep Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IntRep -> c IntRep #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IntRep #

toConstr :: IntRep -> Constr #

dataTypeOf :: IntRep -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c IntRep) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IntRep) #

gmapT :: (forall b. Data b => b -> b) -> IntRep -> IntRep #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IntRep -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IntRep -> r #

gmapQ :: (forall d. Data d => d -> u) -> IntRep -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> IntRep -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> IntRep -> m IntRep #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IntRep -> m IntRep #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IntRep -> m IntRep #

Ord IntRep Source # 
Show IntRep Source # 
Generic IntRep Source # 

Associated Types

type Rep IntRep :: * -> * #

Methods

from :: IntRep -> Rep IntRep x #

to :: Rep IntRep x -> IntRep #

NFData IntRep Source # 

Methods

rnf :: IntRep -> () #

type Rep IntRep Source # 
type Rep IntRep = D1 (MetaData "IntRep" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) ((:+:) (C1 (MetaCons "Bin" PrefixI False) U1) (C1 (MetaCons "Oct" PrefixI False) U1)) ((:+:) (C1 (MetaCons "Dec" PrefixI False) U1) (C1 (MetaCons "Hex" PrefixI False) U1)))

data StrStyle Source #

Style of a string literal (syntax::ast::StrStyle).

Constructors

Cooked

regular strings (example: "foo")

Raw Int

raw strings, with the number of # delimiters (example: r##)

Instances

Eq StrStyle Source # 
Data StrStyle Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StrStyle -> c StrStyle #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c StrStyle #

toConstr :: StrStyle -> Constr #

dataTypeOf :: StrStyle -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c StrStyle) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StrStyle) #

gmapT :: (forall b. Data b => b -> b) -> StrStyle -> StrStyle #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StrStyle -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StrStyle -> r #

gmapQ :: (forall d. Data d => d -> u) -> StrStyle -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> StrStyle -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> StrStyle -> m StrStyle #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StrStyle -> m StrStyle #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StrStyle -> m StrStyle #

Ord StrStyle Source # 
Show StrStyle Source # 
Generic StrStyle Source # 

Associated Types

type Rep StrStyle :: * -> * #

Methods

from :: StrStyle -> Rep StrStyle x #

to :: Rep StrStyle x -> StrStyle #

NFData StrStyle Source # 

Methods

rnf :: StrStyle -> () #

type Rep StrStyle Source # 
type Rep StrStyle = D1 (MetaData "StrStyle" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) (C1 (MetaCons "Cooked" PrefixI False) U1) (C1 (MetaCons "Raw" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))))

Expressions

data Expr a Source #

Expression (syntax::ast::Expr). Note that Rust pushes into expressions an unusual number of constructs including if, while, match, etc.

Constructors

Box [Attribute a] (Expr a) a

box expression (example: box x)

InPlace [Attribute a] (Expr a) (Expr a) a

in-place expression - first Expr is the place, second one is the value (example: x <- y)

Vec [Attribute a] [Expr a] a

array literal (example: [a, b, c, d])

Call [Attribute a] (Expr a) [Expr a] a

function call where the first Expr is the function itself, and the [Expr] is the list of arguments (example: foo(1,2,x))

MethodCall [Attribute a] (Expr a) Ident (Maybe [Ty a]) [Expr a] a

method call where the first Expr is the receiver, Ident is the method name, Maybe [Ty] the list of type arguments and '[Expr]' the arguments to the method. (example: x.foo::<Bar, Baz>(a, b, c, d)

TupExpr [Attribute a] [Expr a] a

tuple (example: (a, b, c ,d))

Binary [Attribute a] BinOp (Expr a) (Expr a) a

binary operation (example: a + b, a * b)

Unary [Attribute a] UnOp (Expr a) a

unary operation (example: !x, *x)

Lit [Attribute a] (Lit a) a

literal (example: 1, "foo")

Cast [Attribute a] (Expr a) (Ty a) a

cast (example: foo as f64)

TypeAscription [Attribute a] (Expr a) (Ty a) a

type annotation (example: x: i32)

If [Attribute a] (Expr a) (Block a) (Maybe (Expr a)) a

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) }

IfLet [Attribute a] (NonEmpty (Pat a)) (Expr a) (Block a) (Maybe (Expr a)) a

if-let expression with an optional else block (example: if let Some(x) = None { () })

While [Attribute a] (Expr a) (Block a) (Maybe (Label a)) a

while loop, with an optional label (example: 'lbl: while 1 == 1 { break 'lbl })

WhileLet [Attribute a] (NonEmpty (Pat a)) (Expr a) (Block a) (Maybe (Label a)) a

while-let loop, with an optional label (example: while let Some(x) = None { x })

ForLoop [Attribute a] (Pat a) (Expr a) (Block a) (Maybe (Label a)) a

for loop, with an optional label (example: for i in 1..10 { println!("{}",i) })

Loop [Attribute a] (Block a) (Maybe (Label a)) a

conditionless loop (can be exited with Break, Continue, or Ret)

Match [Attribute a] (Expr a) [Arm a] a

match block

Closure [Attribute a] Movability CaptureBy (FnDecl a) (Expr a) a

closure (example: move |a, b, c| { a + b + c })

BlockExpr [Attribute a] (Block a) a

(possibly unsafe) block (example: unsafe { 1 })

Catch [Attribute a] (Block a) a

a catch block (example: do catch { 1 })

Assign [Attribute a] (Expr a) (Expr a) a

assignment (example: a = foo())

AssignOp [Attribute a] BinOp (Expr a) (Expr a) a

assignment with an operator (example: a += 1)

FieldAccess [Attribute a] (Expr a) Ident a

access of a named struct field (example: obj.foo)

TupField [Attribute a] (Expr a) Int a

access of an unnamed field of a struct or tuple-struct (example: foo.0)

Index [Attribute a] (Expr a) (Expr a) a

indexing operation (example: foo[2])

Range [Attribute a] (Maybe (Expr a)) (Maybe (Expr a)) RangeLimits a

range (examples: 1..2, 1.., ..2, 1...2, 1..., ...2)

PathExpr [Attribute a] (Maybe (QSelf a)) (Path a) a

variable reference

AddrOf [Attribute a] Mutability (Expr a) a

referencing operation (example: &a or &mut a)

Break [Attribute a] (Maybe (Label a)) (Maybe (Expr a)) a

break with an optional label and expression denoting what to break out of and what to return (example: break 'lbl 1)

Continue [Attribute a] (Maybe (Label a)) a

continue with an optional label (example: continue)

Ret [Attribute a] (Maybe (Expr a)) a

return with an optional value to be returned (example: return 1)

MacExpr [Attribute a] (Mac a) a

macro invocation before expansion

Struct [Attribute a] (Path a) [Field a] (Maybe (Expr a)) a

struct literal expression (examples: Foo { x: 1, y: 2 } or Foo { x: 1, ..base })

Repeat [Attribute a] (Expr a) (Expr a) a

array literal constructed from one repeated element (example: [1; 5])

ParenExpr [Attribute a] (Expr a) a

no-op: used solely so we can pretty print faithfully

Try [Attribute a] (Expr a) a

sugar for error handling with Result (example: parsed_result?)

Yield [Attribute a] (Maybe (Expr a)) a

a yield with an optional value to yielf (example: yield 1)

Instances

Functor Expr Source # 

Methods

fmap :: (a -> b) -> Expr a -> Expr b #

(<$) :: a -> Expr b -> Expr a #

Generic1 Expr Source # 

Associated Types

type Rep1 (Expr :: * -> *) :: * -> * #

Methods

from1 :: Expr a -> Rep1 Expr a #

to1 :: Rep1 Expr a -> Expr a #

PrettyAnnotated Expr Source # 
Eq a => Eq (Expr a) Source # 

Methods

(==) :: Expr a -> Expr a -> Bool #

(/=) :: Expr a -> Expr a -> Bool #

Data a => Data (Expr a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Expr a -> c (Expr a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Expr a) #

toConstr :: Expr a -> Constr #

dataTypeOf :: Expr a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Expr a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Expr a)) #

gmapT :: (forall b. Data b => b -> b) -> Expr a -> Expr a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Expr a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Expr a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Expr a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Expr a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Expr a -> m (Expr a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Expr a -> m (Expr a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Expr a -> m (Expr a) #

Ord a => Ord (Expr a) Source # 

Methods

compare :: Expr a -> Expr a -> Ordering #

(<) :: Expr a -> Expr a -> Bool #

(<=) :: Expr a -> Expr a -> Bool #

(>) :: Expr a -> Expr a -> Bool #

(>=) :: Expr a -> Expr a -> Bool #

max :: Expr a -> Expr a -> Expr a #

min :: Expr a -> Expr a -> Expr a #

Show a => Show (Expr a) Source # 

Methods

showsPrec :: Int -> Expr a -> ShowS #

show :: Expr a -> String #

showList :: [Expr a] -> ShowS #

Generic (Expr a) Source # 

Associated Types

type Rep (Expr a) :: * -> * #

Methods

from :: Expr a -> Rep (Expr a) x #

to :: Rep (Expr a) x -> Expr a #

NFData a => NFData (Expr a) Source # 

Methods

rnf :: Expr a -> () #

Located a => Located (Expr a) Source # 

Methods

spanOf :: Expr a -> Span Source #

Parse (Expr Span) Source # 

Methods

parser :: P (Expr Span) Source #

(Typeable * a, Monoid a) => Resolve (Expr a) Source # 

Methods

resolve :: Expr a -> Either ResolveFail (Expr a) Source #

resolve' :: Expr a -> Expr a Source #

resolveVerbose :: Expr a -> (Expr a, Severity, [Issue]) Source #

resolveM :: Expr a -> ResolveM (Expr a)

Pretty (Expr a) Source # 

Methods

prettyUnresolved :: Expr a -> Doc b Source #

type Rep1 Expr Source # 
type Rep1 Expr = D1 (MetaData "Expr" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "Box" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) (C1 (MetaCons "InPlace" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) ((:+:) (C1 (MetaCons "Vec" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Expr))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) (C1 (MetaCons "Call" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Expr))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))))) ((:+:) ((:+:) (C1 (MetaCons "MethodCall" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe ((:.:) [] (Rec1 Ty)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Expr))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) (C1 (MetaCons "TupExpr" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Expr))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) ((:+:) (C1 (MetaCons "Binary" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 BinOp))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) ((:+:) (C1 (MetaCons "Unary" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UnOp))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) (C1 (MetaCons "Lit" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Lit)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))))))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "Cast" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Ty)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) (C1 (MetaCons "TypeAscription" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Ty)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) ((:+:) (C1 (MetaCons "If" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Block)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe (Rec1 Expr))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) ((:+:) (C1 (MetaCons "IfLet" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) NonEmpty (Rec1 Pat))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Block)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe (Rec1 Expr))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) (C1 (MetaCons "While" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Block)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe (Rec1 Label))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))))))) ((:+:) ((:+:) (C1 (MetaCons "WhileLet" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) NonEmpty (Rec1 Pat))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Block)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe (Rec1 Label))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) (C1 (MetaCons "ForLoop" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Pat)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Block)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe (Rec1 Label))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))))) ((:+:) (C1 (MetaCons "Loop" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Block))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe (Rec1 Label))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) ((:+:) (C1 (MetaCons "Match" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Arm))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) (C1 (MetaCons "Closure" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Movability)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 CaptureBy)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 FnDecl)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))))))))) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "BlockExpr" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Block)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) (C1 (MetaCons "Catch" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Block)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) ((:+:) (C1 (MetaCons "Assign" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) (C1 (MetaCons "AssignOp" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 BinOp))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))))) ((:+:) ((:+:) (C1 (MetaCons "FieldAccess" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) (C1 (MetaCons "TupField" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) ((:+:) (C1 (MetaCons "Index" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) ((:+:) (C1 (MetaCons "Range" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe (Rec1 Expr)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe (Rec1 Expr))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 RangeLimits)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) (C1 (MetaCons "PathExpr" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe (Rec1 QSelf)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Path)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))))))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "AddrOf" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Mutability))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) (C1 (MetaCons "Break" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe (Rec1 Label)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe (Rec1 Expr))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) ((:+:) (C1 (MetaCons "Continue" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe (Rec1 Label))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) ((:+:) (C1 (MetaCons "Ret" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe (Rec1 Expr))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) (C1 (MetaCons "MacExpr" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Mac)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))))) ((:+:) ((:+:) (C1 (MetaCons "Struct" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Path))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Field))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe (Rec1 Expr))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) (C1 (MetaCons "Repeat" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) ((:+:) (C1 (MetaCons "ParenExpr" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) ((:+:) (C1 (MetaCons "Try" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) (C1 (MetaCons "Yield" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe (Rec1 Expr))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))))))))
type Rep (Expr a) Source # 
type Rep (Expr a) = D1 (MetaData "Expr" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "Box" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) (C1 (MetaCons "InPlace" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) ((:+:) (C1 (MetaCons "Vec" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Expr a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) (C1 (MetaCons "Call" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Expr a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))))) ((:+:) ((:+:) (C1 (MetaCons "MethodCall" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe [Ty a]))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Expr a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) (C1 (MetaCons "TupExpr" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Expr a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) ((:+:) (C1 (MetaCons "Binary" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 BinOp))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) ((:+:) (C1 (MetaCons "Unary" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UnOp))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) (C1 (MetaCons "Lit" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Lit a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))))))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "Cast" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ty a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) (C1 (MetaCons "TypeAscription" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ty a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) ((:+:) (C1 (MetaCons "If" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Block a))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Expr a)))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) ((:+:) (C1 (MetaCons "IfLet" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (NonEmpty (Pat a)))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Block a))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Expr a)))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) (C1 (MetaCons "While" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Block a))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Label a)))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))))))) ((:+:) ((:+:) (C1 (MetaCons "WhileLet" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (NonEmpty (Pat a)))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Block a))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Label a)))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) (C1 (MetaCons "ForLoop" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Pat a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Block a))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Label a)))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))))) ((:+:) (C1 (MetaCons "Loop" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Block a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Label a)))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) ((:+:) (C1 (MetaCons "Match" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Arm a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) (C1 (MetaCons "Closure" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Movability)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 CaptureBy)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (FnDecl a))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))))))))) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "BlockExpr" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Block a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) (C1 (MetaCons "Catch" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Block a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) ((:+:) (C1 (MetaCons "Assign" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) (C1 (MetaCons "AssignOp" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 BinOp))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))))) ((:+:) ((:+:) (C1 (MetaCons "FieldAccess" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) (C1 (MetaCons "TupField" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) ((:+:) (C1 (MetaCons "Index" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) ((:+:) (C1 (MetaCons "Range" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Expr a))))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Expr a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 RangeLimits)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) (C1 (MetaCons "PathExpr" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (QSelf a))))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Path a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))))))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "AddrOf" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Mutability))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) (C1 (MetaCons "Break" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Label a))))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Expr a)))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) ((:+:) (C1 (MetaCons "Continue" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Label a)))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) ((:+:) (C1 (MetaCons "Ret" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Expr a)))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) (C1 (MetaCons "MacExpr" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Mac a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))))) ((:+:) ((:+:) (C1 (MetaCons "Struct" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Path a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Field a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Expr a)))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) (C1 (MetaCons "Repeat" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) ((:+:) (C1 (MetaCons "ParenExpr" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) ((:+:) (C1 (MetaCons "Try" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) (C1 (MetaCons "Yield" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Expr a)))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))))))))

data Abi Source #

ABIs support by Rust's foreign function interface (syntax::abi::Abi). Note that of these, only Rust, C, System, RustIntrinsic, RustCall, and PlatformIntrinsic and Unadjusted are cross-platform - all the rest are platform-specific.

Example: "C" as in extern "C" fn foo(x: i32);

Instances

Bounded Abi Source # 

Methods

minBound :: Abi #

maxBound :: Abi #

Enum Abi Source # 

Methods

succ :: Abi -> Abi #

pred :: Abi -> Abi #

toEnum :: Int -> Abi #

fromEnum :: Abi -> Int #

enumFrom :: Abi -> [Abi] #

enumFromThen :: Abi -> Abi -> [Abi] #

enumFromTo :: Abi -> Abi -> [Abi] #

enumFromThenTo :: Abi -> Abi -> Abi -> [Abi] #

Eq Abi Source # 

Methods

(==) :: Abi -> Abi -> Bool #

(/=) :: Abi -> Abi -> Bool #

Data Abi Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Abi -> c Abi #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Abi #

toConstr :: Abi -> Constr #

dataTypeOf :: Abi -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Abi) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Abi) #

gmapT :: (forall b. Data b => b -> b) -> Abi -> Abi #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Abi -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Abi -> r #

gmapQ :: (forall d. Data d => d -> u) -> Abi -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Abi -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Abi -> m Abi #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Abi -> m Abi #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Abi -> m Abi #

Ord Abi Source # 

Methods

compare :: Abi -> Abi -> Ordering #

(<) :: Abi -> Abi -> Bool #

(<=) :: Abi -> Abi -> Bool #

(>) :: Abi -> Abi -> Bool #

(>=) :: Abi -> Abi -> Bool #

max :: Abi -> Abi -> Abi #

min :: Abi -> Abi -> Abi #

Read Abi Source # 
Show Abi Source # 

Methods

showsPrec :: Int -> Abi -> ShowS #

show :: Abi -> String #

showList :: [Abi] -> ShowS #

Generic Abi Source # 

Associated Types

type Rep Abi :: * -> * #

Methods

from :: Abi -> Rep Abi x #

to :: Rep Abi x -> Abi #

NFData Abi Source # 

Methods

rnf :: Abi -> () #

Pretty Abi Source # 
type Rep Abi Source # 
type Rep Abi = D1 (MetaData "Abi" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "Cdecl" PrefixI False) U1) (C1 (MetaCons "Stdcall" PrefixI False) U1)) ((:+:) (C1 (MetaCons "Fastcall" PrefixI False) U1) (C1 (MetaCons "Vectorcall" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "Aapcs" PrefixI False) U1) (C1 (MetaCons "Win64" PrefixI False) U1)) ((:+:) (C1 (MetaCons "SysV64" PrefixI False) U1) (C1 (MetaCons "PtxKernel" PrefixI False) U1)))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "Msp430Interrupt" PrefixI False) U1) (C1 (MetaCons "X86Interrupt" PrefixI False) U1)) ((:+:) (C1 (MetaCons "Rust" PrefixI False) U1) (C1 (MetaCons "C" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "System" PrefixI False) U1) (C1 (MetaCons "RustIntrinsic" PrefixI False) U1)) ((:+:) (C1 (MetaCons "RustCall" PrefixI False) U1) ((:+:) (C1 (MetaCons "PlatformIntrinsic" PrefixI False) U1) (C1 (MetaCons "Unadjusted" PrefixI False) U1))))))

data Arm a Source #

An arm of a Match expression (syntax::ast::Arm). An arm has at least one patten, possibly a guard expression, and a body expression.

Example: n 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)
}

Constructors

Arm [Attribute a] (NonEmpty (Pat a)) (Maybe (Expr a)) (Expr a) a 

Instances

Functor Arm Source # 

Methods

fmap :: (a -> b) -> Arm a -> Arm b #

(<$) :: a -> Arm b -> Arm a #

Generic1 Arm Source # 

Associated Types

type Rep1 (Arm :: * -> *) :: * -> * #

Methods

from1 :: Arm a -> Rep1 Arm a #

to1 :: Rep1 Arm a -> Arm a #

Eq a => Eq (Arm a) Source # 

Methods

(==) :: Arm a -> Arm a -> Bool #

(/=) :: Arm a -> Arm a -> Bool #

Data a => Data (Arm a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Arm a -> c (Arm a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Arm a) #

toConstr :: Arm a -> Constr #

dataTypeOf :: Arm a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Arm a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Arm a)) #

gmapT :: (forall b. Data b => b -> b) -> Arm a -> Arm a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Arm a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Arm a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Arm a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Arm a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Arm a -> m (Arm a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Arm a -> m (Arm a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Arm a -> m (Arm a) #

Ord a => Ord (Arm a) Source # 

Methods

compare :: Arm a -> Arm a -> Ordering #

(<) :: Arm a -> Arm a -> Bool #

(<=) :: Arm a -> Arm a -> Bool #

(>) :: Arm a -> Arm a -> Bool #

(>=) :: Arm a -> Arm a -> Bool #

max :: Arm a -> Arm a -> Arm a #

min :: Arm a -> Arm a -> Arm a #

Show a => Show (Arm a) Source # 

Methods

showsPrec :: Int -> Arm a -> ShowS #

show :: Arm a -> String #

showList :: [Arm a] -> ShowS #

Generic (Arm a) Source # 

Associated Types

type Rep (Arm a) :: * -> * #

Methods

from :: Arm a -> Rep (Arm a) x #

to :: Rep (Arm a) x -> Arm a #

NFData a => NFData (Arm a) Source # 

Methods

rnf :: Arm a -> () #

Located a => Located (Arm a) Source # 

Methods

spanOf :: Arm a -> Span Source #

(Typeable * a, Monoid a) => Resolve (Arm a) Source # 

Methods

resolve :: Arm a -> Either ResolveFail (Arm a) Source #

resolve' :: Arm a -> Arm a Source #

resolveVerbose :: Arm a -> (Arm a, Severity, [Issue]) Source #

resolveM :: Arm a -> ResolveM (Arm a)

type Rep1 Arm Source # 
type Rep (Arm a) Source # 

data UnOp Source #

Unary operators, used in the Unary constructor of Expr (syntax::ast::UnOp).

Example: ! as in !true

Constructors

Deref

* operator (dereferencing)

Not

! operator (logical inversion)

Neg

- operator (negation)

Instances

Bounded UnOp Source # 
Enum UnOp Source # 

Methods

succ :: UnOp -> UnOp #

pred :: UnOp -> UnOp #

toEnum :: Int -> UnOp #

fromEnum :: UnOp -> Int #

enumFrom :: UnOp -> [UnOp] #

enumFromThen :: UnOp -> UnOp -> [UnOp] #

enumFromTo :: UnOp -> UnOp -> [UnOp] #

enumFromThenTo :: UnOp -> UnOp -> UnOp -> [UnOp] #

Eq UnOp Source # 

Methods

(==) :: UnOp -> UnOp -> Bool #

(/=) :: UnOp -> UnOp -> Bool #

Data UnOp Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UnOp -> c UnOp #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UnOp #

toConstr :: UnOp -> Constr #

dataTypeOf :: UnOp -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c UnOp) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UnOp) #

gmapT :: (forall b. Data b => b -> b) -> UnOp -> UnOp #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UnOp -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UnOp -> r #

gmapQ :: (forall d. Data d => d -> u) -> UnOp -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UnOp -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UnOp -> m UnOp #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UnOp -> m UnOp #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UnOp -> m UnOp #

Ord UnOp Source # 

Methods

compare :: UnOp -> UnOp -> Ordering #

(<) :: UnOp -> UnOp -> Bool #

(<=) :: UnOp -> UnOp -> Bool #

(>) :: UnOp -> UnOp -> Bool #

(>=) :: UnOp -> UnOp -> Bool #

max :: UnOp -> UnOp -> UnOp #

min :: UnOp -> UnOp -> UnOp #

Show UnOp Source # 

Methods

showsPrec :: Int -> UnOp -> ShowS #

show :: UnOp -> String #

showList :: [UnOp] -> ShowS #

Generic UnOp Source # 

Associated Types

type Rep UnOp :: * -> * #

Methods

from :: UnOp -> Rep UnOp x #

to :: Rep UnOp x -> UnOp #

NFData UnOp Source # 

Methods

rnf :: UnOp -> () #

Pretty UnOp Source # 
type Rep UnOp Source # 
type Rep UnOp = D1 (MetaData "UnOp" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) (C1 (MetaCons "Deref" PrefixI False) U1) ((:+:) (C1 (MetaCons "Not" PrefixI False) U1) (C1 (MetaCons "Neg" PrefixI False) U1)))

data BinOp Source #

Binary operators, used in the Binary and AssignOp constructors of Expr (syntax::ast::BinOp).

Example: + as in 1 + 1 or 1 += 1

Constructors

AddOp

+ operator (addition)

SubOp

- operator (subtraction)

MulOp

* operator (multiplication)

DivOp

/ operator (division)

RemOp

% operator (modulus)

AndOp

&& operator (logical and)

OrOp

|| operator (logical or)

BitXorOp

^ operator (bitwise xor)

BitAndOp

& operator (bitwise and)

BitOrOp

| operator (bitwise or)

ShlOp

<< operator (shift left)

ShrOp

>> operator (shift right)

EqOp

== operator (equality)

LtOp

< operator (less than)

LeOp

<= operator (less than or equal to)

NeOp

!= operator (not equal to)

GeOp

>= operator (greater than or equal to)

GtOp

> operator (greater than)

Instances

Bounded BinOp Source # 
Enum BinOp Source # 
Eq BinOp Source # 

Methods

(==) :: BinOp -> BinOp -> Bool #

(/=) :: BinOp -> BinOp -> Bool #

Data BinOp Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BinOp -> c BinOp #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BinOp #

toConstr :: BinOp -> Constr #

dataTypeOf :: BinOp -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c BinOp) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BinOp) #

gmapT :: (forall b. Data b => b -> b) -> BinOp -> BinOp #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BinOp -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BinOp -> r #

gmapQ :: (forall d. Data d => d -> u) -> BinOp -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> BinOp -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> BinOp -> m BinOp #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BinOp -> m BinOp #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BinOp -> m BinOp #

Ord BinOp Source # 

Methods

compare :: BinOp -> BinOp -> Ordering #

(<) :: BinOp -> BinOp -> Bool #

(<=) :: BinOp -> BinOp -> Bool #

(>) :: BinOp -> BinOp -> Bool #

(>=) :: BinOp -> BinOp -> Bool #

max :: BinOp -> BinOp -> BinOp #

min :: BinOp -> BinOp -> BinOp #

Show BinOp Source # 

Methods

showsPrec :: Int -> BinOp -> ShowS #

show :: BinOp -> String #

showList :: [BinOp] -> ShowS #

Generic BinOp Source # 

Associated Types

type Rep BinOp :: * -> * #

Methods

from :: BinOp -> Rep BinOp x #

to :: Rep BinOp x -> BinOp #

NFData BinOp Source # 

Methods

rnf :: BinOp -> () #

Pretty BinOp Source # 
type Rep BinOp Source # 
type Rep BinOp = D1 (MetaData "BinOp" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "AddOp" PrefixI False) U1) (C1 (MetaCons "SubOp" PrefixI False) U1)) ((:+:) (C1 (MetaCons "MulOp" PrefixI False) U1) (C1 (MetaCons "DivOp" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "RemOp" PrefixI False) U1) (C1 (MetaCons "AndOp" PrefixI False) U1)) ((:+:) (C1 (MetaCons "OrOp" PrefixI False) U1) ((:+:) (C1 (MetaCons "BitXorOp" PrefixI False) U1) (C1 (MetaCons "BitAndOp" PrefixI False) U1))))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "BitOrOp" PrefixI False) U1) (C1 (MetaCons "ShlOp" PrefixI False) U1)) ((:+:) (C1 (MetaCons "ShrOp" PrefixI False) U1) (C1 (MetaCons "EqOp" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "LtOp" PrefixI False) U1) (C1 (MetaCons "LeOp" PrefixI False) U1)) ((:+:) (C1 (MetaCons "NeOp" PrefixI False) U1) ((:+:) (C1 (MetaCons "GeOp" PrefixI False) U1) (C1 (MetaCons "GtOp" PrefixI False) U1))))))

data Label a Source #

Used to annotate loops, breaks, continues, etc.

Constructors

Label Name a 

Instances

Functor Label Source # 

Methods

fmap :: (a -> b) -> Label a -> Label b #

(<$) :: a -> Label b -> Label a #

Generic1 Label Source # 

Associated Types

type Rep1 (Label :: * -> *) :: * -> * #

Methods

from1 :: Label a -> Rep1 Label a #

to1 :: Rep1 Label a -> Label a #

Eq a => Eq (Label a) Source # 

Methods

(==) :: Label a -> Label a -> Bool #

(/=) :: Label a -> Label a -> Bool #

Data a => Data (Label a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Label a -> c (Label a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Label a) #

toConstr :: Label a -> Constr #

dataTypeOf :: Label a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Label a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Label a)) #

gmapT :: (forall b. Data b => b -> b) -> Label a -> Label a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Label a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Label a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Label a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Label a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Label a -> m (Label a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Label a -> m (Label a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Label a -> m (Label a) #

Ord a => Ord (Label a) Source # 

Methods

compare :: Label a -> Label a -> Ordering #

(<) :: Label a -> Label a -> Bool #

(<=) :: Label a -> Label a -> Bool #

(>) :: Label a -> Label a -> Bool #

(>=) :: Label a -> Label a -> Bool #

max :: Label a -> Label a -> Label a #

min :: Label a -> Label a -> Label a #

Show a => Show (Label a) Source # 

Methods

showsPrec :: Int -> Label a -> ShowS #

show :: Label a -> String #

showList :: [Label a] -> ShowS #

Generic (Label a) Source # 

Associated Types

type Rep (Label a) :: * -> * #

Methods

from :: Label a -> Rep (Label a) x #

to :: Rep (Label a) x -> Label a #

NFData a => NFData (Label a) Source # 

Methods

rnf :: Label a -> () #

Located a => Located (Label a) Source # 

Methods

spanOf :: Label a -> Span Source #

type Rep1 Label Source # 
type Rep1 Label = D1 (MetaData "Label" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) (C1 (MetaCons "Label" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Name)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))
type Rep (Label a) Source # 
type Rep (Label a) = D1 (MetaData "Label" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) (C1 (MetaCons "Label" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Name)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))

data CaptureBy Source #

Describes how a Closure should close over its free variables (syntax::ast::CaptureBy).

Constructors

Value

make copies of free variables closed over (move closures)

Ref

borrow free variables closed over

Instances

Bounded CaptureBy Source # 
Enum CaptureBy Source # 
Eq CaptureBy Source # 
Data CaptureBy Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CaptureBy -> c CaptureBy #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CaptureBy #

toConstr :: CaptureBy -> Constr #

dataTypeOf :: CaptureBy -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CaptureBy) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CaptureBy) #

gmapT :: (forall b. Data b => b -> b) -> CaptureBy -> CaptureBy #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CaptureBy -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CaptureBy -> r #

gmapQ :: (forall d. Data d => d -> u) -> CaptureBy -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CaptureBy -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CaptureBy -> m CaptureBy #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CaptureBy -> m CaptureBy #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CaptureBy -> m CaptureBy #

Ord CaptureBy Source # 
Show CaptureBy Source # 
Generic CaptureBy Source # 

Associated Types

type Rep CaptureBy :: * -> * #

NFData CaptureBy Source # 

Methods

rnf :: CaptureBy -> () #

type Rep CaptureBy Source # 
type Rep CaptureBy = D1 (MetaData "CaptureBy" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) (C1 (MetaCons "Value" PrefixI False) U1) (C1 (MetaCons "Ref" PrefixI False) U1))

data Movability Source #

The movability of a generator / closure literal (syntax::ast::Movability).

Constructors

Immovable 
Movable 

Instances

Bounded Movability Source # 
Enum Movability Source # 
Eq Movability Source # 
Data Movability Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Movability -> c Movability #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Movability #

toConstr :: Movability -> Constr #

dataTypeOf :: Movability -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Movability) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Movability) #

gmapT :: (forall b. Data b => b -> b) -> Movability -> Movability #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Movability -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Movability -> r #

gmapQ :: (forall d. Data d => d -> u) -> Movability -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Movability -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Movability -> m Movability #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Movability -> m Movability #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Movability -> m Movability #

Ord Movability Source # 
Show Movability Source # 
Generic Movability Source # 

Associated Types

type Rep Movability :: * -> * #

NFData Movability Source # 

Methods

rnf :: Movability -> () #

type Rep Movability Source # 
type Rep Movability = D1 (MetaData "Movability" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) (C1 (MetaCons "Immovable" PrefixI False) U1) (C1 (MetaCons "Movable" PrefixI False) U1))

data Field a Source #

Field in a struct literal expression (syntax::ast::Field).

Example: x: 1 in Point { x: 1, y: 2 }

Constructors

Field Ident (Maybe (Expr a)) a 

Instances

Functor Field Source # 

Methods

fmap :: (a -> b) -> Field a -> Field b #

(<$) :: a -> Field b -> Field a #

Generic1 Field Source # 

Associated Types

type Rep1 (Field :: * -> *) :: * -> * #

Methods

from1 :: Field a -> Rep1 Field a #

to1 :: Rep1 Field a -> Field a #

PrettyAnnotated Field Source # 
Eq a => Eq (Field a) Source # 

Methods

(==) :: Field a -> Field a -> Bool #

(/=) :: Field a -> Field a -> Bool #

Data a => Data (Field a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Field a -> c (Field a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Field a) #

toConstr :: Field a -> Constr #

dataTypeOf :: Field a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Field a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Field a)) #

gmapT :: (forall b. Data b => b -> b) -> Field a -> Field a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Field a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Field a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Field a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Field a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Field a -> m (Field a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Field a -> m (Field a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Field a -> m (Field a) #

Ord a => Ord (Field a) Source # 

Methods

compare :: Field a -> Field a -> Ordering #

(<) :: Field a -> Field a -> Bool #

(<=) :: Field a -> Field a -> Bool #

(>) :: Field a -> Field a -> Bool #

(>=) :: Field a -> Field a -> Bool #

max :: Field a -> Field a -> Field a #

min :: Field a -> Field a -> Field a #

Show a => Show (Field a) Source # 

Methods

showsPrec :: Int -> Field a -> ShowS #

show :: Field a -> String #

showList :: [Field a] -> ShowS #

Generic (Field a) Source # 

Associated Types

type Rep (Field a) :: * -> * #

Methods

from :: Field a -> Rep (Field a) x #

to :: Rep (Field a) x -> Field a #

NFData a => NFData (Field a) Source # 

Methods

rnf :: Field a -> () #

Located a => Located (Field a) Source # 

Methods

spanOf :: Field a -> Span Source #

(Typeable * a, Monoid a) => Resolve (Field a) Source # 
Pretty (Field a) Source # 

Methods

prettyUnresolved :: Field a -> Doc b Source #

type Rep1 Field Source # 
type Rep (Field a) Source # 

data RangeLimits Source #

Limit types of a Range

Constructors

HalfOpen

Inclusive at the beginning, exclusive at the end

Closed

Inclusive at the beginning and end

Instances

Bounded RangeLimits Source # 
Enum RangeLimits Source # 
Eq RangeLimits Source # 
Data RangeLimits Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RangeLimits -> c RangeLimits #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RangeLimits #

toConstr :: RangeLimits -> Constr #

dataTypeOf :: RangeLimits -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c RangeLimits) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RangeLimits) #

gmapT :: (forall b. Data b => b -> b) -> RangeLimits -> RangeLimits #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RangeLimits -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RangeLimits -> r #

gmapQ :: (forall d. Data d => d -> u) -> RangeLimits -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> RangeLimits -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> RangeLimits -> m RangeLimits #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RangeLimits -> m RangeLimits #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RangeLimits -> m RangeLimits #

Ord RangeLimits Source # 
Show RangeLimits Source # 
Generic RangeLimits Source # 

Associated Types

type Rep RangeLimits :: * -> * #

NFData RangeLimits Source # 

Methods

rnf :: RangeLimits -> () #

Pretty RangeLimits Source # 
type Rep RangeLimits Source # 
type Rep RangeLimits = D1 (MetaData "RangeLimits" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) (C1 (MetaCons "HalfOpen" PrefixI False) U1) (C1 (MetaCons "Closed" PrefixI False) U1))

Types and lifetimes

data Ty a Source #

Types (syntax::ast::Ty).

Constructors

Slice (Ty a) a

variable-length slice (example: [T])

Array (Ty a) (Expr a) a

fixed length array (example: [T; n])

Ptr Mutability (Ty a) a

raw pointer (example: *const T or *mut T)

Rptr (Maybe (Lifetime a)) Mutability (Ty a) a

reference (example: &'a T or &'a mut T)

BareFn Unsafety Abi [LifetimeDef a] (FnDecl a) a

bare function (example: fn(usize) -> bool)

Never a

never type: !

TupTy [Ty a] a

tuple (example: (i32, i32))

PathTy (Maybe (QSelf a)) (Path a) a

path type (examples: std::math::pi, <Vec<T> as SomeTrait>::SomeType).

TraitObject (NonEmpty (TyParamBound a)) a

trait object type (example: Bound1 + Bound2 + Bound3)

ImplTrait (NonEmpty (TyParamBound a)) a

impl trait type (see the RFC) (example: impl Bound1 + Bound2 + Bound3).

ParenTy (Ty a) a

no-op; kept solely so that we can pretty print faithfully

Typeof (Expr a) a

typeof, currently unsupported in rustc (example: typeof(1))

Infer a

inferred type: _

MacTy (Mac a) a

generated from a call to a macro (example: HList![i32,(),u8])

Instances

Functor Ty Source # 

Methods

fmap :: (a -> b) -> Ty a -> Ty b #

(<$) :: a -> Ty b -> Ty a #

Generic1 Ty Source # 

Associated Types

type Rep1 (Ty :: * -> *) :: * -> * #

Methods

from1 :: Ty a -> Rep1 Ty a #

to1 :: Rep1 Ty a -> Ty a #

PrettyAnnotated Ty Source # 

Methods

prettyAnnUnresolved :: Ty a -> Doc a Source #

Eq a => Eq (Ty a) Source # 

Methods

(==) :: Ty a -> Ty a -> Bool #

(/=) :: Ty a -> Ty a -> Bool #

Data a => Data (Ty a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Ty a -> c (Ty a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Ty a) #

toConstr :: Ty a -> Constr #

dataTypeOf :: Ty a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Ty a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Ty a)) #

gmapT :: (forall b. Data b => b -> b) -> Ty a -> Ty a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Ty a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Ty a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Ty a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Ty a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Ty a -> m (Ty a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Ty a -> m (Ty a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Ty a -> m (Ty a) #

Ord a => Ord (Ty a) Source # 

Methods

compare :: Ty a -> Ty a -> Ordering #

(<) :: Ty a -> Ty a -> Bool #

(<=) :: Ty a -> Ty a -> Bool #

(>) :: Ty a -> Ty a -> Bool #

(>=) :: Ty a -> Ty a -> Bool #

max :: Ty a -> Ty a -> Ty a #

min :: Ty a -> Ty a -> Ty a #

Show a => Show (Ty a) Source # 

Methods

showsPrec :: Int -> Ty a -> ShowS #

show :: Ty a -> String #

showList :: [Ty a] -> ShowS #

Generic (Ty a) Source # 

Associated Types

type Rep (Ty a) :: * -> * #

Methods

from :: Ty a -> Rep (Ty a) x #

to :: Rep (Ty a) x -> Ty a #

NFData a => NFData (Ty a) Source # 

Methods

rnf :: Ty a -> () #

Located a => Located (Ty a) Source # 

Methods

spanOf :: Ty a -> Span Source #

Parse (Ty Span) Source # 

Methods

parser :: P (Ty Span) Source #

(Typeable * a, Monoid a) => Resolve (Ty a) Source # 

Methods

resolve :: Ty a -> Either ResolveFail (Ty a) Source #

resolve' :: Ty a -> Ty a Source #

resolveVerbose :: Ty a -> (Ty a, Severity, [Issue]) Source #

resolveM :: Ty a -> ResolveM (Ty a)

Pretty (Ty a) Source # 

Methods

prettyUnresolved :: Ty a -> Doc b Source #

type Rep1 Ty Source # 
type Rep1 Ty = D1 (MetaData "Ty" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "Slice" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Ty)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))) ((:+:) (C1 (MetaCons "Array" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Ty)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) (C1 (MetaCons "Ptr" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Mutability)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Ty)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))))) ((:+:) ((:+:) (C1 (MetaCons "Rptr" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe (Rec1 Lifetime))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Mutability))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Ty)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) (C1 (MetaCons "BareFn" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Unsafety)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Abi))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 LifetimeDef))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 FnDecl)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))))) ((:+:) (C1 (MetaCons "Never" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)) (C1 (MetaCons "TupTy" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Ty))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))))) ((:+:) ((:+:) (C1 (MetaCons "PathTy" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe (Rec1 QSelf))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Path)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) ((:+:) (C1 (MetaCons "TraitObject" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) NonEmpty (Rec1 TyParamBound))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))) (C1 (MetaCons "ImplTrait" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) NonEmpty (Rec1 TyParamBound))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) ((:+:) ((:+:) (C1 (MetaCons "ParenTy" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Ty)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))) (C1 (MetaCons "Typeof" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) ((:+:) (C1 (MetaCons "Infer" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)) (C1 (MetaCons "MacTy" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Mac)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))))))
type Rep (Ty a) Source # 
type Rep (Ty a) = D1 (MetaData "Ty" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "Slice" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ty a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))) ((:+:) (C1 (MetaCons "Array" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ty a))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) (C1 (MetaCons "Ptr" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Mutability)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ty a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))))) ((:+:) ((:+:) (C1 (MetaCons "Rptr" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Lifetime a)))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Mutability))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ty a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) (C1 (MetaCons "BareFn" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Unsafety)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Abi))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [LifetimeDef a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (FnDecl a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))))) ((:+:) (C1 (MetaCons "Never" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))) (C1 (MetaCons "TupTy" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Ty a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))))) ((:+:) ((:+:) (C1 (MetaCons "PathTy" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (QSelf a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Path a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) ((:+:) (C1 (MetaCons "TraitObject" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (NonEmpty (TyParamBound a)))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))) (C1 (MetaCons "ImplTrait" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (NonEmpty (TyParamBound a)))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) ((:+:) ((:+:) (C1 (MetaCons "ParenTy" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ty a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))) (C1 (MetaCons "Typeof" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) ((:+:) (C1 (MetaCons "Infer" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))) (C1 (MetaCons "MacTy" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Mac a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))))))

data Generics a Source #

Represents lifetimes and type parameters attached to a declaration of a functions, enums, traits, etc. (syntax::ast::Generics). 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 that whose source representation is not compact - the lifetimes and type parameters occur by themselves between < and > then a bit further the where clause occurs after a where.

Example: <'a, 'b: 'c, T: 'a> and where Option<T>: Copy as in

fn nonsense<'a, 'b: 'c, T: 'a>(x: i32) -> i32 where Option<T>: Copy { 1 }.

Constructors

Generics [LifetimeDef a] [TyParam a] (WhereClause a) a 

Instances

Functor Generics Source # 

Methods

fmap :: (a -> b) -> Generics a -> Generics b #

(<$) :: a -> Generics b -> Generics a #

Generic1 Generics Source # 

Associated Types

type Rep1 (Generics :: * -> *) :: * -> * #

Methods

from1 :: Generics a -> Rep1 Generics a #

to1 :: Rep1 Generics a -> Generics a #

PrettyAnnotated Generics Source # 
Eq a => Eq (Generics a) Source # 

Methods

(==) :: Generics a -> Generics a -> Bool #

(/=) :: Generics a -> Generics a -> Bool #

Data a => Data (Generics a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Generics a -> c (Generics a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Generics a) #

toConstr :: Generics a -> Constr #

dataTypeOf :: Generics a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Generics a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Generics a)) #

gmapT :: (forall b. Data b => b -> b) -> Generics a -> Generics a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Generics a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Generics a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Generics a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Generics a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Generics a -> m (Generics a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Generics a -> m (Generics a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Generics a -> m (Generics a) #

Ord a => Ord (Generics a) Source # 

Methods

compare :: Generics a -> Generics a -> Ordering #

(<) :: Generics a -> Generics a -> Bool #

(<=) :: Generics a -> Generics a -> Bool #

(>) :: Generics a -> Generics a -> Bool #

(>=) :: Generics a -> Generics a -> Bool #

max :: Generics a -> Generics a -> Generics a #

min :: Generics a -> Generics a -> Generics a #

Show a => Show (Generics a) Source # 

Methods

showsPrec :: Int -> Generics a -> ShowS #

show :: Generics a -> String #

showList :: [Generics a] -> ShowS #

Generic (Generics a) Source # 

Associated Types

type Rep (Generics a) :: * -> * #

Methods

from :: Generics a -> Rep (Generics a) x #

to :: Rep (Generics a) x -> Generics a #

NFData a => NFData (Generics a) Source # 

Methods

rnf :: Generics a -> () #

Located a => Located (Generics a) Source # 

Methods

spanOf :: Generics a -> Span Source #

Parse (Generics Span) Source # 
(Typeable * a, Monoid a) => Resolve (Generics a) Source # 
Pretty (Generics a) Source # 
type Rep1 Generics Source # 
type Rep (Generics a) Source # 

data Lifetime a Source #

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 Name argument is not supposed to include that tick.

Examples: 'a or 'static

Constructors

Lifetime Name a 

Instances

Functor Lifetime Source # 

Methods

fmap :: (a -> b) -> Lifetime a -> Lifetime b #

(<$) :: a -> Lifetime b -> Lifetime a #

Generic1 Lifetime Source # 

Associated Types

type Rep1 (Lifetime :: * -> *) :: * -> * #

Methods

from1 :: Lifetime a -> Rep1 Lifetime a #

to1 :: Rep1 Lifetime a -> Lifetime a #

PrettyAnnotated Lifetime Source # 
Eq a => Eq (Lifetime a) Source # 

Methods

(==) :: Lifetime a -> Lifetime a -> Bool #

(/=) :: Lifetime a -> Lifetime a -> Bool #

Data a => Data (Lifetime a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Lifetime a -> c (Lifetime a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Lifetime a) #

toConstr :: Lifetime a -> Constr #

dataTypeOf :: Lifetime a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Lifetime a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Lifetime a)) #

gmapT :: (forall b. Data b => b -> b) -> Lifetime a -> Lifetime a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Lifetime a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Lifetime a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Lifetime a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Lifetime a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Lifetime a -> m (Lifetime a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Lifetime a -> m (Lifetime a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Lifetime a -> m (Lifetime a) #

Ord a => Ord (Lifetime a) Source # 

Methods

compare :: Lifetime a -> Lifetime a -> Ordering #

(<) :: Lifetime a -> Lifetime a -> Bool #

(<=) :: Lifetime a -> Lifetime a -> Bool #

(>) :: Lifetime a -> Lifetime a -> Bool #

(>=) :: Lifetime a -> Lifetime a -> Bool #

max :: Lifetime a -> Lifetime a -> Lifetime a #

min :: Lifetime a -> Lifetime a -> Lifetime a #

Show a => Show (Lifetime a) Source # 

Methods

showsPrec :: Int -> Lifetime a -> ShowS #

show :: Lifetime a -> String #

showList :: [Lifetime a] -> ShowS #

Generic (Lifetime a) Source # 

Associated Types

type Rep (Lifetime a) :: * -> * #

Methods

from :: Lifetime a -> Rep (Lifetime a) x #

to :: Rep (Lifetime a) x -> Lifetime a #

NFData a => NFData (Lifetime a) Source # 

Methods

rnf :: Lifetime a -> () #

Located a => Located (Lifetime a) Source # 

Methods

spanOf :: Lifetime a -> Span Source #

Typeable * a => Resolve (Lifetime a) Source # 
Pretty (Lifetime a) Source # 
type Rep1 Lifetime Source # 
type Rep1 Lifetime = D1 (MetaData "Lifetime" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) (C1 (MetaCons "Lifetime" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Name)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))
type Rep (Lifetime a) Source # 
type Rep (Lifetime a) = D1 (MetaData "Lifetime" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) (C1 (MetaCons "Lifetime" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Name)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))

data LifetimeDef a Source #

A lifetime definition, introducing a lifetime and the other lifetimes that bound it (syntax::ast::LifetimeDef).

Example: 'a: 'b + 'c + 'd

Constructors

LifetimeDef [Attribute a] (Lifetime a) [Lifetime a] a 

Instances

Functor LifetimeDef Source # 

Methods

fmap :: (a -> b) -> LifetimeDef a -> LifetimeDef b #

(<$) :: a -> LifetimeDef b -> LifetimeDef a #

Generic1 LifetimeDef Source # 

Associated Types

type Rep1 (LifetimeDef :: * -> *) :: * -> * #

PrettyAnnotated LifetimeDef Source # 
Eq a => Eq (LifetimeDef a) Source # 
Data a => Data (LifetimeDef a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LifetimeDef a -> c (LifetimeDef a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (LifetimeDef a) #

toConstr :: LifetimeDef a -> Constr #

dataTypeOf :: LifetimeDef a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (LifetimeDef a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (LifetimeDef a)) #

gmapT :: (forall b. Data b => b -> b) -> LifetimeDef a -> LifetimeDef a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LifetimeDef a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LifetimeDef a -> r #

gmapQ :: (forall d. Data d => d -> u) -> LifetimeDef a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LifetimeDef a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LifetimeDef a -> m (LifetimeDef a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LifetimeDef a -> m (LifetimeDef a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LifetimeDef a -> m (LifetimeDef a) #

Ord a => Ord (LifetimeDef a) Source # 
Show a => Show (LifetimeDef a) Source # 
Generic (LifetimeDef a) Source # 

Associated Types

type Rep (LifetimeDef a) :: * -> * #

Methods

from :: LifetimeDef a -> Rep (LifetimeDef a) x #

to :: Rep (LifetimeDef a) x -> LifetimeDef a #

NFData a => NFData (LifetimeDef a) Source # 

Methods

rnf :: LifetimeDef a -> () #

Located a => Located (LifetimeDef a) Source # 

Methods

spanOf :: LifetimeDef a -> Span Source #

Parse (LifetimeDef Span) Source # 
(Typeable * a, Monoid a) => Resolve (LifetimeDef a) Source # 
Pretty (LifetimeDef a) Source # 
type Rep1 LifetimeDef Source # 
type Rep (LifetimeDef a) Source # 

data TyParam a Source #

type parameter definition used in Generics (syntax::ast::TyParam). Note that each parameter can have any number of (lifetime or trait) bounds, as well as possibly a default type.

Constructors

TyParam [Attribute a] Ident [TyParamBound a] (Maybe (Ty a)) a 

Instances

Functor TyParam Source # 

Methods

fmap :: (a -> b) -> TyParam a -> TyParam b #

(<$) :: a -> TyParam b -> TyParam a #

Generic1 TyParam Source # 

Associated Types

type Rep1 (TyParam :: * -> *) :: * -> * #

Methods

from1 :: TyParam a -> Rep1 TyParam a #

to1 :: Rep1 TyParam a -> TyParam a #

PrettyAnnotated TyParam Source # 
Eq a => Eq (TyParam a) Source # 

Methods

(==) :: TyParam a -> TyParam a -> Bool #

(/=) :: TyParam a -> TyParam a -> Bool #

Data a => Data (TyParam a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TyParam a -> c (TyParam a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (TyParam a) #

toConstr :: TyParam a -> Constr #

dataTypeOf :: TyParam a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (TyParam a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (TyParam a)) #

gmapT :: (forall b. Data b => b -> b) -> TyParam a -> TyParam a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TyParam a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TyParam a -> r #

gmapQ :: (forall d. Data d => d -> u) -> TyParam a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TyParam a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TyParam a -> m (TyParam a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TyParam a -> m (TyParam a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TyParam a -> m (TyParam a) #

Ord a => Ord (TyParam a) Source # 

Methods

compare :: TyParam a -> TyParam a -> Ordering #

(<) :: TyParam a -> TyParam a -> Bool #

(<=) :: TyParam a -> TyParam a -> Bool #

(>) :: TyParam a -> TyParam a -> Bool #

(>=) :: TyParam a -> TyParam a -> Bool #

max :: TyParam a -> TyParam a -> TyParam a #

min :: TyParam a -> TyParam a -> TyParam a #

Show a => Show (TyParam a) Source # 

Methods

showsPrec :: Int -> TyParam a -> ShowS #

show :: TyParam a -> String #

showList :: [TyParam a] -> ShowS #

Generic (TyParam a) Source # 

Associated Types

type Rep (TyParam a) :: * -> * #

Methods

from :: TyParam a -> Rep (TyParam a) x #

to :: Rep (TyParam a) x -> TyParam a #

NFData a => NFData (TyParam a) Source # 

Methods

rnf :: TyParam a -> () #

Located a => Located (TyParam a) Source # 

Methods

spanOf :: TyParam a -> Span Source #

Parse (TyParam Span) Source # 

Methods

parser :: P (TyParam Span) Source #

(Typeable * a, Monoid a) => Resolve (TyParam a) Source # 
Pretty (TyParam a) Source # 
type Rep1 TyParam Source # 
type Rep (TyParam a) Source # 

data TyParamBound a Source #

Bounds that can be placed on types (syntax::ast::TyParamBound). These can be either traits or lifetimes.

Constructors

TraitTyParamBound (PolyTraitRef a) TraitBoundModifier a

trait bound

RegionTyParamBound (Lifetime a) a

lifetime bound

Instances

Functor TyParamBound Source # 

Methods

fmap :: (a -> b) -> TyParamBound a -> TyParamBound b #

(<$) :: a -> TyParamBound b -> TyParamBound a #

Generic1 TyParamBound Source # 

Associated Types

type Rep1 (TyParamBound :: * -> *) :: * -> * #

PrettyAnnotated TyParamBound Source # 
Eq a => Eq (TyParamBound a) Source # 
Data a => Data (TyParamBound a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TyParamBound a -> c (TyParamBound a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (TyParamBound a) #

toConstr :: TyParamBound a -> Constr #

dataTypeOf :: TyParamBound a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (TyParamBound a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (TyParamBound a)) #

gmapT :: (forall b. Data b => b -> b) -> TyParamBound a -> TyParamBound a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TyParamBound a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TyParamBound a -> r #

gmapQ :: (forall d. Data d => d -> u) -> TyParamBound a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TyParamBound a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TyParamBound a -> m (TyParamBound a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TyParamBound a -> m (TyParamBound a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TyParamBound a -> m (TyParamBound a) #

Ord a => Ord (TyParamBound a) Source # 
Show a => Show (TyParamBound a) Source # 
Generic (TyParamBound a) Source # 

Associated Types

type Rep (TyParamBound a) :: * -> * #

Methods

from :: TyParamBound a -> Rep (TyParamBound a) x #

to :: Rep (TyParamBound a) x -> TyParamBound a #

NFData a => NFData (TyParamBound a) Source # 

Methods

rnf :: TyParamBound a -> () #

Located a => Located (TyParamBound a) Source # 
(Typeable * a, Monoid a) => Resolve (TyParamBound a) Source # 
Pretty (TyParamBound a) Source # 
type Rep1 TyParamBound Source # 
type Rep (TyParamBound a) Source # 

partitionTyParamBounds :: [TyParamBound a] -> ([TyParamBound a], [TyParamBound a]) Source #

Partion a list of TyParamBound into a tuple of the TraitTyParamBound and RegionTyParamBound variants.

data WhereClause a Source #

A where clause in a definition, where one can apply a series of constraints to the types introduced and used by a Generic 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 WhereClause is a field of Generic, 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

impl<T> PrintInOption for T where Option<T>: Debug { }

Constructors

WhereClause [WherePredicate a] a 

Instances

Functor WhereClause Source # 

Methods

fmap :: (a -> b) -> WhereClause a -> WhereClause b #

(<$) :: a -> WhereClause b -> WhereClause a #

Generic1 WhereClause Source # 

Associated Types

type Rep1 (WhereClause :: * -> *) :: * -> * #

PrettyAnnotated WhereClause Source # 
Eq a => Eq (WhereClause a) Source # 
Data a => Data (WhereClause a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WhereClause a -> c (WhereClause a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (WhereClause a) #

toConstr :: WhereClause a -> Constr #

dataTypeOf :: WhereClause a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (WhereClause a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (WhereClause a)) #

gmapT :: (forall b. Data b => b -> b) -> WhereClause a -> WhereClause a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WhereClause a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WhereClause a -> r #

gmapQ :: (forall d. Data d => d -> u) -> WhereClause a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> WhereClause a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> WhereClause a -> m (WhereClause a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WhereClause a -> m (WhereClause a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WhereClause a -> m (WhereClause a) #

Ord a => Ord (WhereClause a) Source # 
Show a => Show (WhereClause a) Source # 
Generic (WhereClause a) Source # 

Associated Types

type Rep (WhereClause a) :: * -> * #

Methods

from :: WhereClause a -> Rep (WhereClause a) x #

to :: Rep (WhereClause a) x -> WhereClause a #

NFData a => NFData (WhereClause a) Source # 

Methods

rnf :: WhereClause a -> () #

Located a => Located (WhereClause a) Source # 

Methods

spanOf :: WhereClause a -> Span Source #

Parse (WhereClause Span) Source # 
(Typeable * a, Monoid a) => Resolve (WhereClause a) Source # 
Pretty (WhereClause a) Source # 
type Rep1 WhereClause Source # 
type Rep1 WhereClause = D1 (MetaData "WhereClause" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) (C1 (MetaCons "WhereClause" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 WherePredicate))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))
type Rep (WhereClause a) Source # 
type Rep (WhereClause a) = D1 (MetaData "WhereClause" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) (C1 (MetaCons "WhereClause" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [WherePredicate a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))

whereClause :: Generics a -> WhereClause a Source #

Extract the where clause from a Generics.

data WherePredicate a Source #

An individual predicate in a WhereClause (syntax::ast::WherePredicate).

Constructors

BoundPredicate [LifetimeDef a] (Ty a) [TyParamBound a] a

type bound (syntax::ast::WhereBoundPredicate) (example: for<'c> Foo: Send+Clone+'c)

RegionPredicate (Lifetime a) [Lifetime a] a

lifetime predicate (syntax::ast::WhereRegionPredicate) (example: 'a: 'b+'c)

EqPredicate (Ty a) (Ty a) a

equality predicate (syntax::ast::WhereEqPredicate) (example: T=int). Note that this is not currently supported.

Instances

Functor WherePredicate Source # 

Methods

fmap :: (a -> b) -> WherePredicate a -> WherePredicate b #

(<$) :: a -> WherePredicate b -> WherePredicate a #

Generic1 WherePredicate Source # 

Associated Types

type Rep1 (WherePredicate :: * -> *) :: * -> * #

PrettyAnnotated WherePredicate Source # 
Eq a => Eq (WherePredicate a) Source # 
Data a => Data (WherePredicate a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WherePredicate a -> c (WherePredicate a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (WherePredicate a) #

toConstr :: WherePredicate a -> Constr #

dataTypeOf :: WherePredicate a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (WherePredicate a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (WherePredicate a)) #

gmapT :: (forall b. Data b => b -> b) -> WherePredicate a -> WherePredicate a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WherePredicate a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WherePredicate a -> r #

gmapQ :: (forall d. Data d => d -> u) -> WherePredicate a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> WherePredicate a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> WherePredicate a -> m (WherePredicate a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WherePredicate a -> m (WherePredicate a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WherePredicate a -> m (WherePredicate a) #

Ord a => Ord (WherePredicate a) Source # 
Show a => Show (WherePredicate a) Source # 
Generic (WherePredicate a) Source # 

Associated Types

type Rep (WherePredicate a) :: * -> * #

NFData a => NFData (WherePredicate a) Source # 

Methods

rnf :: WherePredicate a -> () #

Located a => Located (WherePredicate a) Source # 
(Typeable * a, Monoid a) => Resolve (WherePredicate a) Source # 
Pretty (WherePredicate a) Source # 
type Rep1 WherePredicate Source # 
type Rep (WherePredicate a) Source # 

data PolyTraitRef a Source #

Trait ref parametrized over lifetimes introduced by a for (syntax::ast::PolyTraitRef).

Example: for<'a,'b> Foo<&'a Bar>

Constructors

PolyTraitRef [LifetimeDef a] (TraitRef a) a 

Instances

Functor PolyTraitRef Source # 

Methods

fmap :: (a -> b) -> PolyTraitRef a -> PolyTraitRef b #

(<$) :: a -> PolyTraitRef b -> PolyTraitRef a #

Generic1 PolyTraitRef Source # 

Associated Types

type Rep1 (PolyTraitRef :: * -> *) :: * -> * #

PrettyAnnotated PolyTraitRef Source # 
Eq a => Eq (PolyTraitRef a) Source # 
Data a => Data (PolyTraitRef a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PolyTraitRef a -> c (PolyTraitRef a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (PolyTraitRef a) #

toConstr :: PolyTraitRef a -> Constr #

dataTypeOf :: PolyTraitRef a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (PolyTraitRef a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (PolyTraitRef a)) #

gmapT :: (forall b. Data b => b -> b) -> PolyTraitRef a -> PolyTraitRef a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PolyTraitRef a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PolyTraitRef a -> r #

gmapQ :: (forall d. Data d => d -> u) -> PolyTraitRef a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PolyTraitRef a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PolyTraitRef a -> m (PolyTraitRef a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PolyTraitRef a -> m (PolyTraitRef a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PolyTraitRef a -> m (PolyTraitRef a) #

Ord a => Ord (PolyTraitRef a) Source # 
Show a => Show (PolyTraitRef a) Source # 
Generic (PolyTraitRef a) Source # 

Associated Types

type Rep (PolyTraitRef a) :: * -> * #

Methods

from :: PolyTraitRef a -> Rep (PolyTraitRef a) x #

to :: Rep (PolyTraitRef a) x -> PolyTraitRef a #

NFData a => NFData (PolyTraitRef a) Source # 

Methods

rnf :: PolyTraitRef a -> () #

Located a => Located (PolyTraitRef a) Source # 
(Typeable * a, Monoid a) => Resolve (PolyTraitRef a) Source # 
Pretty (PolyTraitRef a) Source # 
type Rep1 PolyTraitRef Source # 
type Rep (PolyTraitRef a) Source # 

newtype TraitRef a Source #

A TraitRef is a path which identifies a trait (syntax::ast::TraitRef).

Constructors

TraitRef (Path a) 

Instances

Functor TraitRef Source # 

Methods

fmap :: (a -> b) -> TraitRef a -> TraitRef b #

(<$) :: a -> TraitRef b -> TraitRef a #

Generic1 TraitRef Source # 

Associated Types

type Rep1 (TraitRef :: * -> *) :: * -> * #

Methods

from1 :: TraitRef a -> Rep1 TraitRef a #

to1 :: Rep1 TraitRef a -> TraitRef a #

PrettyAnnotated TraitRef Source # 
Eq a => Eq (TraitRef a) Source # 

Methods

(==) :: TraitRef a -> TraitRef a -> Bool #

(/=) :: TraitRef a -> TraitRef a -> Bool #

Data a => Data (TraitRef a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TraitRef a -> c (TraitRef a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (TraitRef a) #

toConstr :: TraitRef a -> Constr #

dataTypeOf :: TraitRef a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (TraitRef a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (TraitRef a)) #

gmapT :: (forall b. Data b => b -> b) -> TraitRef a -> TraitRef a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TraitRef a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TraitRef a -> r #

gmapQ :: (forall d. Data d => d -> u) -> TraitRef a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TraitRef a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TraitRef a -> m (TraitRef a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TraitRef a -> m (TraitRef a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TraitRef a -> m (TraitRef a) #

Ord a => Ord (TraitRef a) Source # 

Methods

compare :: TraitRef a -> TraitRef a -> Ordering #

(<) :: TraitRef a -> TraitRef a -> Bool #

(<=) :: TraitRef a -> TraitRef a -> Bool #

(>) :: TraitRef a -> TraitRef a -> Bool #

(>=) :: TraitRef a -> TraitRef a -> Bool #

max :: TraitRef a -> TraitRef a -> TraitRef a #

min :: TraitRef a -> TraitRef a -> TraitRef a #

Show a => Show (TraitRef a) Source # 

Methods

showsPrec :: Int -> TraitRef a -> ShowS #

show :: TraitRef a -> String #

showList :: [TraitRef a] -> ShowS #

Generic (TraitRef a) Source # 

Associated Types

type Rep (TraitRef a) :: * -> * #

Methods

from :: TraitRef a -> Rep (TraitRef a) x #

to :: Rep (TraitRef a) x -> TraitRef a #

NFData a => NFData (TraitRef a) Source # 

Methods

rnf :: TraitRef a -> () #

Located a => Located (TraitRef a) Source # 

Methods

spanOf :: TraitRef a -> Span Source #

(Typeable * a, Monoid a) => Resolve (TraitRef a) Source # 
Pretty (TraitRef a) Source # 
type Rep1 TraitRef Source # 
type Rep1 TraitRef = D1 (MetaData "TraitRef" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" True) (C1 (MetaCons "TraitRef" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Path)))
type Rep (TraitRef a) Source # 
type Rep (TraitRef a) = D1 (MetaData "TraitRef" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" True) (C1 (MetaCons "TraitRef" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Path a))))

data TraitBoundModifier Source #

Modifier on a bound, currently this is only used for ?Sized, where the modifier is Maybe. Negative bounds should also be handled here.

Constructors

None 
Maybe 

Instances

Bounded TraitBoundModifier Source # 
Enum TraitBoundModifier Source # 
Eq TraitBoundModifier Source # 
Data TraitBoundModifier Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TraitBoundModifier -> c TraitBoundModifier #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TraitBoundModifier #

toConstr :: TraitBoundModifier -> Constr #

dataTypeOf :: TraitBoundModifier -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c TraitBoundModifier) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TraitBoundModifier) #

gmapT :: (forall b. Data b => b -> b) -> TraitBoundModifier -> TraitBoundModifier #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TraitBoundModifier -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TraitBoundModifier -> r #

gmapQ :: (forall d. Data d => d -> u) -> TraitBoundModifier -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TraitBoundModifier -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TraitBoundModifier -> m TraitBoundModifier #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TraitBoundModifier -> m TraitBoundModifier #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TraitBoundModifier -> m TraitBoundModifier #

Ord TraitBoundModifier Source # 
Show TraitBoundModifier Source # 
Generic TraitBoundModifier Source # 
NFData TraitBoundModifier Source # 

Methods

rnf :: TraitBoundModifier -> () #

type Rep TraitBoundModifier Source # 
type Rep TraitBoundModifier = D1 (MetaData "TraitBoundModifier" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) (C1 (MetaCons "None" PrefixI False) U1) (C1 (MetaCons "Maybe" PrefixI False) U1))

Patterns

data Pat a Source #

Patterns (syntax::ast::Pat).

Constructors

WildP a

wildcard pattern: _

IdentP BindingMode Ident (Maybe (Pat a)) a

identifier 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)

StructP (Path a) [FieldPat a] Bool a

struct pattern. The Bool signals the presence of a ... (example: Variant { x, y, .. })

TupleStructP (Path a) [Pat a] (Maybe Int) a

tuple struct pattern. If the .. pattern is present, the 'Maybe Int' denotes its position. (example: Variant(x, y, .., z))

PathP (Maybe (QSelf a)) (Path a) a

path pattern (example A::B::C)

TupleP [Pat a] (Maybe Int) a

tuple pattern. If the .. pattern is present, the 'Maybe Int' denotes its position. (example: (a, b))

BoxP (Pat a) a

box pattern (example: box _)

RefP (Pat a) Mutability a

reference pattern (example: &mut (a, b))

LitP (Expr a) a

literal (example: 1)

RangeP (Expr a) (Expr a) a

range pattern (example: 1...2)

SliceP [Pat a] (Maybe (Pat a)) [Pat a] a

slice pattern where, as per this RFC, the pattern is split into the patterns before/after the .. and the pattern at the ... (example: [a, b, ..i, y, z])

MacP (Mac a) a

generated from a call to a macro (example: LinkedList!(1,2,3))

Instances

Functor Pat Source # 

Methods

fmap :: (a -> b) -> Pat a -> Pat b #

(<$) :: a -> Pat b -> Pat a #

Generic1 Pat Source # 

Associated Types

type Rep1 (Pat :: * -> *) :: * -> * #

Methods

from1 :: Pat a -> Rep1 Pat a #

to1 :: Rep1 Pat a -> Pat a #

PrettyAnnotated Pat Source # 
Eq a => Eq (Pat a) Source # 

Methods

(==) :: Pat a -> Pat a -> Bool #

(/=) :: Pat a -> Pat a -> Bool #

Data a => Data (Pat a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Pat a -> c (Pat a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Pat a) #

toConstr :: Pat a -> Constr #

dataTypeOf :: Pat a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Pat a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Pat a)) #

gmapT :: (forall b. Data b => b -> b) -> Pat a -> Pat a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Pat a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Pat a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Pat a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Pat a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Pat a -> m (Pat a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Pat a -> m (Pat a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Pat a -> m (Pat a) #

Ord a => Ord (Pat a) Source # 

Methods

compare :: Pat a -> Pat a -> Ordering #

(<) :: Pat a -> Pat a -> Bool #

(<=) :: Pat a -> Pat a -> Bool #

(>) :: Pat a -> Pat a -> Bool #

(>=) :: Pat a -> Pat a -> Bool #

max :: Pat a -> Pat a -> Pat a #

min :: Pat a -> Pat a -> Pat a #

Show a => Show (Pat a) Source # 

Methods

showsPrec :: Int -> Pat a -> ShowS #

show :: Pat a -> String #

showList :: [Pat a] -> ShowS #

Generic (Pat a) Source # 

Associated Types

type Rep (Pat a) :: * -> * #

Methods

from :: Pat a -> Rep (Pat a) x #

to :: Rep (Pat a) x -> Pat a #

NFData a => NFData (Pat a) Source # 

Methods

rnf :: Pat a -> () #

Located a => Located (Pat a) Source # 

Methods

spanOf :: Pat a -> Span Source #

Parse (Pat Span) Source # 

Methods

parser :: P (Pat Span) Source #

(Typeable * a, Monoid a) => Resolve (Pat a) Source # 

Methods

resolve :: Pat a -> Either ResolveFail (Pat a) Source #

resolve' :: Pat a -> Pat a Source #

resolveVerbose :: Pat a -> (Pat a, Severity, [Issue]) Source #

resolveM :: Pat a -> ResolveM (Pat a)

Pretty (Pat a) Source # 

Methods

prettyUnresolved :: Pat a -> Doc b Source #

type Rep1 Pat Source # 
type Rep1 Pat = D1 (MetaData "Pat" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "WildP" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)) ((:+:) (C1 (MetaCons "IdentP" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 BindingMode)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe (Rec1 Pat))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) (C1 (MetaCons "StructP" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Path)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 FieldPat)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))))) ((:+:) (C1 (MetaCons "TupleStructP" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Path)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Pat)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Int))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) ((:+:) (C1 (MetaCons "PathP" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe (Rec1 QSelf))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Path)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) (C1 (MetaCons "TupleP" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Pat))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Int))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))))) ((:+:) ((:+:) (C1 (MetaCons "BoxP" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Pat)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))) ((:+:) (C1 (MetaCons "RefP" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Pat)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Mutability)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) (C1 (MetaCons "LitP" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) ((:+:) (C1 (MetaCons "RangeP" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) ((:+:) (C1 (MetaCons "SliceP" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Pat))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe (Rec1 Pat)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Pat))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) (C1 (MetaCons "MacP" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Mac)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))))))
type Rep (Pat a) Source # 
type Rep (Pat a) = D1 (MetaData "Pat" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "WildP" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))) ((:+:) (C1 (MetaCons "IdentP" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 BindingMode)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Pat a)))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) (C1 (MetaCons "StructP" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Path a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [FieldPat a]))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))))) ((:+:) (C1 (MetaCons "TupleStructP" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Path a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Pat a]))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Int))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) ((:+:) (C1 (MetaCons "PathP" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (QSelf a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Path a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) (C1 (MetaCons "TupleP" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Pat a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Int))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))))) ((:+:) ((:+:) (C1 (MetaCons "BoxP" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Pat a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))) ((:+:) (C1 (MetaCons "RefP" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Pat a))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Mutability)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) (C1 (MetaCons "LitP" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) ((:+:) (C1 (MetaCons "RangeP" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) ((:+:) (C1 (MetaCons "SliceP" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Pat a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Pat a))))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Pat a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) (C1 (MetaCons "MacP" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Mac a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))))))

data BindingMode Source #

Describes 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 }

Instances

Eq BindingMode Source # 
Data BindingMode Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BindingMode -> c BindingMode #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BindingMode #

toConstr :: BindingMode -> Constr #

dataTypeOf :: BindingMode -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c BindingMode) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BindingMode) #

gmapT :: (forall b. Data b => b -> b) -> BindingMode -> BindingMode #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BindingMode -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BindingMode -> r #

gmapQ :: (forall d. Data d => d -> u) -> BindingMode -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> BindingMode -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> BindingMode -> m BindingMode #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BindingMode -> m BindingMode #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BindingMode -> m BindingMode #

Ord BindingMode Source # 
Show BindingMode Source # 
Generic BindingMode Source # 

Associated Types

type Rep BindingMode :: * -> * #

NFData BindingMode Source # 

Methods

rnf :: BindingMode -> () #

Pretty BindingMode Source # 
type Rep BindingMode Source # 
type Rep BindingMode = D1 (MetaData "BindingMode" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) (C1 (MetaCons "ByRef" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Mutability))) (C1 (MetaCons "ByValue" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Mutability))))

data FieldPat a Source #

Field in a struct literal pattern (syntax::ast::FieldPat). The field name Ident is optional but, when it is Nothing, the pattern the field is destructured to must be IdentP.

Example: x in Point { x, y }

Constructors

FieldPat (Maybe Ident) (Pat a) a 

Instances

Functor FieldPat Source # 

Methods

fmap :: (a -> b) -> FieldPat a -> FieldPat b #

(<$) :: a -> FieldPat b -> FieldPat a #

Generic1 FieldPat Source # 

Associated Types

type Rep1 (FieldPat :: * -> *) :: * -> * #

Methods

from1 :: FieldPat a -> Rep1 FieldPat a #

to1 :: Rep1 FieldPat a -> FieldPat a #

PrettyAnnotated FieldPat Source # 
Eq a => Eq (FieldPat a) Source # 

Methods

(==) :: FieldPat a -> FieldPat a -> Bool #

(/=) :: FieldPat a -> FieldPat a -> Bool #

Data a => Data (FieldPat a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FieldPat a -> c (FieldPat a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (FieldPat a) #

toConstr :: FieldPat a -> Constr #

dataTypeOf :: FieldPat a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (FieldPat a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (FieldPat a)) #

gmapT :: (forall b. Data b => b -> b) -> FieldPat a -> FieldPat a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FieldPat a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FieldPat a -> r #

gmapQ :: (forall d. Data d => d -> u) -> FieldPat a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> FieldPat a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> FieldPat a -> m (FieldPat a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FieldPat a -> m (FieldPat a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FieldPat a -> m (FieldPat a) #

Ord a => Ord (FieldPat a) Source # 

Methods

compare :: FieldPat a -> FieldPat a -> Ordering #

(<) :: FieldPat a -> FieldPat a -> Bool #

(<=) :: FieldPat a -> FieldPat a -> Bool #

(>) :: FieldPat a -> FieldPat a -> Bool #

(>=) :: FieldPat a -> FieldPat a -> Bool #

max :: FieldPat a -> FieldPat a -> FieldPat a #

min :: FieldPat a -> FieldPat a -> FieldPat a #

Show a => Show (FieldPat a) Source # 

Methods

showsPrec :: Int -> FieldPat a -> ShowS #

show :: FieldPat a -> String #

showList :: [FieldPat a] -> ShowS #

Generic (FieldPat a) Source # 

Associated Types

type Rep (FieldPat a) :: * -> * #

Methods

from :: FieldPat a -> Rep (FieldPat a) x #

to :: Rep (FieldPat a) x -> FieldPat a #

NFData a => NFData (FieldPat a) Source # 

Methods

rnf :: FieldPat a -> () #

Located a => Located (FieldPat a) Source # 

Methods

spanOf :: FieldPat a -> Span Source #

(Typeable * a, Monoid a) => Resolve (FieldPat a) Source # 
Pretty (FieldPat a) Source # 
type Rep1 FieldPat Source # 
type Rep (FieldPat a) Source # 

Statements

data Stmt a Source #

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.

Constructors

Local (Pat a) (Maybe (Ty a)) (Maybe (Expr a)) [Attribute a] a

A local let binding (syntax::ast::Local) (example: let x: i32 = 1;)

ItemStmt (Item a) a

Item definition (example: fn foo(x: i32) { return x + 1 })

NoSemi (Expr a) a

Expression without a trailing semicolon (example: x + 1)

Semi (Expr a) a

Expression with a trailing semicolon (example: x + 1;)

MacStmt (Mac a) MacStmtStyle [Attribute a] a

A macro call (example: println!("hello world"))

Instances

Functor Stmt Source # 

Methods

fmap :: (a -> b) -> Stmt a -> Stmt b #

(<$) :: a -> Stmt b -> Stmt a #

Generic1 Stmt Source # 

Associated Types

type Rep1 (Stmt :: * -> *) :: * -> * #

Methods

from1 :: Stmt a -> Rep1 Stmt a #

to1 :: Rep1 Stmt a -> Stmt a #

PrettyAnnotated Stmt Source # 
Eq a => Eq (Stmt a) Source # 

Methods

(==) :: Stmt a -> Stmt a -> Bool #

(/=) :: Stmt a -> Stmt a -> Bool #

Data a => Data (Stmt a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Stmt a -> c (Stmt a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Stmt a) #

toConstr :: Stmt a -> Constr #

dataTypeOf :: Stmt a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Stmt a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Stmt a)) #

gmapT :: (forall b. Data b => b -> b) -> Stmt a -> Stmt a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Stmt a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Stmt a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Stmt a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Stmt a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Stmt a -> m (Stmt a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Stmt a -> m (Stmt a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Stmt a -> m (Stmt a) #

Ord a => Ord (Stmt a) Source # 

Methods

compare :: Stmt a -> Stmt a -> Ordering #

(<) :: Stmt a -> Stmt a -> Bool #

(<=) :: Stmt a -> Stmt a -> Bool #

(>) :: Stmt a -> Stmt a -> Bool #

(>=) :: Stmt a -> Stmt a -> Bool #

max :: Stmt a -> Stmt a -> Stmt a #

min :: Stmt a -> Stmt a -> Stmt a #

Show a => Show (Stmt a) Source # 

Methods

showsPrec :: Int -> Stmt a -> ShowS #

show :: Stmt a -> String #

showList :: [Stmt a] -> ShowS #

Generic (Stmt a) Source # 

Associated Types

type Rep (Stmt a) :: * -> * #

Methods

from :: Stmt a -> Rep (Stmt a) x #

to :: Rep (Stmt a) x -> Stmt a #

NFData a => NFData (Stmt a) Source # 

Methods

rnf :: Stmt a -> () #

Located a => Located (Stmt a) Source # 

Methods

spanOf :: Stmt a -> Span Source #

Parse (Stmt Span) Source # 

Methods

parser :: P (Stmt Span) Source #

(Typeable * a, Monoid a) => Resolve (Stmt a) Source # 

Methods

resolve :: Stmt a -> Either ResolveFail (Stmt a) Source #

resolve' :: Stmt a -> Stmt a Source #

resolveVerbose :: Stmt a -> (Stmt a, Severity, [Issue]) Source #

resolveM :: Stmt a -> ResolveM (Stmt a)

Pretty (Stmt a) Source # 

Methods

prettyUnresolved :: Stmt a -> Doc b Source #

type Rep1 Stmt Source # 
type Rep1 Stmt = D1 (MetaData "Stmt" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) ((:+:) (C1 (MetaCons "Local" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Pat)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe (Rec1 Ty)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe (Rec1 Expr))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) (C1 (MetaCons "ItemStmt" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Item)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) ((:+:) (C1 (MetaCons "NoSemi" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))) ((:+:) (C1 (MetaCons "Semi" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))) (C1 (MetaCons "MacStmt" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Mac)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 MacStmtStyle))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))))))
type Rep (Stmt a) Source # 
type Rep (Stmt a) = D1 (MetaData "Stmt" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) ((:+:) (C1 (MetaCons "Local" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Pat a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Ty a))))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Expr a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) (C1 (MetaCons "ItemStmt" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Item a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) ((:+:) (C1 (MetaCons "NoSemi" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))) ((:+:) (C1 (MetaCons "Semi" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))) (C1 (MetaCons "MacStmt" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Mac a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 MacStmtStyle))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))))))

Items

data Item a Source #

A top-level item, possibly in a Mod or a ItemStmt (syntax::ast::Item with syntax::ast::ItemKind inlined).

Example: fn main() { return; }

Constructors

ExternCrate [Attribute a] (Visibility a) Ident (Maybe Ident) a

extern crate item, with optional original crate name. Examples: extern crate foo or extern crate foo_bar as foo

Use [Attribute a] (Visibility a) (UseTree a) a

use declaration (use or pub use) item. Examples: use foo;, use foo::bar;, or use foo::bar as FooBar;

Static [Attribute a] (Visibility a) Ident (Ty a) Mutability (Expr a) a

static item (static or pub static). Examples: static FOO: i32 = 42; or static FOO: &'static str = "bar";

ConstItem [Attribute a] (Visibility a) Ident (Ty a) (Expr a) a

constant item (const or pub const). Example: const FOO: i32 = 42;

Fn [Attribute a] (Visibility a) Ident (FnDecl a) Unsafety Constness Abi (Generics a) (Block a) a

function declaration (fn or pub fn). Example: fn foo(bar: usize) -> usize { .. }

Mod [Attribute a] (Visibility a) Ident (Maybe [Item a]) a

module declaration (mod or pub mod) (syntax::ast::Mod). Example: mod foo; or mod foo { .. }

ForeignMod [Attribute a] (Visibility a) Abi [ForeignItem a] a

external module (extern or pub extern) (syntax::ast::ForeignMod). Example: extern { .. } or extern "C" { .. }

TyAlias [Attribute a] (Visibility a) Ident (Ty a) (Generics a) a

type alias (type or pub type). Example: type Foo = Bar<u8>;

Enum [Attribute a] (Visibility a) Ident [Variant a] (Generics a) a

enum definition (enum or pub enum) (syntax::ast::EnumDef). Example: enum Foo<A, B> { C(A), D(B) }

StructItem [Attribute a] (Visibility a) Ident (VariantData a) (Generics a) a

struct definition (struct or pub struct). Example: struct Foo<A> { x: A }

Union [Attribute a] (Visibility a) Ident (VariantData a) (Generics a) a

union definition (union or pub union). Example: union Foo<A, B> { x: A, y: B }

Trait [Attribute a] (Visibility a) Ident Bool Unsafety (Generics a) [TyParamBound a] [TraitItem a] a

trait declaration (trait or pub trait). Example: trait Foo { .. } or trait Foo<T> { .. }

TraitAlias [Attribute a] (Visibility a) Ident (Generics a) (NonEmpty (TyParamBound a)) a

trait alias Example: trait Foo = Bar + Quux;

Impl [Attribute a] (Visibility a) Defaultness Unsafety ImplPolarity (Generics a) (Maybe (TraitRef a)) (Ty a) [ImplItem a] a

implementation Example: impl<A> Foo<A> { .. } or impl<A> Trait for Foo<A> { .. }

MacItem [Attribute a] (Maybe Ident) (Mac a) a

generated from a call to a macro Example: foo!{ .. }

MacroDef [Attribute a] Ident TokenStream a

definition of a macro via macro_rules Example: macro_rules! foo { .. }

Instances

Functor Item Source # 

Methods

fmap :: (a -> b) -> Item a -> Item b #

(<$) :: a -> Item b -> Item a #

Generic1 Item Source # 

Associated Types

type Rep1 (Item :: * -> *) :: * -> * #

Methods

from1 :: Item a -> Rep1 Item a #

to1 :: Rep1 Item a -> Item a #

PrettyAnnotated Item Source # 
Eq a => Eq (Item a) Source # 

Methods

(==) :: Item a -> Item a -> Bool #

(/=) :: Item a -> Item a -> Bool #

Data a => Data (Item a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Item a -> c (Item a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Item a) #

toConstr :: Item a -> Constr #

dataTypeOf :: Item a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Item a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Item a)) #

gmapT :: (forall b. Data b => b -> b) -> Item a -> Item a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Item a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Item a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Item a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Item a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Item a -> m (Item a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Item a -> m (Item a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Item a -> m (Item a) #

Ord a => Ord (Item a) Source # 

Methods

compare :: Item a -> Item a -> Ordering #

(<) :: Item a -> Item a -> Bool #

(<=) :: Item a -> Item a -> Bool #

(>) :: Item a -> Item a -> Bool #

(>=) :: Item a -> Item a -> Bool #

max :: Item a -> Item a -> Item a #

min :: Item a -> Item a -> Item a #

Show a => Show (Item a) Source # 

Methods

showsPrec :: Int -> Item a -> ShowS #

show :: Item a -> String #

showList :: [Item a] -> ShowS #

Generic (Item a) Source # 

Associated Types

type Rep (Item a) :: * -> * #

Methods

from :: Item a -> Rep (Item a) x #

to :: Rep (Item a) x -> Item a #

NFData a => NFData (Item a) Source # 

Methods

rnf :: Item a -> () #

Located a => Located (Item a) Source # 

Methods

spanOf :: Item a -> Span Source #

Parse (Item Span) Source # 

Methods

parser :: P (Item Span) Source #

(Typeable * a, Monoid a) => Resolve (Item a) Source # 

Methods

resolve :: Item a -> Either ResolveFail (Item a) Source #

resolve' :: Item a -> Item a Source #

resolveVerbose :: Item a -> (Item a, Severity, [Issue]) Source #

resolveM :: Item a -> ResolveM (Item a)

Pretty (Item a) Source # 

Methods

prettyUnresolved :: Item a -> Doc b Source #

type Rep1 Item Source # 
type Rep1 Item = D1 (MetaData "Item" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "ExternCrate" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Ident))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) (C1 (MetaCons "Use" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 UseTree)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) ((:+:) (C1 (MetaCons "Static" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)))) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Ty)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Mutability))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) (C1 (MetaCons "ConstItem" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Ty)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))))) ((:+:) ((:+:) (C1 (MetaCons "Fn" PrefixI False) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 FnDecl)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Unsafety))))) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Constness)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Abi))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Generics)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Block)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))))) (C1 (MetaCons "Mod" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe ((:.:) [] (Rec1 Item)))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))))) ((:+:) (C1 (MetaCons "ForeignMod" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Abi)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 ForeignItem))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) (C1 (MetaCons "TyAlias" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Ty)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Generics)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))))))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "Enum" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Variant))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Generics)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) (C1 (MetaCons "StructItem" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 VariantData)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Generics)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))))) ((:+:) (C1 (MetaCons "Union" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 VariantData)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Generics)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) (C1 (MetaCons "Trait" PrefixI False) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool)))) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Unsafety)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Generics))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 TyParamBound))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 TraitItem))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))))))) ((:+:) ((:+:) (C1 (MetaCons "TraitAlias" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Generics)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) NonEmpty (Rec1 TyParamBound))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) (C1 (MetaCons "Impl" PrefixI False) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Defaultness)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Unsafety)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ImplPolarity))))) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Generics)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe (Rec1 TraitRef)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Ty)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 ImplItem))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))))) ((:+:) (C1 (MetaCons "MacItem" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Ident)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Mac)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) (C1 (MetaCons "MacroDef" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 TokenStream)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))))))
type Rep (Item a) Source # 
type Rep (Item a) = D1 (MetaData "Item" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "ExternCrate" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Ident))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) (C1 (MetaCons "Use" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (UseTree a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) ((:+:) (C1 (MetaCons "Static" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)))) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ty a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Mutability))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) (C1 (MetaCons "ConstItem" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ty a))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))))) ((:+:) ((:+:) (C1 (MetaCons "Fn" PrefixI False) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (FnDecl a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Unsafety))))) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Constness)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Abi))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Generics a))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Block a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))))) (C1 (MetaCons "Mod" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe [Item a]))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))))) ((:+:) (C1 (MetaCons "ForeignMod" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Abi)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ForeignItem a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) (C1 (MetaCons "TyAlias" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ty a))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Generics a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))))))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "Enum" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Variant a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Generics a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) (C1 (MetaCons "StructItem" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (VariantData a))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Generics a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))))) ((:+:) (C1 (MetaCons "Union" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (VariantData a))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Generics a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) (C1 (MetaCons "Trait" PrefixI False) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool)))) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Unsafety)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Generics a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [TyParamBound a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [TraitItem a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))))))) ((:+:) ((:+:) (C1 (MetaCons "TraitAlias" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Generics a))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (NonEmpty (TyParamBound a)))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) (C1 (MetaCons "Impl" PrefixI False) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Defaultness)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Unsafety)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ImplPolarity))))) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Generics a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (TraitRef a))))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ty a))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ImplItem a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))))) ((:+:) (C1 (MetaCons "MacItem" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Ident)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Mac a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) (C1 (MetaCons "MacroDef" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 TokenStream)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))))))

data ForeignItem a Source #

An item within an extern block (syntax::ast::ForeignItem with syntax::ast::ForeignItemKind inlined).

Example: static ext: u8 in extern "C" { static ext: u8 }

Constructors

ForeignFn [Attribute a] (Visibility a) Ident (FnDecl a) (Generics a) a

Foreign function

Example: fn foo(x: i32); in extern "C" { fn foo(x: i32); }

ForeignStatic [Attribute a] (Visibility a) Ident (Ty a) Mutability a

Foreign static variable, optionally mutable

Example: static mut bar: i32; in extern "C" { static mut bar: i32; }

ForeignTy [Attribute a] (Visibility a) Ident a

Foreign type

Example: type Boo;

Instances

Functor ForeignItem Source # 

Methods

fmap :: (a -> b) -> ForeignItem a -> ForeignItem b #

(<$) :: a -> ForeignItem b -> ForeignItem a #

Generic1 ForeignItem Source # 

Associated Types

type Rep1 (ForeignItem :: * -> *) :: * -> * #

PrettyAnnotated ForeignItem Source # 
Eq a => Eq (ForeignItem a) Source # 
Data a => Data (ForeignItem a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ForeignItem a -> c (ForeignItem a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ForeignItem a) #

toConstr :: ForeignItem a -> Constr #

dataTypeOf :: ForeignItem a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (ForeignItem a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ForeignItem a)) #

gmapT :: (forall b. Data b => b -> b) -> ForeignItem a -> ForeignItem a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ForeignItem a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ForeignItem a -> r #

gmapQ :: (forall d. Data d => d -> u) -> ForeignItem a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ForeignItem a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ForeignItem a -> m (ForeignItem a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignItem a -> m (ForeignItem a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignItem a -> m (ForeignItem a) #

Ord a => Ord (ForeignItem a) Source # 
Show a => Show (ForeignItem a) Source # 
Generic (ForeignItem a) Source # 

Associated Types

type Rep (ForeignItem a) :: * -> * #

Methods

from :: ForeignItem a -> Rep (ForeignItem a) x #

to :: Rep (ForeignItem a) x -> ForeignItem a #

NFData a => NFData (ForeignItem a) Source # 

Methods

rnf :: ForeignItem a -> () #

Located a => Located (ForeignItem a) Source # 

Methods

spanOf :: ForeignItem a -> Span Source #

(Typeable * a, Monoid a) => Resolve (ForeignItem a) Source # 
Pretty (ForeignItem a) Source # 
type Rep1 ForeignItem Source # 
type Rep1 ForeignItem = D1 (MetaData "ForeignItem" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) (C1 (MetaCons "ForeignFn" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 FnDecl)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Generics)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) ((:+:) (C1 (MetaCons "ForeignStatic" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Ty)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Mutability)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) (C1 (MetaCons "ForeignTy" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))))
type Rep (ForeignItem a) Source # 
type Rep (ForeignItem a) = D1 (MetaData "ForeignItem" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) (C1 (MetaCons "ForeignFn" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (FnDecl a))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Generics a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) ((:+:) (C1 (MetaCons "ForeignStatic" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ty a))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Mutability)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) (C1 (MetaCons "ForeignTy" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))))

data ImplItem a Source #

An 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!{}
}

Constructors

ConstI [Attribute a] (Visibility a) Defaultness Ident (Ty a) (Expr a) a

Associated constant

MethodI [Attribute a] (Visibility a) Defaultness Ident (Generics a) (MethodSig a) (Block a) a

Method

TypeI [Attribute a] (Visibility a) Defaultness Ident (Ty a) a

Associated type

MacroI [Attribute a] Defaultness (Mac a) a

Macro call

Instances

Functor ImplItem Source # 

Methods

fmap :: (a -> b) -> ImplItem a -> ImplItem b #

(<$) :: a -> ImplItem b -> ImplItem a #

Generic1 ImplItem Source # 

Associated Types

type Rep1 (ImplItem :: * -> *) :: * -> * #

Methods

from1 :: ImplItem a -> Rep1 ImplItem a #

to1 :: Rep1 ImplItem a -> ImplItem a #

PrettyAnnotated ImplItem Source # 
Eq a => Eq (ImplItem a) Source # 

Methods

(==) :: ImplItem a -> ImplItem a -> Bool #

(/=) :: ImplItem a -> ImplItem a -> Bool #

Data a => Data (ImplItem a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ImplItem a -> c (ImplItem a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ImplItem a) #

toConstr :: ImplItem a -> Constr #

dataTypeOf :: ImplItem a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (ImplItem a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ImplItem a)) #

gmapT :: (forall b. Data b => b -> b) -> ImplItem a -> ImplItem a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ImplItem a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ImplItem a -> r #

gmapQ :: (forall d. Data d => d -> u) -> ImplItem a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ImplItem a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ImplItem a -> m (ImplItem a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ImplItem a -> m (ImplItem a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ImplItem a -> m (ImplItem a) #

Ord a => Ord (ImplItem a) Source # 

Methods

compare :: ImplItem a -> ImplItem a -> Ordering #

(<) :: ImplItem a -> ImplItem a -> Bool #

(<=) :: ImplItem a -> ImplItem a -> Bool #

(>) :: ImplItem a -> ImplItem a -> Bool #

(>=) :: ImplItem a -> ImplItem a -> Bool #

max :: ImplItem a -> ImplItem a -> ImplItem a #

min :: ImplItem a -> ImplItem a -> ImplItem a #

Show a => Show (ImplItem a) Source # 

Methods

showsPrec :: Int -> ImplItem a -> ShowS #

show :: ImplItem a -> String #

showList :: [ImplItem a] -> ShowS #

Generic (ImplItem a) Source # 

Associated Types

type Rep (ImplItem a) :: * -> * #

Methods

from :: ImplItem a -> Rep (ImplItem a) x #

to :: Rep (ImplItem a) x -> ImplItem a #

NFData a => NFData (ImplItem a) Source # 

Methods

rnf :: ImplItem a -> () #

Located a => Located (ImplItem a) Source # 

Methods

spanOf :: ImplItem a -> Span Source #

Parse (ImplItem Span) Source # 
(Typeable * a, Monoid a) => Resolve (ImplItem a) Source # 
Pretty (ImplItem a) Source # 
type Rep1 ImplItem Source # 
type Rep1 ImplItem = D1 (MetaData "ImplItem" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) ((:+:) (C1 (MetaCons "ConstI" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Defaultness)))) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Ty))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) (C1 (MetaCons "MethodI" PrefixI False) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Defaultness)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)))) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Generics)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 MethodSig))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Block)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))))) ((:+:) (C1 (MetaCons "TypeI" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Defaultness)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Ty)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) (C1 (MetaCons "MacroI" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Defaultness))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Mac)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))))
type Rep (ImplItem a) Source # 
type Rep (ImplItem a) = D1 (MetaData "ImplItem" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) ((:+:) (C1 (MetaCons "ConstI" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Defaultness)))) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ty a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) (C1 (MetaCons "MethodI" PrefixI False) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Defaultness)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)))) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Generics a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (MethodSig a)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Block a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))))) ((:+:) (C1 (MetaCons "TypeI" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Defaultness)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ty a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) (C1 (MetaCons "MacroI" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Defaultness))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Mac a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))))

data TraitItem a Source #

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!{}
}

Constructors

ConstT [Attribute a] Ident (Ty a) (Maybe (Expr a)) a

Associated constants

MethodT [Attribute a] Ident (Generics a) (MethodSig a) (Maybe (Block a)) a

Method with optional body

TypeT [Attribute a] Ident [TyParamBound a] (Maybe (Ty a)) a

Possibly abstract associated types

MacroT [Attribute a] (Mac a) a

Call to a macro

Instances

Functor TraitItem Source # 

Methods

fmap :: (a -> b) -> TraitItem a -> TraitItem b #

(<$) :: a -> TraitItem b -> TraitItem a #

Generic1 TraitItem Source # 

Associated Types

type Rep1 (TraitItem :: * -> *) :: * -> * #

PrettyAnnotated TraitItem Source # 
Eq a => Eq (TraitItem a) Source # 

Methods

(==) :: TraitItem a -> TraitItem a -> Bool #

(/=) :: TraitItem a -> TraitItem a -> Bool #

Data a => Data (TraitItem a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TraitItem a -> c (TraitItem a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (TraitItem a) #

toConstr :: TraitItem a -> Constr #

dataTypeOf :: TraitItem a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (TraitItem a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (TraitItem a)) #

gmapT :: (forall b. Data b => b -> b) -> TraitItem a -> TraitItem a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TraitItem a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TraitItem a -> r #

gmapQ :: (forall d. Data d => d -> u) -> TraitItem a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TraitItem a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TraitItem a -> m (TraitItem a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TraitItem a -> m (TraitItem a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TraitItem a -> m (TraitItem a) #

Ord a => Ord (TraitItem a) Source # 
Show a => Show (TraitItem a) Source # 
Generic (TraitItem a) Source # 

Associated Types

type Rep (TraitItem a) :: * -> * #

Methods

from :: TraitItem a -> Rep (TraitItem a) x #

to :: Rep (TraitItem a) x -> TraitItem a #

NFData a => NFData (TraitItem a) Source # 

Methods

rnf :: TraitItem a -> () #

Located a => Located (TraitItem a) Source # 

Methods

spanOf :: TraitItem a -> Span Source #

Parse (TraitItem Span) Source # 
(Typeable * a, Monoid a) => Resolve (TraitItem a) Source # 
Pretty (TraitItem a) Source # 
type Rep1 TraitItem Source # 
type Rep1 TraitItem = D1 (MetaData "TraitItem" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) ((:+:) (C1 (MetaCons "ConstT" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Ty)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe (Rec1 Expr))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) (C1 (MetaCons "MethodT" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Generics)))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 MethodSig)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe (Rec1 Block))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))))) ((:+:) (C1 (MetaCons "TypeT" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 TyParamBound))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) Maybe (Rec1 Ty))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) (C1 (MetaCons "MacroT" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) [] (Rec1 Attribute))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Mac)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))))
type Rep (TraitItem a) Source # 
type Rep (TraitItem a) = D1 (MetaData "TraitItem" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) ((:+:) (C1 (MetaCons "ConstT" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ty a))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Expr a)))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) (C1 (MetaCons "MethodT" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Generics a))))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (MethodSig a))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Block a)))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))))) ((:+:) (C1 (MetaCons "TypeT" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [TyParamBound a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Ty a)))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) (C1 (MetaCons "MacroT" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a])) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Mac a))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))))

data Defaultness Source #

ImplItems can be marked default (syntax::ast::Defaultness).

Constructors

Default 
Final 

Instances

Bounded Defaultness Source # 
Enum Defaultness Source # 
Eq Defaultness Source # 
Data Defaultness Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Defaultness -> c Defaultness #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Defaultness #

toConstr :: Defaultness -> Constr #

dataTypeOf :: Defaultness -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Defaultness) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Defaultness) #

gmapT :: (forall b. Data b => b -> b) -> Defaultness -> Defaultness #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Defaultness -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Defaultness -> r #

gmapQ :: (forall d. Data d => d -> u) -> Defaultness -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Defaultness -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Defaultness -> m Defaultness #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Defaultness -> m Defaultness #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Defaultness -> m Defaultness #

Ord Defaultness Source # 
Show Defaultness Source # 
Generic Defaultness Source # 

Associated Types

type Rep Defaultness :: * -> * #

NFData Defaultness Source # 

Methods

rnf :: Defaultness -> () #

type Rep Defaultness Source # 
type Rep Defaultness = D1 (MetaData "Defaultness" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) (C1 (MetaCons "Default" PrefixI False) U1) (C1 (MetaCons "Final" PrefixI False) U1))

data ImplPolarity Source #

For traits with a default impl, one can "opt out" of that impl with a negative impl, by adding ! mark before the trait name. RFC on builtin traits

Example: ! as in impl !Trait for Foo { }

Constructors

Positive 
Negative 

Instances

Bounded ImplPolarity Source # 
Enum ImplPolarity Source # 
Eq ImplPolarity Source # 
Data ImplPolarity Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ImplPolarity -> c ImplPolarity #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ImplPolarity #

toConstr :: ImplPolarity -> Constr #

dataTypeOf :: ImplPolarity -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c ImplPolarity) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ImplPolarity) #

gmapT :: (forall b. Data b => b -> b) -> ImplPolarity -> ImplPolarity #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ImplPolarity -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ImplPolarity -> r #

gmapQ :: (forall d. Data d => d -> u) -> ImplPolarity -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ImplPolarity -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ImplPolarity -> m ImplPolarity #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ImplPolarity -> m ImplPolarity #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ImplPolarity -> m ImplPolarity #

Ord ImplPolarity Source # 
Show ImplPolarity Source # 
Generic ImplPolarity Source # 

Associated Types

type Rep ImplPolarity :: * -> * #

NFData ImplPolarity Source # 

Methods

rnf :: ImplPolarity -> () #

Pretty ImplPolarity Source # 
type Rep ImplPolarity Source # 
type Rep ImplPolarity = D1 (MetaData "ImplPolarity" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) (C1 (MetaCons "Positive" PrefixI False) U1) (C1 (MetaCons "Negative" PrefixI False) U1))

data StructField a Source #

Field of a struct (syntax::ast::StructField) used in declarations

Example: bar: usize as in struct Foo { bar: usize }

Constructors

StructField (Maybe Ident) (Visibility a) (Ty a) [Attribute a] a 

Instances

Functor StructField Source # 

Methods

fmap :: (a -> b) -> StructField a -> StructField b #

(<$) :: a -> StructField b -> StructField a #

Generic1 StructField Source # 

Associated Types

type Rep1 (StructField :: * -> *) :: * -> * #

PrettyAnnotated StructField Source # 
Eq a => Eq (StructField a) Source # 
Data a => Data (StructField a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StructField a -> c (StructField a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (StructField a) #

toConstr :: StructField a -> Constr #

dataTypeOf :: StructField a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (StructField a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (StructField a)) #

gmapT :: (forall b. Data b => b -> b) -> StructField a -> StructField a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StructField a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StructField a -> r #

gmapQ :: (forall d. Data d => d -> u) -> StructField a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> StructField a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> StructField a -> m (StructField a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StructField a -> m (StructField a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StructField a -> m (StructField a) #

Ord a => Ord (StructField a) Source # 
Show a => Show (StructField a) Source # 
Generic (StructField a) Source # 

Associated Types

type Rep (StructField a) :: * -> * #

Methods

from :: StructField a -> Rep (StructField a) x #

to :: Rep (StructField a) x -> StructField a #

NFData a => NFData (StructField a) Source # 

Methods

rnf :: StructField a -> () #

Located a => Located (StructField a) Source # 

Methods

spanOf :: StructField a -> Span Source #

(Typeable * a, Monoid a) => Resolve (StructField a) Source # 
Pretty (StructField a) Source # 
type Rep1 StructField Source # 
type Rep (StructField a) Source # 

data Variant a Source #

A variant in Rust is a constructor (either in a StructItem, Union, or Enum) which groups together fields (syntax::ast::Variant). In the case of a unit variant, there can also be an explicit discriminant expression.

Constructors

Variant Ident [Attribute a] (VariantData a) (Maybe (Expr a)) a 

Instances

Functor Variant Source # 

Methods

fmap :: (a -> b) -> Variant a -> Variant b #

(<$) :: a -> Variant b -> Variant a #

Generic1 Variant Source # 

Associated Types

type Rep1 (Variant :: * -> *) :: * -> * #

Methods

from1 :: Variant a -> Rep1 Variant a #

to1 :: Rep1 Variant a -> Variant a #

PrettyAnnotated Variant Source # 
Eq a => Eq (Variant a) Source # 

Methods

(==) :: Variant a -> Variant a -> Bool #

(/=) :: Variant a -> Variant a -> Bool #

Data a => Data (Variant a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Variant a -> c (Variant a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Variant a) #

toConstr :: Variant a -> Constr #

dataTypeOf :: Variant a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Variant a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Variant a)) #

gmapT :: (forall b. Data b => b -> b) -> Variant a -> Variant a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Variant a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Variant a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Variant a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Variant a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Variant a -> m (Variant a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Variant a -> m (Variant a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Variant a -> m (Variant a) #

Ord a => Ord (Variant a) Source # 

Methods

compare :: Variant a -> Variant a -> Ordering #

(<) :: Variant a -> Variant a -> Bool #

(<=) :: Variant a -> Variant a -> Bool #

(>) :: Variant a -> Variant a -> Bool #

(>=) :: Variant a -> Variant a -> Bool #

max :: Variant a -> Variant a -> Variant a #

min :: Variant a -> Variant a -> Variant a #

Show a => Show (Variant a) Source # 

Methods

showsPrec :: Int -> Variant a -> ShowS #

show :: Variant a -> String #

showList :: [Variant a] -> ShowS #

Generic (Variant a) Source # 

Associated Types

type Rep (Variant a) :: * -> * #

Methods

from :: Variant a -> Rep (Variant a) x #

to :: Rep (Variant a) x -> Variant a #

NFData a => NFData (Variant a) Source # 

Methods

rnf :: Variant a -> () #

Located a => Located (Variant a) Source # 

Methods

spanOf :: Variant a -> Span Source #

(Typeable * a, Monoid a) => Resolve (Variant a) Source # 
Pretty (Variant a) Source # 
type Rep1 Variant Source # 
type Rep (Variant a) Source # 

data VariantData a Source #

Main payload in a Variant (syntax::ast::VariantData).

Examples:

enum Foo {
  // Struct variant
  Bar { x: f64 },

  // Tuple variant
  Baz(i32, i32),

  // Unit variant
  Qux,
}

Constructors

StructD [StructField a] a

Struct variant

TupleD [StructField a] a

Tuple variant

UnitD a

Unit variant

Instances

Functor VariantData Source # 

Methods

fmap :: (a -> b) -> VariantData a -> VariantData b #

(<$) :: a -> VariantData b -> VariantData a #

Generic1 VariantData Source # 

Associated Types

type Rep1 (VariantData :: * -> *) :: * -> * #

Eq a => Eq (VariantData a) Source # 
Data a => Data (VariantData a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> VariantData a -> c (VariantData a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (VariantData a) #

toConstr :: VariantData a -> Constr #

dataTypeOf :: VariantData a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (VariantData a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (VariantData a)) #

gmapT :: (forall b. Data b => b -> b) -> VariantData a -> VariantData a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> VariantData a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> VariantData a -> r #

gmapQ :: (forall d. Data d => d -> u) -> VariantData a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> VariantData a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> VariantData a -> m (VariantData a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> VariantData a -> m (VariantData a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> VariantData a -> m (VariantData a) #

Ord a => Ord (VariantData a) Source # 
Show a => Show (VariantData a) Source # 
Generic (VariantData a) Source # 

Associated Types

type Rep (VariantData a) :: * -> * #

Methods

from :: VariantData a -> Rep (VariantData a) x #

to :: Rep (VariantData a) x -> VariantData a #

NFData a => NFData (VariantData a) Source # 

Methods

rnf :: VariantData a -> () #

Located a => Located (VariantData a) Source # 

Methods

spanOf :: VariantData a -> Span Source #

(Typeable * a, Monoid a) => Resolve (VariantData a) Source # 
type Rep1 VariantData Source # 
type Rep (VariantData a) Source # 

data UseTree a Source #

Paths used in Use 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}

Constructors

UseTreeSimple (Path a) (Maybe Ident) a

Simple path, optionally ending in an as

UseTreeGlob (Path a) a

Path ending in a glob pattern

UseTreeNested (Path a) [UseTree a] a

Path ending in a list of more paths

Instances

Functor UseTree Source # 

Methods

fmap :: (a -> b) -> UseTree a -> UseTree b #

(<$) :: a -> UseTree b -> UseTree a #

Generic1 UseTree Source # 

Associated Types

type Rep1 (UseTree :: * -> *) :: * -> * #

Methods

from1 :: UseTree a -> Rep1 UseTree a #

to1 :: Rep1 UseTree a -> UseTree a #

PrettyAnnotated UseTree Source # 
Eq a => Eq (UseTree a) Source # 

Methods

(==) :: UseTree a -> UseTree a -> Bool #

(/=) :: UseTree a -> UseTree a -> Bool #

Data a => Data (UseTree a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UseTree a -> c (UseTree a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (UseTree a) #

toConstr :: UseTree a -> Constr #

dataTypeOf :: UseTree a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (UseTree a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (UseTree a)) #

gmapT :: (forall b. Data b => b -> b) -> UseTree a -> UseTree a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UseTree a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UseTree a -> r #

gmapQ :: (forall d. Data d => d -> u) -> UseTree a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UseTree a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UseTree a -> m (UseTree a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UseTree a -> m (UseTree a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UseTree a -> m (UseTree a) #

Ord a => Ord (UseTree a) Source # 

Methods

compare :: UseTree a -> UseTree a -> Ordering #

(<) :: UseTree a -> UseTree a -> Bool #

(<=) :: UseTree a -> UseTree a -> Bool #

(>) :: UseTree a -> UseTree a -> Bool #

(>=) :: UseTree a -> UseTree a -> Bool #

max :: UseTree a -> UseTree a -> UseTree a #

min :: UseTree a -> UseTree a -> UseTree a #

Show a => Show (UseTree a) Source # 

Methods

showsPrec :: Int -> UseTree a -> ShowS #

show :: UseTree a -> String #

showList :: [UseTree a] -> ShowS #

Generic (UseTree a) Source # 

Associated Types

type Rep (UseTree a) :: * -> * #

Methods

from :: UseTree a -> Rep (UseTree a) x #

to :: Rep (UseTree a) x -> UseTree a #

NFData a => NFData (UseTree a) Source # 

Methods

rnf :: UseTree a -> () #

Located a => Located (UseTree a) Source # 

Methods

spanOf :: UseTree a -> Span Source #

(Typeable * a, Monoid a) => Resolve (UseTree a) Source # 
Pretty (UseTree a) Source # 
type Rep1 UseTree Source # 
type Rep (UseTree a) Source # 

data Visibility a Source #

The visibility modifier dictates from where one can access something (ast::syntax::Visibility). RFC about adding restricted visibility

Constructors

PublicV

pub is accessible from everywhere

CrateV

pub(crate) is accessible from within the crate

RestrictedV (Path a)

for some path p, pub(p) is visible at that path

InheritedV

if no visbility is specified, this is the default

Instances

Functor Visibility Source # 

Methods

fmap :: (a -> b) -> Visibility a -> Visibility b #

(<$) :: a -> Visibility b -> Visibility a #

Generic1 Visibility Source # 

Associated Types

type Rep1 (Visibility :: * -> *) :: * -> * #

PrettyAnnotated Visibility Source # 
Eq a => Eq (Visibility a) Source # 

Methods

(==) :: Visibility a -> Visibility a -> Bool #

(/=) :: Visibility a -> Visibility a -> Bool #

Data a => Data (Visibility a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Visibility a -> c (Visibility a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Visibility a) #

toConstr :: Visibility a -> Constr #

dataTypeOf :: Visibility a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Visibility a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Visibility a)) #

gmapT :: (forall b. Data b => b -> b) -> Visibility a -> Visibility a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Visibility a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Visibility a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Visibility a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Visibility a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Visibility a -> m (Visibility a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Visibility a -> m (Visibility a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Visibility a -> m (Visibility a) #

Ord a => Ord (Visibility a) Source # 
Show a => Show (Visibility a) Source # 
Generic (Visibility a) Source # 

Associated Types

type Rep (Visibility a) :: * -> * #

Methods

from :: Visibility a -> Rep (Visibility a) x #

to :: Rep (Visibility a) x -> Visibility a #

NFData a => NFData (Visibility a) Source # 

Methods

rnf :: Visibility a -> () #

(Typeable * a, Monoid a) => Resolve (Visibility a) Source # 
Pretty (Visibility a) Source # 
type Rep1 Visibility Source # 
type Rep1 Visibility = D1 (MetaData "Visibility" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) ((:+:) (C1 (MetaCons "PublicV" PrefixI False) U1) (C1 (MetaCons "CrateV" PrefixI False) U1)) ((:+:) (C1 (MetaCons "RestrictedV" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Path))) (C1 (MetaCons "InheritedV" PrefixI False) U1)))
type Rep (Visibility a) Source # 
type Rep (Visibility a) = D1 (MetaData "Visibility" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) ((:+:) (C1 (MetaCons "PublicV" PrefixI False) U1) (C1 (MetaCons "CrateV" PrefixI False) U1)) ((:+:) (C1 (MetaCons "RestrictedV" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Path a)))) (C1 (MetaCons "InheritedV" PrefixI False) U1)))

data Constness Source #

Const annotation to specify if a function or method is allowed to be called in constants context with constant arguments (syntax::ast::Constness). Relevant RFC

Example: const in const fn inc(x: i32) -> i32 { x + 1 }

Constructors

Const 
NotConst 

Instances

Bounded Constness Source # 
Enum Constness Source # 
Eq Constness Source # 
Data Constness Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Constness -> c Constness #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Constness #

toConstr :: Constness -> Constr #

dataTypeOf :: Constness -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Constness) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Constness) #

gmapT :: (forall b. Data b => b -> b) -> Constness -> Constness #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Constness -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Constness -> r #

gmapQ :: (forall d. Data d => d -> u) -> Constness -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Constness -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Constness -> m Constness #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Constness -> m Constness #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Constness -> m Constness #

Ord Constness Source # 
Show Constness Source # 
Generic Constness Source # 

Associated Types

type Rep Constness :: * -> * #

NFData Constness Source # 

Methods

rnf :: Constness -> () #

type Rep Constness Source # 
type Rep Constness = D1 (MetaData "Constness" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) (C1 (MetaCons "Const" PrefixI False) U1) (C1 (MetaCons "NotConst" PrefixI False) U1))

data MethodSig a Source #

Represents a method's signature in a trait declaration, or in an implementation.

Instances

Functor MethodSig Source # 

Methods

fmap :: (a -> b) -> MethodSig a -> MethodSig b #

(<$) :: a -> MethodSig b -> MethodSig a #

Generic1 MethodSig Source # 

Associated Types

type Rep1 (MethodSig :: * -> *) :: * -> * #

Eq a => Eq (MethodSig a) Source # 

Methods

(==) :: MethodSig a -> MethodSig a -> Bool #

(/=) :: MethodSig a -> MethodSig a -> Bool #

Data a => Data (MethodSig a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MethodSig a -> c (MethodSig a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (MethodSig a) #

toConstr :: MethodSig a -> Constr #

dataTypeOf :: MethodSig a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (MethodSig a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (MethodSig a)) #

gmapT :: (forall b. Data b => b -> b) -> MethodSig a -> MethodSig a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MethodSig a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MethodSig a -> r #

gmapQ :: (forall d. Data d => d -> u) -> MethodSig a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> MethodSig a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> MethodSig a -> m (MethodSig a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MethodSig a -> m (MethodSig a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MethodSig a -> m (MethodSig a) #

Ord a => Ord (MethodSig a) Source # 
Show a => Show (MethodSig a) Source # 
Generic (MethodSig a) Source # 

Associated Types

type Rep (MethodSig a) :: * -> * #

Methods

from :: MethodSig a -> Rep (MethodSig a) x #

to :: Rep (MethodSig a) x -> MethodSig a #

NFData a => NFData (MethodSig a) Source # 

Methods

rnf :: MethodSig a -> () #

(Typeable * a, Monoid a) => Resolve (MethodSig a) Source # 
type Rep1 MethodSig Source # 
type Rep (MethodSig a) Source # 

Blocks

data Block a Source #

A curly brace delimited sequence of statements (syntax::ast::Block). The last statement in the block can always be a NoSemi expression.

Example: { let x = 1; return x + y } as in fn foo() { let x = 1; return x + y }

Constructors

Block [Stmt a] Unsafety a 

Instances

Functor Block Source # 

Methods

fmap :: (a -> b) -> Block a -> Block b #

(<$) :: a -> Block b -> Block a #

Generic1 Block Source # 

Associated Types

type Rep1 (Block :: * -> *) :: * -> * #

Methods

from1 :: Block a -> Rep1 Block a #

to1 :: Rep1 Block a -> Block a #

PrettyAnnotated Block Source # 
Eq a => Eq (Block a) Source # 

Methods

(==) :: Block a -> Block a -> Bool #

(/=) :: Block a -> Block a -> Bool #

Data a => Data (Block a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Block a -> c (Block a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Block a) #

toConstr :: Block a -> Constr #

dataTypeOf :: Block a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Block a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Block a)) #

gmapT :: (forall b. Data b => b -> b) -> Block a -> Block a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Block a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Block a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Block a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Block a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Block a -> m (Block a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Block a -> m (Block a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Block a -> m (Block a) #

Ord a => Ord (Block a) Source # 

Methods

compare :: Block a -> Block a -> Ordering #

(<) :: Block a -> Block a -> Bool #

(<=) :: Block a -> Block a -> Bool #

(>) :: Block a -> Block a -> Bool #

(>=) :: Block a -> Block a -> Bool #

max :: Block a -> Block a -> Block a #

min :: Block a -> Block a -> Block a #

Show a => Show (Block a) Source # 

Methods

showsPrec :: Int -> Block a -> ShowS #

show :: Block a -> String #

showList :: [Block a] -> ShowS #

Generic (Block a) Source # 

Associated Types

type Rep (Block a) :: * -> * #

Methods

from :: Block a -> Rep (Block a) x #

to :: Rep (Block a) x -> Block a #

NFData a => NFData (Block a) Source # 

Methods

rnf :: Block a -> () #

Located a => Located (Block a) Source # 

Methods

spanOf :: Block a -> Span Source #

Parse (Block Span) Source # 

Methods

parser :: P (Block Span) Source #

(Typeable * a, Monoid a) => Resolve (Block a) Source # 
Pretty (Block a) Source # 

Methods

prettyUnresolved :: Block a -> Doc b Source #

type Rep1 Block Source # 
type Rep (Block a) Source # 

Token trees

data TokenTree Source #

When the parser encounters a macro call, it parses what follows as a Delimited token tree. Basically, token trees let you store raw tokens or Sequence forms inside of balanced parens or 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.

Constructors

Token Span Token

A single token

Delimited

A delimited sequence of tokens (syntax::tokenstream::Delimited) Example: { [->+<] } in brainfuck!{ [->+<] };

Fields

Instances

Eq TokenTree Source # 
Data TokenTree Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TokenTree -> c TokenTree #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TokenTree #

toConstr :: TokenTree -> Constr #

dataTypeOf :: TokenTree -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c TokenTree) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TokenTree) #

gmapT :: (forall b. Data b => b -> b) -> TokenTree -> TokenTree #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TokenTree -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TokenTree -> r #

gmapQ :: (forall d. Data d => d -> u) -> TokenTree -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TokenTree -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TokenTree -> m TokenTree #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TokenTree -> m TokenTree #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TokenTree -> m TokenTree #

Ord TokenTree Source # 
Show TokenTree Source # 
Generic TokenTree Source # 

Associated Types

type Rep TokenTree :: * -> * #

NFData TokenTree Source # 

Methods

rnf :: TokenTree -> () #

Located TokenTree Source # 
Parse TokenTree Source # 
Resolve TokenTree Source # 
Pretty TokenTree Source # 
type Rep TokenTree Source # 

data TokenStream Source #

An abstract sequence of tokens, organized into a sequence (e.g. stream) of TokenTrees, which are themselves a single Token or a Delimited subsequence of tokens.

Constructors

Tree TokenTree

a single token or a single set of delimited tokens

Stream [TokenStream]

stream of streams of tokens

Instances

Eq TokenStream Source # 
Data TokenStream Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TokenStream -> c TokenStream #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TokenStream #

toConstr :: TokenStream -> Constr #

dataTypeOf :: TokenStream -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c TokenStream) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TokenStream) #

gmapT :: (forall b. Data b => b -> b) -> TokenStream -> TokenStream #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TokenStream -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TokenStream -> r #

gmapQ :: (forall d. Data d => d -> u) -> TokenStream -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TokenStream -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TokenStream -> m TokenStream #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TokenStream -> m TokenStream #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TokenStream -> m TokenStream #

Ord TokenStream Source # 
Show TokenStream Source # 
Generic TokenStream Source # 

Associated Types

type Rep TokenStream :: * -> * #

NFData TokenStream Source # 

Methods

rnf :: TokenStream -> () #

Located TokenStream Source #

Span is not stored on TokenStream - it is computed

Parse TokenStream Source # 
Resolve TokenStream Source # 
Pretty TokenStream Source # 
type Rep TokenStream Source # 
type Rep TokenStream = D1 (MetaData "TokenStream" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) (C1 (MetaCons "Tree" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 TokenTree))) (C1 (MetaCons "Stream" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [TokenStream]))))

unconsTokenStream :: TokenStream -> Maybe (TokenTree, TokenStream) Source #

A TokenStream is at its core just a stream of TokenTree. This function lets you get at that directly. For example, you can use 'Data.List.unfoldr unconsTokenStream' to convert between a TokenStream and '[TokenTree]'.

data Nonterminal a Source #

For interpolation during macro expansion (syntax::ast::NonTerminal).

Instances

Functor Nonterminal Source # 

Methods

fmap :: (a -> b) -> Nonterminal a -> Nonterminal b #

(<$) :: a -> Nonterminal b -> Nonterminal a #

Generic1 Nonterminal Source # 

Associated Types

type Rep1 (Nonterminal :: * -> *) :: * -> * #

PrettyAnnotated Nonterminal Source # 
Eq a => Eq (Nonterminal a) Source # 
Data a => Data (Nonterminal a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Nonterminal a -> c (Nonterminal a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Nonterminal a) #

toConstr :: Nonterminal a -> Constr #

dataTypeOf :: Nonterminal a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Nonterminal a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Nonterminal a)) #

gmapT :: (forall b. Data b => b -> b) -> Nonterminal a -> Nonterminal a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Nonterminal a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Nonterminal a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Nonterminal a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Nonterminal a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Nonterminal a -> m (Nonterminal a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Nonterminal a -> m (Nonterminal a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Nonterminal a -> m (Nonterminal a) #

Ord a => Ord (Nonterminal a) Source # 
Show a => Show (Nonterminal a) Source # 
Generic (Nonterminal a) Source # 

Associated Types

type Rep (Nonterminal a) :: * -> * #

Methods

from :: Nonterminal a -> Rep (Nonterminal a) x #

to :: Rep (Nonterminal a) x -> Nonterminal a #

NFData a => NFData (Nonterminal a) Source # 

Methods

rnf :: Nonterminal a -> () #

Pretty (Nonterminal a) Source # 
type Rep1 Nonterminal Source # 
type Rep1 Nonterminal = D1 (MetaData "Nonterminal" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "NtItem" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Item))) (C1 (MetaCons "NtBlock" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Block)))) ((:+:) (C1 (MetaCons "NtStmt" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Stmt))) (C1 (MetaCons "NtPat" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Pat))))) ((:+:) ((:+:) (C1 (MetaCons "NtExpr" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr))) (C1 (MetaCons "NtTy" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Ty)))) ((:+:) (C1 (MetaCons "NtIdent" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) (C1 (MetaCons "NtPath" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Path)))))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "NtTT" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 TokenTree))) (C1 (MetaCons "NtArm" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Arm)))) ((:+:) (C1 (MetaCons "NtImplItem" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 ImplItem))) (C1 (MetaCons "NtTraitItem" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 TraitItem))))) ((:+:) ((:+:) (C1 (MetaCons "NtGenerics" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Generics))) (C1 (MetaCons "NtWhereClause" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 WhereClause)))) ((:+:) (C1 (MetaCons "NtArg" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Arg))) (C1 (MetaCons "NtLit" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Lit)))))))
type Rep (Nonterminal a) Source # 
type Rep (Nonterminal a) = D1 (MetaData "Nonterminal" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "NtItem" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Item a)))) (C1 (MetaCons "NtBlock" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Block a))))) ((:+:) (C1 (MetaCons "NtStmt" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Stmt a)))) (C1 (MetaCons "NtPat" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Pat a)))))) ((:+:) ((:+:) (C1 (MetaCons "NtExpr" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a)))) (C1 (MetaCons "NtTy" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ty a))))) ((:+:) (C1 (MetaCons "NtIdent" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) (C1 (MetaCons "NtPath" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Path a))))))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "NtTT" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 TokenTree))) (C1 (MetaCons "NtArm" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Arm a))))) ((:+:) (C1 (MetaCons "NtImplItem" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (ImplItem a)))) (C1 (MetaCons "NtTraitItem" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (TraitItem a)))))) ((:+:) ((:+:) (C1 (MetaCons "NtGenerics" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Generics a)))) (C1 (MetaCons "NtWhereClause" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (WhereClause a))))) ((:+:) (C1 (MetaCons "NtArg" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Arg a)))) (C1 (MetaCons "NtLit" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Lit a))))))))

data Mac a Source #

Represents a macro invocation (syntax::ast::Mac). The Path indicates which macro is being invoked, and the TokenStream contains the source of the macro invocation.

Constructors

Mac (Path a) TokenStream a 

Instances

Functor Mac Source # 

Methods

fmap :: (a -> b) -> Mac a -> Mac b #

(<$) :: a -> Mac b -> Mac a #

Generic1 Mac Source # 

Associated Types

type Rep1 (Mac :: * -> *) :: * -> * #

Methods

from1 :: Mac a -> Rep1 Mac a #

to1 :: Rep1 Mac a -> Mac a #

PrettyAnnotated Mac Source # 
Eq a => Eq (Mac a) Source # 

Methods

(==) :: Mac a -> Mac a -> Bool #

(/=) :: Mac a -> Mac a -> Bool #

Data a => Data (Mac a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Mac a -> c (Mac a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Mac a) #

toConstr :: Mac a -> Constr #

dataTypeOf :: Mac a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Mac a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Mac a)) #

gmapT :: (forall b. Data b => b -> b) -> Mac a -> Mac a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Mac a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Mac a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Mac a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Mac a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Mac a -> m (Mac a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Mac a -> m (Mac a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Mac a -> m (Mac a) #

Ord a => Ord (Mac a) Source # 

Methods

compare :: Mac a -> Mac a -> Ordering #

(<) :: Mac a -> Mac a -> Bool #

(<=) :: Mac a -> Mac a -> Bool #

(>) :: Mac a -> Mac a -> Bool #

(>=) :: Mac a -> Mac a -> Bool #

max :: Mac a -> Mac a -> Mac a #

min :: Mac a -> Mac a -> Mac a #

Show a => Show (Mac a) Source # 

Methods

showsPrec :: Int -> Mac a -> ShowS #

show :: Mac a -> String #

showList :: [Mac a] -> ShowS #

Generic (Mac a) Source # 

Associated Types

type Rep (Mac a) :: * -> * #

Methods

from :: Mac a -> Rep (Mac a) x #

to :: Rep (Mac a) x -> Mac a #

NFData a => NFData (Mac a) Source # 

Methods

rnf :: Mac a -> () #

Located a => Located (Mac a) Source # 

Methods

spanOf :: Mac a -> Span Source #

(Typeable * a, Monoid a) => Resolve (Mac a) Source # 

Methods

resolve :: Mac a -> Either ResolveFail (Mac a) Source #

resolve' :: Mac a -> Mac a Source #

resolveVerbose :: Mac a -> (Mac a, Severity, [Issue]) Source #

resolveM :: Mac a -> ResolveM (Mac a)

Pretty (Mac a) Source # 

Methods

prettyUnresolved :: Mac a -> Doc b Source #

type Rep1 Mac Source # 
type Rep (Mac a) Source # 

data MacStmtStyle Source #

Style of the macro statement (syntax::ast::MacStmtStyle).

Constructors

SemicolonMac

trailing semicolon (example: foo! { ... };, foo!(...);, and foo![...];)

BracesMac

braces (example: foo! { ... })

Instances

Bounded MacStmtStyle Source # 
Enum MacStmtStyle Source # 
Eq MacStmtStyle Source # 
Data MacStmtStyle Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MacStmtStyle -> c MacStmtStyle #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c MacStmtStyle #

toConstr :: MacStmtStyle -> Constr #

dataTypeOf :: MacStmtStyle -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c MacStmtStyle) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MacStmtStyle) #

gmapT :: (forall b. Data b => b -> b) -> MacStmtStyle -> MacStmtStyle #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MacStmtStyle -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MacStmtStyle -> r #

gmapQ :: (forall d. Data d => d -> u) -> MacStmtStyle -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> MacStmtStyle -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> MacStmtStyle -> m MacStmtStyle #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MacStmtStyle -> m MacStmtStyle #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MacStmtStyle -> m MacStmtStyle #

Ord MacStmtStyle Source # 
Show MacStmtStyle Source # 
Generic MacStmtStyle Source # 

Associated Types

type Rep MacStmtStyle :: * -> * #

NFData MacStmtStyle Source # 

Methods

rnf :: MacStmtStyle -> () #

type Rep MacStmtStyle Source # 
type Rep MacStmtStyle = D1 (MetaData "MacStmtStyle" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) (C1 (MetaCons "SemicolonMac" PrefixI False) U1) (C1 (MetaCons "BracesMac" PrefixI False) U1))

Tokens

data Token Source #

A general token (based on syntax::parse::token::Token).

Unlike its libsyntax counterpart, Token has folded in syntax::parse::token::BinOpToken and syntax::parse::token::BinOpEqToken as regular tokens.

Constructors

Equal

= token

Less

< token

Greater

> token

Ampersand

& token

Pipe

| token

Exclamation

! token

Tilde

~ token

Plus

+ token

Minus

- token

Star

* token

Slash

/ token

Percent

% token

Caret

^ token

GreaterEqual

>= token

GreaterGreaterEqual

>>= token

AmpersandAmpersand

&& token

PipePipe

|| token

LessLess

<< token

GreaterGreater

>> token

EqualEqual

== token

NotEqual

!= token

LessEqual

<= token

LessLessEqual

<<= token

MinusEqual

-= token

AmpersandEqual

&= token

PipeEqual

|= token

PlusEqual

+= token

StarEqual

*= token

SlashEqual

/= token

CaretEqual

^= token

PercentEqual

%= token

At

@ token

Dot

. token

DotDot

.. token

DotDotEqual

..= token

DotDotDot

... token

Comma

, token

Semicolon

; token

Colon

: token

ModSep

:: token

RArrow

-> token

LArrow

<- token

FatArrow

=> token

Pound

# token

Dollar

$ token

Question

? token

OpenDelim !Delim

One of (, [, {

CloseDelim !Delim

One of ), ], }

LiteralTok LitTok (Maybe Name)

a literal token with an optional suffix (something like i32)

IdentTok Ident

an arbitrary identifier (something like x or foo or and_then)

Underscore

_ token

LifetimeTok Ident

a lifetime (something like 'a or 'static)

Space Space Name

whitespace

Doc String !AttrStyle !Bool

doc comment with its contents, whether it is outer/inner, and whether it is inline or not

Shebang

#! shebang token

Eof

end of file token

Interpolated (Nonterminal Span)

can be expanded into several tokens in macro-expansion

Instances

Eq Token Source # 

Methods

(==) :: Token -> Token -> Bool #

(/=) :: Token -> Token -> Bool #

Data Token Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Token -> c Token #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Token #

toConstr :: Token -> Constr #

dataTypeOf :: Token -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Token) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Token) #

gmapT :: (forall b. Data b => b -> b) -> Token -> Token #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Token -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Token -> r #

gmapQ :: (forall d. Data d => d -> u) -> Token -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Token -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Token -> m Token #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Token -> m Token #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Token -> m Token #

Ord Token Source # 

Methods

compare :: Token -> Token -> Ordering #

(<) :: Token -> Token -> Bool #

(<=) :: Token -> Token -> Bool #

(>) :: Token -> Token -> Bool #

(>=) :: Token -> Token -> Bool #

max :: Token -> Token -> Token #

min :: Token -> Token -> Token #

Show Token Source #

This instance is only for error messages and debugging purposes.

Methods

showsPrec :: Int -> Token -> ShowS #

show :: Token -> String #

showList :: [Token] -> ShowS #

Generic Token Source # 

Associated Types

type Rep Token :: * -> * #

Methods

from :: Token -> Rep Token x #

to :: Rep Token x -> Token #

NFData Token Source # 

Methods

rnf :: Token -> () #

Pretty Token Source # 
type Rep Token Source # 
type Rep Token = D1 (MetaData "Token" "Language.Rust.Syntax.Token" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "Equal" PrefixI False) U1) ((:+:) (C1 (MetaCons "Less" PrefixI False) U1) (C1 (MetaCons "Greater" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "Ampersand" PrefixI False) U1) (C1 (MetaCons "Pipe" PrefixI False) U1)) ((:+:) (C1 (MetaCons "Exclamation" PrefixI False) U1) (C1 (MetaCons "Tilde" PrefixI False) U1)))) ((:+:) ((:+:) (C1 (MetaCons "Plus" PrefixI False) U1) ((:+:) (C1 (MetaCons "Minus" PrefixI False) U1) (C1 (MetaCons "Star" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "Slash" PrefixI False) U1) (C1 (MetaCons "Percent" PrefixI False) U1)) ((:+:) (C1 (MetaCons "Caret" PrefixI False) U1) (C1 (MetaCons "GreaterEqual" PrefixI False) U1))))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "GreaterGreaterEqual" PrefixI False) U1) ((:+:) (C1 (MetaCons "AmpersandAmpersand" PrefixI False) U1) (C1 (MetaCons "PipePipe" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "LessLess" PrefixI False) U1) (C1 (MetaCons "GreaterGreater" PrefixI False) U1)) ((:+:) (C1 (MetaCons "EqualEqual" PrefixI False) U1) (C1 (MetaCons "NotEqual" PrefixI False) U1)))) ((:+:) ((:+:) (C1 (MetaCons "LessEqual" PrefixI False) U1) ((:+:) (C1 (MetaCons "LessLessEqual" PrefixI False) U1) (C1 (MetaCons "MinusEqual" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "AmpersandEqual" PrefixI False) U1) (C1 (MetaCons "PipeEqual" PrefixI False) U1)) ((:+:) (C1 (MetaCons "PlusEqual" PrefixI False) U1) (C1 (MetaCons "StarEqual" PrefixI False) U1)))))) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "SlashEqual" PrefixI False) U1) ((:+:) (C1 (MetaCons "CaretEqual" PrefixI False) U1) (C1 (MetaCons "PercentEqual" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "At" PrefixI False) U1) (C1 (MetaCons "Dot" PrefixI False) U1)) ((:+:) (C1 (MetaCons "DotDot" PrefixI False) U1) (C1 (MetaCons "DotDotEqual" PrefixI False) U1)))) ((:+:) ((:+:) (C1 (MetaCons "DotDotDot" PrefixI False) U1) ((:+:) (C1 (MetaCons "Comma" PrefixI False) U1) (C1 (MetaCons "Semicolon" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "Colon" PrefixI False) U1) (C1 (MetaCons "ModSep" PrefixI False) U1)) ((:+:) (C1 (MetaCons "RArrow" PrefixI False) U1) (C1 (MetaCons "LArrow" PrefixI False) U1))))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "FatArrow" PrefixI False) U1) ((:+:) (C1 (MetaCons "Pound" PrefixI False) U1) (C1 (MetaCons "Dollar" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "Question" PrefixI False) U1) (C1 (MetaCons "OpenDelim" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Delim)))) ((:+:) (C1 (MetaCons "CloseDelim" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Delim))) (C1 (MetaCons "LiteralTok" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 LitTok)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Name)))))))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "IdentTok" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) (C1 (MetaCons "Underscore" PrefixI False) U1)) ((:+:) (C1 (MetaCons "LifetimeTok" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) (C1 (MetaCons "Space" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Space)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Name)))))) ((:+:) ((:+:) (C1 (MetaCons "Doc" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 AttrStyle)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Bool))))) (C1 (MetaCons "Shebang" PrefixI False) U1)) ((:+:) (C1 (MetaCons "Eof" PrefixI False) U1) (C1 (MetaCons "Interpolated" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Nonterminal Span))))))))))

spaceNeeded :: Token -> Token -> Bool Source #

Check whether a space is needed between two tokens to avoid confusion

data Space Source #

Rust is whitespace independent. Short of providing space between tokens, whitespace is all the same to the parser.

Constructors

Whitespace

usual white space: [\ \t\n\f\v\r]+

Comment

comment (either inline or not)

Instances

Bounded Space Source # 
Enum Space Source # 
Eq Space Source # 

Methods

(==) :: Space -> Space -> Bool #

(/=) :: Space -> Space -> Bool #

Data Space Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Space -> c Space #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Space #

toConstr :: Space -> Constr #

dataTypeOf :: Space -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Space) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Space) #

gmapT :: (forall b. Data b => b -> b) -> Space -> Space #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Space -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Space -> r #

gmapQ :: (forall d. Data d => d -> u) -> Space -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Space -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Space -> m Space #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Space -> m Space #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Space -> m Space #

Ord Space Source # 

Methods

compare :: Space -> Space -> Ordering #

(<) :: Space -> Space -> Bool #

(<=) :: Space -> Space -> Bool #

(>) :: Space -> Space -> Bool #

(>=) :: Space -> Space -> Bool #

max :: Space -> Space -> Space #

min :: Space -> Space -> Space #

Show Space Source # 

Methods

showsPrec :: Int -> Space -> ShowS #

show :: Space -> String #

showList :: [Space] -> ShowS #

Generic Space Source # 

Associated Types

type Rep Space :: * -> * #

Methods

from :: Space -> Rep Space x #

to :: Rep Space x -> Space #

NFData Space Source # 

Methods

rnf :: Space -> () #

type Rep Space Source # 
type Rep Space = D1 (MetaData "Space" "Language.Rust.Syntax.Token" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) (C1 (MetaCons "Whitespace" PrefixI False) U1) (C1 (MetaCons "Comment" PrefixI False) U1))

data Delim Source #

A delimiter token (syntax::parse::token::DelimToken)

Constructors

Paren

round parenthesis: ( or )

Bracket

square bracket: [ or ]

Brace

curly brace: { or }

NoDelim

empty delimiter

Instances

Bounded Delim Source # 
Enum Delim Source # 
Eq Delim Source # 

Methods

(==) :: Delim -> Delim -> Bool #

(/=) :: Delim -> Delim -> Bool #

Data Delim Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Delim -> c Delim #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Delim #

toConstr :: Delim -> Constr #

dataTypeOf :: Delim -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Delim) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Delim) #

gmapT :: (forall b. Data b => b -> b) -> Delim -> Delim #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Delim -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Delim -> r #

gmapQ :: (forall d. Data d => d -> u) -> Delim -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Delim -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Delim -> m Delim #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Delim -> m Delim #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Delim -> m Delim #

Ord Delim Source # 

Methods

compare :: Delim -> Delim -> Ordering #

(<) :: Delim -> Delim -> Bool #

(<=) :: Delim -> Delim -> Bool #

(>) :: Delim -> Delim -> Bool #

(>=) :: Delim -> Delim -> Bool #

max :: Delim -> Delim -> Delim #

min :: Delim -> Delim -> Delim #

Show Delim Source # 

Methods

showsPrec :: Int -> Delim -> ShowS #

show :: Delim -> String #

showList :: [Delim] -> ShowS #

Generic Delim Source # 

Associated Types

type Rep Delim :: * -> * #

Methods

from :: Delim -> Rep Delim x #

to :: Rep Delim x -> Delim #

NFData Delim Source # 

Methods

rnf :: Delim -> () #

type Rep Delim Source # 
type Rep Delim = D1 (MetaData "Delim" "Language.Rust.Syntax.Token" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) ((:+:) (C1 (MetaCons "Paren" PrefixI False) U1) (C1 (MetaCons "Bracket" PrefixI False) U1)) ((:+:) (C1 (MetaCons "Brace" PrefixI False) U1) (C1 (MetaCons "NoDelim" PrefixI False) U1)))

data LitTok Source #

A literal token (syntax::parse::token::Lit)

Constructors

ByteTok Name

byte

CharTok Name

character

IntegerTok Name

integral literal (could have type i32, int, u128, etc.)

FloatTok Name

floating point literal (could have type f32, f64, etc.)

StrTok Name

string literal

StrRawTok Name !Int

raw string literal and the number of # marks around it

ByteStrTok Name

byte string literal

ByteStrRawTok Name !Int

raw byte string literal and the number of # marks around it

Instances

Eq LitTok Source # 

Methods

(==) :: LitTok -> LitTok -> Bool #

(/=) :: LitTok -> LitTok -> Bool #

Data LitTok Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LitTok -> c LitTok #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LitTok #

toConstr :: LitTok -> Constr #

dataTypeOf :: LitTok -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c LitTok) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LitTok) #

gmapT :: (forall b. Data b => b -> b) -> LitTok -> LitTok #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LitTok -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LitTok -> r #

gmapQ :: (forall d. Data d => d -> u) -> LitTok -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LitTok -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LitTok -> m LitTok #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LitTok -> m LitTok #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LitTok -> m LitTok #

Ord LitTok Source # 
Show LitTok Source # 
Generic LitTok Source # 

Associated Types

type Rep LitTok :: * -> * #

Methods

from :: LitTok -> Rep LitTok x #

to :: Rep LitTok x -> LitTok #

NFData LitTok Source # 

Methods

rnf :: LitTok -> () #

Pretty LitTok Source # 
type Rep LitTok Source # 

data AttrStyle Source #

Distinguishes between attributes that decorate what follows them and attributes that are describe the node that contains them (syntax::ast::AttrStyle). 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 one

Constructors

Outer 
Inner 

Instances

Bounded AttrStyle Source # 
Enum AttrStyle Source # 
Eq AttrStyle Source # 
Data AttrStyle Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AttrStyle -> c AttrStyle #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AttrStyle #

toConstr :: AttrStyle -> Constr #

dataTypeOf :: AttrStyle -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c AttrStyle) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AttrStyle) #

gmapT :: (forall b. Data b => b -> b) -> AttrStyle -> AttrStyle #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AttrStyle -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AttrStyle -> r #

gmapQ :: (forall d. Data d => d -> u) -> AttrStyle -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> AttrStyle -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> AttrStyle -> m AttrStyle #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AttrStyle -> m AttrStyle #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AttrStyle -> m AttrStyle #

Ord AttrStyle Source # 
Show AttrStyle Source # 
Generic AttrStyle Source # 

Associated Types

type Rep AttrStyle :: * -> * #

NFData AttrStyle Source # 

Methods

rnf :: AttrStyle -> () #

type Rep AttrStyle Source # 
type Rep AttrStyle = D1 (MetaData "AttrStyle" "Language.Rust.Syntax.AST" "language-rust-0.1.0.0-1eCZRQHreljBZIFWrl4lEQ" False) ((:+:) (C1 (MetaCons "Outer" PrefixI False) U1) (C1 (MetaCons "Inner" PrefixI False) U1))