flp-0.1.0.0: A layout spec language for memory managers implemented in Rust.

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

Language.Rust.Syntax.AST

Contents

Description

 
Synopsis

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated SourceFile Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (SourceFile a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (SourceFile a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show a => Show (SourceFile a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic (SourceFile a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

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

Methods

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

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

NFData a => NFData (SourceFile a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: SourceFile a -> () #

(Typeable a, Monoid a) => Resolve (SourceFile a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Pretty (SourceFile a) Source # 
Instance details

Defined in Language.Rust.Pretty

Parse (SourceFile Span) Source # 
Instance details

Defined in Language.Rust.Parser

Generic1 SourceFile Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 SourceFile :: k -> Type #

type Rep (SourceFile a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 SourceFile Source # 
Instance details

Defined in Language.Rust.Syntax.AST

General

data Mutability Source #

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

Constructors

Mutable 
Immutable 
Instances
Bounded Mutability Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Enum Mutability Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Eq Mutability Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Data Mutability Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show Mutability Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic Mutability Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep Mutability :: Type -> Type #

NFData Mutability Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: Mutability -> () #

Pretty Mutability Source # 
Instance details

Defined in Language.Rust.Pretty

type Rep Mutability Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep Mutability = D1 (MetaData "Mutability" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (C1 (MetaCons "Mutable" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Immutable" PrefixI False) (U1 :: Type -> Type))

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Enum Unsafety Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Eq Unsafety Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Data Unsafety Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show Unsafety Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic Unsafety Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep Unsafety :: Type -> Type #

Methods

from :: Unsafety -> Rep Unsafety x #

to :: Rep Unsafety x -> Unsafety #

NFData Unsafety Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: Unsafety -> () #

Pretty Unsafety Source # 
Instance details

Defined in Language.Rust.Pretty

type Rep Unsafety Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep Unsafety = D1 (MetaData "Unsafety" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (C1 (MetaCons "Unsafe" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Normal" PrefixI False) (U1 :: Type -> Type))

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Eq a => Eq (Arg a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (Arg a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

show :: Arg a -> String #

showList :: [Arg a] -> ShowS #

Generic (Arg a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

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

Methods

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

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

NFData a => NFData (Arg a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: Arg a -> () #

Located a => Located (Arg a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: Arg a -> Span Source #

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

Defined in Language.Rust.Pretty.Resolve

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)

Generic1 Arg Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 Arg :: k -> Type #

Methods

from1 :: Arg a -> Rep1 Arg a #

to1 :: Rep1 Arg a -> Arg a #

type Rep (Arg a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 Arg Source # 
Instance details

Defined in Language.Rust.Syntax.AST

data FnDecl a Source #

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

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated FnDecl Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (FnDecl a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (FnDecl a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

show :: FnDecl a -> String #

showList :: [FnDecl a] -> ShowS #

Generic (FnDecl a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

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

Methods

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

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

NFData a => NFData (FnDecl a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: FnDecl a -> () #

Located a => Located (FnDecl a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: FnDecl a -> Span Source #

(Typeable a, Monoid a) => Resolve (FnDecl a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Pretty (FnDecl a) Source # 
Instance details

Defined in Language.Rust.Pretty

Generic1 FnDecl Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 FnDecl :: k -> Type #

Methods

from1 :: FnDecl a -> Rep1 FnDecl a #

to1 :: Rep1 FnDecl a -> FnDecl a #

type Rep (FnDecl a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 FnDecl Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 Lit argument identifies whether the path is relative or absolute.

Example: std::cmp::PartialEq

Constructors

Path Bool [PathSegment a] a 
Instances
Functor Path Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated Path Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (Path a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (Path a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

show :: Path a -> String #

showList :: [Path a] -> ShowS #

Generic (Path a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

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

Methods

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

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

NFData a => NFData (Path a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: Path a -> () #

Located a => Located (Path a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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.

Instance details

Defined in Language.Rust.Pretty.Resolve

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 # 
Instance details

Defined in Language.Rust.Pretty

Methods

prettyUnresolved :: Path a -> Doc b Source #

Generic1 Path Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 Path :: k -> Type #

Methods

from1 :: Path a -> Rep1 Path a #

to1 :: Rep1 Path a -> Path a #

type Rep (Path a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 Path Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Eq a => Eq (PathParameters a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Data a => Data (PathParameters a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show a => Show (PathParameters a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic (PathParameters a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

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

NFData a => NFData (PathParameters a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: PathParameters a -> () #

Located a => Located (PathParameters a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

(Typeable a, Monoid a) => Resolve (PathParameters a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Generic1 PathParameters Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 PathParameters :: k -> Type #

type Rep (PathParameters a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 PathParameters Source # 
Instance details

Defined in Language.Rust.Syntax.AST

data PathSegment a Source #

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

Constructors

PathSegment Ident (Maybe (PathParameters a)) a 
Instances
Functor PathSegment Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Eq a => Eq (PathSegment a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Data a => Data (PathSegment a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show a => Show (PathSegment a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic (PathSegment a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

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

Methods

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

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

NFData a => NFData (PathSegment a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: PathSegment a -> () #

Located a => Located (PathSegment a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: PathSegment a -> Span Source #

Generic1 PathSegment Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 PathSegment :: k -> Type #

type Rep (PathSegment a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 PathSegment Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Eq a => Eq (QSelf a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (QSelf a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

show :: QSelf a -> String #

showList :: [QSelf a] -> ShowS #

Generic (QSelf a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

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

Methods

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

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

NFData a => NFData (QSelf a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: QSelf a -> () #

(Typeable a, Monoid a) => Resolve (QSelf a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Generic1 QSelf Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 QSelf :: k -> Type #

Methods

from1 :: QSelf a -> Rep1 QSelf a #

to1 :: Rep1 QSelf a -> QSelf a #

type Rep (QSelf a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep (QSelf a) = D1 (MetaData "QSelf" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (C1 (MetaCons "QSelf" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ty a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)))
type Rep1 QSelf Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 Lit argument identifies if the comment is inline or not, and the Name contains the actual doc comment content.

Instances
Functor Attribute Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated Attribute Source #

This instance prints attributes inline

Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (Attribute a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (Attribute a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show a => Show (Attribute a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic (Attribute a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

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

Methods

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

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

NFData a => NFData (Attribute a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: Attribute a -> () #

Located a => Located (Attribute a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: Attribute a -> Span Source #

(Typeable a, Monoid a) => Resolve (Attribute a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Pretty (Attribute a) Source # 
Instance details

Defined in Language.Rust.Pretty

Parse (Attribute Span) Source # 
Instance details

Defined in Language.Rust.Parser

Generic1 Attribute Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 Attribute :: k -> Type #

type Rep (Attribute a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 Attribute Source # 
Instance details

Defined in Language.Rust.Syntax.AST

data AttrStyle Source #

Distinguishes between attributes that are associated with the node that follows them and attributes that are associated with 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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Enum AttrStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Eq AttrStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Data AttrStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show AttrStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic AttrStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep AttrStyle :: Type -> Type #

NFData AttrStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: AttrStyle -> () #

type Rep AttrStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep AttrStyle = D1 (MetaData "AttrStyle" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (C1 (MetaCons "Outer" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Inner" PrefixI False) (U1 :: Type -> Type))

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 Lit and Lit 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 String Suffix a

integer (example: 1i32)

Float Double Suffix a

float (example: 1.12e4)

Bool Bool Suffix a

boolean (example: true)

Instances
Functor Lit Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated Lit Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (Lit a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (Lit a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

show :: Lit a -> String #

showList :: [Lit a] -> ShowS #

Generic (Lit a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

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

Methods

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

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

NFData a => NFData (Lit a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: Lit a -> () #

Located a => Located (Lit a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: Lit a -> Span Source #

Resolve (Lit a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

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 # 
Instance details

Defined in Language.Rust.Pretty

Methods

prettyUnresolved :: Lit a -> Doc b Source #

Parse (Lit Span) Source # 
Instance details

Defined in Language.Rust.Parser

Methods

parser :: P (Lit Span) Source #

Generic1 Lit Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 Lit :: k -> Type #

Methods

from1 :: Lit a -> Rep1 Lit a #

to1 :: Rep1 Lit a -> Lit a #

type Rep (Lit a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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

Defined in Language.Rust.Syntax.AST

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

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Enum Suffix Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Eq Suffix Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data Suffix Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show Suffix Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic Suffix Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep Suffix :: Type -> Type #

Methods

from :: Suffix -> Rep Suffix x #

to :: Rep Suffix x -> Suffix #

NFData Suffix Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: Suffix -> () #

Pretty Suffix Source # 
Instance details

Defined in Language.Rust.Pretty

type Rep Suffix Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep Suffix = D1 (MetaData "Suffix" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (((C1 (MetaCons "Unsuffixed" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "Is" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "I8" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "I16" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "I32" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "I64" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "I128" PrefixI False) (U1 :: Type -> Type)))) :+: (((C1 (MetaCons "Us" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "U8" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "U16" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "U32" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "U64" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "U128" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "F32" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "F64" PrefixI False) (U1 :: Type -> Type)))))

suffix :: Lit a -> Suffix Source #

Extract the suffix from a Expr.

data IntRep Source #

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

Constructors

Bin 
Oct 
Dec 
Hex 
Instances
Bounded IntRep Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Enum IntRep Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Eq IntRep Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data IntRep Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show IntRep Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic IntRep Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep IntRep :: Type -> Type #

Methods

from :: IntRep -> Rep IntRep x #

to :: Rep IntRep x -> IntRep #

NFData IntRep Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: IntRep -> () #

type Rep IntRep Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep IntRep = D1 (MetaData "IntRep" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) ((C1 (MetaCons "Bin" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Oct" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "Dec" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Hex" PrefixI False) (U1 :: Type -> Type)))

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Data StrStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show StrStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic StrStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep StrStyle :: Type -> Type #

Methods

from :: StrStyle -> Rep StrStyle x #

to :: Rep StrStyle x -> StrStyle #

NFData StrStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: StrStyle -> () #

type Rep StrStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep StrStyle = D1 (MetaData "StrStyle" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (C1 (MetaCons "Cooked" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Raw" PrefixI False) (S1 (MetaSel (Nothing :: Maybe 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

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

EmbeddedExpr [Attribute a] String a

embedded Haskell expressions for use by quasiquoters

Instances
Functor Expr Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated Expr Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (Expr a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (Expr a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

show :: Expr a -> String #

showList :: [Expr a] -> ShowS #

Generic (Expr a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

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

Methods

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

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

NFData a => NFData (Expr a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: Expr a -> () #

Located a => Located (Expr a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: Expr a -> Span Source #

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

Defined in Language.Rust.Pretty.Resolve

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 # 
Instance details

Defined in Language.Rust.Pretty

Methods

prettyUnresolved :: Expr a -> Doc b Source #

Parse (Expr Span) Source # 
Instance details

Defined in Language.Rust.Parser

Methods

parser :: P (Expr Span) Source #

Generic1 Expr Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 Expr :: k -> Type #

Methods

from1 :: Expr a -> Rep1 Expr a #

to1 :: Rep1 Expr a -> Expr a #

type Rep (Expr a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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

Defined in Language.Rust.Syntax.AST

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

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

minBound :: Abi #

maxBound :: Abi #

Enum Abi Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data Abi Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show Abi Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

showsPrec :: Int -> Abi -> ShowS #

show :: Abi -> String #

showList :: [Abi] -> ShowS #

Generic Abi Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep Abi :: Type -> Type #

Methods

from :: Abi -> Rep Abi x #

to :: Rep Abi x -> Abi #

NFData Abi Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: Abi -> () #

Pretty Abi Source # 
Instance details

Defined in Language.Rust.Pretty

type Rep Abi Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep Abi = D1 (MetaData "Abi" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) ((((C1 (MetaCons "Cdecl" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Stdcall" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "Fastcall" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Vectorcall" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "Aapcs" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Win64" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "SysV64" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "PtxKernel" PrefixI False) (U1 :: Type -> Type)))) :+: (((C1 (MetaCons "Msp430Interrupt" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "X86Interrupt" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "Rust" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "C" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "System" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "RustIntrinsic" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "RustCall" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "PlatformIntrinsic" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Unadjusted" PrefixI False) (U1 :: Type -> Type))))))

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Eq a => Eq (Arm a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (Arm a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

show :: Arm a -> String #

showList :: [Arm a] -> ShowS #

Generic (Arm a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

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

Methods

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

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

NFData a => NFData (Arm a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: Arm a -> () #

Located a => Located (Arm a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: Arm a -> Span Source #

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

Defined in Language.Rust.Pretty.Resolve

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)

Generic1 Arm Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 Arm :: k -> Type #

Methods

from1 :: Arm a -> Rep1 Arm a #

to1 :: Rep1 Arm a -> Arm a #

type Rep (Arm a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 Arm Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Enum UnOp Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data UnOp Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

showsPrec :: Int -> UnOp -> ShowS #

show :: UnOp -> String #

showList :: [UnOp] -> ShowS #

Generic UnOp Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep UnOp :: Type -> Type #

Methods

from :: UnOp -> Rep UnOp x #

to :: Rep UnOp x -> UnOp #

NFData UnOp Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: UnOp -> () #

Pretty UnOp Source # 
Instance details

Defined in Language.Rust.Pretty

type Rep UnOp Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep UnOp = D1 (MetaData "UnOp" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (C1 (MetaCons "Deref" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "Not" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Neg" PrefixI False) (U1 :: Type -> Type)))

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Enum BinOp Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Eq BinOp Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data BinOp Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

showsPrec :: Int -> BinOp -> ShowS #

show :: BinOp -> String #

showList :: [BinOp] -> ShowS #

Generic BinOp Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep BinOp :: Type -> Type #

Methods

from :: BinOp -> Rep BinOp x #

to :: Rep BinOp x -> BinOp #

NFData BinOp Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: BinOp -> () #

Pretty BinOp Source # 
Instance details

Defined in Language.Rust.Pretty

type Rep BinOp Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep BinOp = D1 (MetaData "BinOp" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) ((((C1 (MetaCons "AddOp" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "SubOp" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "MulOp" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "DivOp" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "RemOp" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "AndOp" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "OrOp" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "BitXorOp" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "BitAndOp" PrefixI False) (U1 :: Type -> Type))))) :+: (((C1 (MetaCons "BitOrOp" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ShlOp" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "ShrOp" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "EqOp" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "LtOp" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "LeOp" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "NeOp" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "GeOp" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "GtOp" PrefixI False) (U1 :: Type -> Type))))))

data Label a Source #

Used to annotate loops, breaks, continues, etc.

Constructors

Label Name a 
Instances
Functor Label Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Eq a => Eq (Label a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (Label a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

show :: Label a -> String #

showList :: [Label a] -> ShowS #

Generic (Label a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

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

Methods

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

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

NFData a => NFData (Label a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: Label a -> () #

Located a => Located (Label a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: Label a -> Span Source #

Generic1 Label Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 Label :: k -> Type #

Methods

from1 :: Label a -> Rep1 Label a #

to1 :: Rep1 Label a -> Label a #

type Rep (Label a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep (Label a) = D1 (MetaData "Label" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (C1 (MetaCons "Label" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Name) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))
type Rep1 Label Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Enum CaptureBy Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Eq CaptureBy Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Data CaptureBy Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show CaptureBy Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic CaptureBy Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep CaptureBy :: Type -> Type #

NFData CaptureBy Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: CaptureBy -> () #

type Rep CaptureBy Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep CaptureBy = D1 (MetaData "CaptureBy" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (C1 (MetaCons "Value" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Ref" PrefixI False) (U1 :: Type -> Type))

data Movability Source #

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

Constructors

Immovable 
Movable 
Instances
Bounded Movability Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Enum Movability Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Eq Movability Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Data Movability Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show Movability Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic Movability Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep Movability :: Type -> Type #

NFData Movability Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: Movability -> () #

type Rep Movability Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep Movability = D1 (MetaData "Movability" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (C1 (MetaCons "Immovable" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Movable" PrefixI False) (U1 :: Type -> Type))

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated Field Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (Field a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (Field a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

show :: Field a -> String #

showList :: [Field a] -> ShowS #

Generic (Field a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

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

Methods

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

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

NFData a => NFData (Field a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: Field a -> () #

Located a => Located (Field a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: Field a -> Span Source #

(Typeable a, Monoid a) => Resolve (Field a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Pretty (Field a) Source # 
Instance details

Defined in Language.Rust.Pretty

Methods

prettyUnresolved :: Field a -> Doc b Source #

Generic1 Field Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 Field :: k -> Type #

Methods

from1 :: Field a -> Rep1 Field a #

to1 :: Rep1 Field a -> Field a #

type Rep (Field a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 Field Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Enum RangeLimits Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Eq RangeLimits Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Data RangeLimits Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show RangeLimits Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic RangeLimits Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep RangeLimits :: Type -> Type #

NFData RangeLimits Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: RangeLimits -> () #

Pretty RangeLimits Source # 
Instance details

Defined in Language.Rust.Pretty

type Rep RangeLimits Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep RangeLimits = D1 (MetaData "RangeLimits" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (C1 (MetaCons "HalfOpen" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Closed" PrefixI False) (U1 :: Type -> Type))

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated Ty Source # 
Instance details

Defined in Language.Rust.Pretty

Methods

prettyAnnUnresolved :: Ty a -> Doc a Source #

Eq a => Eq (Ty a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (Ty a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

show :: Ty a -> String #

showList :: [Ty a] -> ShowS #

Generic (Ty a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

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

Methods

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

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

NFData a => NFData (Ty a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: Ty a -> () #

Located a => Located (Ty a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: Ty a -> Span Source #

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

Defined in Language.Rust.Pretty.Resolve

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 # 
Instance details

Defined in Language.Rust.Pretty

Methods

prettyUnresolved :: Ty a -> Doc b Source #

Parse (Ty Span) Source # 
Instance details

Defined in Language.Rust.Parser

Methods

parser :: P (Ty Span) Source #

Generic1 Ty Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 Ty :: k -> Type #

Methods

from1 :: Ty a -> Rep1 Ty a #

to1 :: Rep1 Ty a -> Ty a #

type Rep (Ty a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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

Defined in Language.Rust.Syntax.AST

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

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 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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated Generics Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (Generics a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (Generics a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

show :: Generics a -> String #

showList :: [Generics a] -> ShowS #

Generic (Generics a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

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

Methods

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

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

Semigroup a => Semigroup (Generics a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

sconcat :: NonEmpty (Generics a) -> Generics a #

stimes :: Integral b => b -> Generics a -> Generics a #

(Semigroup a, Monoid a) => Monoid (Generics a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

mempty :: Generics a #

mappend :: Generics a -> Generics a -> Generics a #

mconcat :: [Generics a] -> Generics a #

NFData a => NFData (Generics a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: Generics a -> () #

Located a => Located (Generics a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: Generics a -> Span Source #

(Typeable a, Monoid a) => Resolve (Generics a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Pretty (Generics a) Source # 
Instance details

Defined in Language.Rust.Pretty

Parse (Generics Span) Source # 
Instance details

Defined in Language.Rust.Parser

Generic1 Generics Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 Generics :: k -> Type #

Methods

from1 :: Generics a -> Rep1 Generics a #

to1 :: Rep1 Generics a -> Generics a #

type Rep (Generics a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 Generics Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated Lifetime Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (Lifetime a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (Lifetime a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

show :: Lifetime a -> String #

showList :: [Lifetime a] -> ShowS #

Generic (Lifetime a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

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

Methods

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

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

NFData a => NFData (Lifetime a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: Lifetime a -> () #

Located a => Located (Lifetime a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: Lifetime a -> Span Source #

Typeable a => Resolve (Lifetime a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Pretty (Lifetime a) Source # 
Instance details

Defined in Language.Rust.Pretty

Generic1 Lifetime Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 Lifetime :: k -> Type #

Methods

from1 :: Lifetime a -> Rep1 Lifetime a #

to1 :: Rep1 Lifetime a -> Lifetime a #

type Rep (Lifetime a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep (Lifetime a) = D1 (MetaData "Lifetime" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (C1 (MetaCons "Lifetime" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Name) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))
type Rep1 Lifetime Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 Lifetime = D1 (MetaData "Lifetime" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (C1 (MetaCons "Lifetime" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Name) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated LifetimeDef Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (LifetimeDef a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Data a => Data (LifetimeDef a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show a => Show (LifetimeDef a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic (LifetimeDef a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep (LifetimeDef a) :: Type -> Type #

Methods

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

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

NFData a => NFData (LifetimeDef a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: LifetimeDef a -> () #

Located a => Located (LifetimeDef a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: LifetimeDef a -> Span Source #

(Typeable a, Monoid a) => Resolve (LifetimeDef a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Pretty (LifetimeDef a) Source # 
Instance details

Defined in Language.Rust.Pretty

Parse (LifetimeDef Span) Source # 
Instance details

Defined in Language.Rust.Parser

Generic1 LifetimeDef Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 LifetimeDef :: k -> Type #

type Rep (LifetimeDef a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 LifetimeDef Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated TyParam Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (TyParam a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (TyParam a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

show :: TyParam a -> String #

showList :: [TyParam a] -> ShowS #

Generic (TyParam a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep (TyParam a) :: Type -> Type #

Methods

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

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

NFData a => NFData (TyParam a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: TyParam a -> () #

Located a => Located (TyParam a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: TyParam a -> Span Source #

(Typeable a, Monoid a) => Resolve (TyParam a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Pretty (TyParam a) Source # 
Instance details

Defined in Language.Rust.Pretty

Parse (TyParam Span) Source # 
Instance details

Defined in Language.Rust.Parser

Methods

parser :: P (TyParam Span) Source #

Generic1 TyParam Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 TyParam :: k -> Type #

Methods

from1 :: TyParam a -> Rep1 TyParam a #

to1 :: Rep1 TyParam a -> TyParam a #

type Rep (TyParam a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 TyParam Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated TyParamBound Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (TyParamBound a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Data a => Data (TyParamBound a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show a => Show (TyParamBound a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic (TyParamBound a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep (TyParamBound a) :: Type -> Type #

Methods

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

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

NFData a => NFData (TyParamBound a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: TyParamBound a -> () #

Located a => Located (TyParamBound a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

(Typeable a, Monoid a) => Resolve (TyParamBound a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Pretty (TyParamBound a) Source # 
Instance details

Defined in Language.Rust.Pretty

Generic1 TyParamBound Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 TyParamBound :: k -> Type #

type Rep (TyParamBound a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 TyParamBound Source # 
Instance details

Defined in Language.Rust.Syntax.AST

partitionTyParamBounds :: [TyParamBound a] -> ([TyParamBound a], [TyParamBound a]) Source #

Partition 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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated WhereClause Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (WhereClause a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Data a => Data (WhereClause a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show a => Show (WhereClause a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic (WhereClause a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep (WhereClause a) :: Type -> Type #

Methods

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

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

Semigroup a => Semigroup (WhereClause a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

(Semigroup a, Monoid a) => Monoid (WhereClause a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

NFData a => NFData (WhereClause a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: WhereClause a -> () #

Located a => Located (WhereClause a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: WhereClause a -> Span Source #

(Typeable a, Monoid a) => Resolve (WhereClause a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Pretty (WhereClause a) Source # 
Instance details

Defined in Language.Rust.Pretty

Parse (WhereClause Span) Source # 
Instance details

Defined in Language.Rust.Parser

Generic1 WhereClause Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 WhereClause :: k -> Type #

type Rep (WhereClause a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep (WhereClause a) = D1 (MetaData "WhereClause" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (C1 (MetaCons "WhereClause" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [WherePredicate a]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))
type Rep1 WhereClause Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 WhereClause = D1 (MetaData "WhereClause" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (C1 (MetaCons "WhereClause" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 WherePredicate) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated WherePredicate Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (WherePredicate a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Data a => Data (WherePredicate a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show a => Show (WherePredicate a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic (WherePredicate a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep (WherePredicate a) :: Type -> Type #

NFData a => NFData (WherePredicate a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: WherePredicate a -> () #

Located a => Located (WherePredicate a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

(Typeable a, Monoid a) => Resolve (WherePredicate a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Pretty (WherePredicate a) Source # 
Instance details

Defined in Language.Rust.Pretty

Generic1 WherePredicate Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 WherePredicate :: k -> Type #

type Rep (WherePredicate a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 WherePredicate Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated PolyTraitRef Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (PolyTraitRef a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Data a => Data (PolyTraitRef a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show a => Show (PolyTraitRef a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic (PolyTraitRef a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep (PolyTraitRef a) :: Type -> Type #

Methods

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

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

NFData a => NFData (PolyTraitRef a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: PolyTraitRef a -> () #

Located a => Located (PolyTraitRef a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

(Typeable a, Monoid a) => Resolve (PolyTraitRef a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Pretty (PolyTraitRef a) Source # 
Instance details

Defined in Language.Rust.Pretty

Generic1 PolyTraitRef Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 PolyTraitRef :: k -> Type #

type Rep (PolyTraitRef a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 PolyTraitRef Source # 
Instance details

Defined in Language.Rust.Syntax.AST

newtype TraitRef a Source #

A TraitRef is a path which identifies a trait (syntax::ast::TraitRef).

Constructors

TraitRef (Path a) 
Instances
Functor TraitRef Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated TraitRef Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (TraitRef a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (TraitRef a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

show :: TraitRef a -> String #

showList :: [TraitRef a] -> ShowS #

Generic (TraitRef a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep (TraitRef a) :: Type -> Type #

Methods

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

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

NFData a => NFData (TraitRef a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: TraitRef a -> () #

Located a => Located (TraitRef a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: TraitRef a -> Span Source #

(Typeable a, Monoid a) => Resolve (TraitRef a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Pretty (TraitRef a) Source # 
Instance details

Defined in Language.Rust.Pretty

Generic1 TraitRef Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 TraitRef :: k -> Type #

Methods

from1 :: TraitRef a -> Rep1 TraitRef a #

to1 :: Rep1 TraitRef a -> TraitRef a #

type Rep (TraitRef a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep (TraitRef a) = D1 (MetaData "TraitRef" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" True) (C1 (MetaCons "TraitRef" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Path a))))
type Rep1 TraitRef Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 TraitRef = D1 (MetaData "TraitRef" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" True) (C1 (MetaCons "TraitRef" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Path)))

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Enum TraitBoundModifier Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Eq TraitBoundModifier Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Data TraitBoundModifier Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show TraitBoundModifier Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic TraitBoundModifier Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep TraitBoundModifier :: Type -> Type #

NFData TraitBoundModifier Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: TraitBoundModifier -> () #

type Rep TraitBoundModifier Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep TraitBoundModifier = D1 (MetaData "TraitBoundModifier" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (C1 (MetaCons "None" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Maybe" PrefixI False) (U1 :: Type -> Type))

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 Lit 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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated Pat Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (Pat a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (Pat a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

show :: Pat a -> String #

showList :: [Pat a] -> ShowS #

Generic (Pat a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep (Pat a) :: Type -> Type #

Methods

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

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

NFData a => NFData (Pat a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: Pat a -> () #

Located a => Located (Pat a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: Pat a -> Span Source #

(Typeable a, Monoid a) => Resolve (Pat a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

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 # 
Instance details

Defined in Language.Rust.Pretty

Methods

prettyUnresolved :: Pat a -> Doc b Source #

Parse (Pat Span) Source # 
Instance details

Defined in Language.Rust.Parser

Methods

parser :: P (Pat Span) Source #

Generic1 Pat Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 Pat :: k -> Type #

Methods

from1 :: Pat a -> Rep1 Pat a #

to1 :: Rep1 Pat a -> Pat a #

type Rep (Pat a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep (Pat a) = D1 (MetaData "Pat" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (((C1 (MetaCons "WildP" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)) :+: (C1 (MetaCons "IdentP" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 BindingMode) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Pat a))) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))) :+: C1 (MetaCons "StructP" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Path a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [FieldPat a])) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) :+: (C1 (MetaCons "TupleStructP" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Path a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Pat a])) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Int)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))) :+: (C1 (MetaCons "PathP" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (QSelf a))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Path a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))) :+: C1 (MetaCons "TupleP" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Pat a]) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Int)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) :+: ((C1 (MetaCons "BoxP" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Pat a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)) :+: (C1 (MetaCons "RefP" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Pat a)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Mutability) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))) :+: C1 (MetaCons "LitP" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))) :+: (C1 (MetaCons "RangeP" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))) :+: (C1 (MetaCons "SliceP" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Pat a]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Pat a)))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Pat a]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))) :+: C1 (MetaCons "MacP" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Mac a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))))
type Rep1 Pat Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 Pat = D1 (MetaData "Pat" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (((C1 (MetaCons "WildP" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1) :+: (C1 (MetaCons "IdentP" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 BindingMode) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Maybe :.: Rec1 Pat) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)) :+: C1 (MetaCons "StructP" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Path) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 FieldPat)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) :+: (C1 (MetaCons "TupleStructP" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Path) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Pat)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Int)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)) :+: (C1 (MetaCons "PathP" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Maybe :.: Rec1 QSelf) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Path) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)) :+: C1 (MetaCons "TupleP" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Pat) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Int)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) :+: ((C1 (MetaCons "BoxP" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Pat) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1) :+: (C1 (MetaCons "RefP" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Pat) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Mutability) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)) :+: C1 (MetaCons "LitP" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))) :+: (C1 (MetaCons "RangeP" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)) :+: (C1 (MetaCons "SliceP" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Pat) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Maybe :.: Rec1 Pat)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Pat) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)) :+: C1 (MetaCons "MacP" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Mac) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))))

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Data BindingMode Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show BindingMode Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic BindingMode Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep BindingMode :: Type -> Type #

NFData BindingMode Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: BindingMode -> () #

Pretty BindingMode Source # 
Instance details

Defined in Language.Rust.Pretty

type Rep BindingMode Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated FieldPat Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (FieldPat a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (FieldPat a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

show :: FieldPat a -> String #

showList :: [FieldPat a] -> ShowS #

Generic (FieldPat a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep (FieldPat a) :: Type -> Type #

Methods

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

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

NFData a => NFData (FieldPat a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: FieldPat a -> () #

Located a => Located (FieldPat a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: FieldPat a -> Span Source #

(Typeable a, Monoid a) => Resolve (FieldPat a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Pretty (FieldPat a) Source # 
Instance details

Defined in Language.Rust.Pretty

Generic1 FieldPat Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 FieldPat :: k -> Type #

Methods

from1 :: FieldPat a -> Rep1 FieldPat a #

to1 :: Rep1 FieldPat a -> FieldPat a #

type Rep (FieldPat a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 FieldPat Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated Stmt Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (Stmt a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (Stmt a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

show :: Stmt a -> String #

showList :: [Stmt a] -> ShowS #

Generic (Stmt a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep (Stmt a) :: Type -> Type #

Methods

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

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

NFData a => NFData (Stmt a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: Stmt a -> () #

Located a => Located (Stmt a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: Stmt a -> Span Source #

(Typeable a, Monoid a) => Resolve (Stmt a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

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 # 
Instance details

Defined in Language.Rust.Pretty

Methods

prettyUnresolved :: Stmt a -> Doc b Source #

Parse (Stmt Span) Source # 
Instance details

Defined in Language.Rust.Parser

Methods

parser :: P (Stmt Span) Source #

Generic1 Stmt Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 Stmt :: k -> Type #

Methods

from1 :: Stmt a -> Rep1 Stmt a #

to1 :: Rep1 Stmt a -> Stmt a #

type Rep (Stmt a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep (Stmt a) = D1 (MetaData "Stmt" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) ((C1 (MetaCons "Local" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Pat a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Ty a)))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Expr a))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))) :+: C1 (MetaCons "ItemStmt" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Item a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))) :+: (C1 (MetaCons "NoSemi" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)) :+: (C1 (MetaCons "Semi" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)) :+: C1 (MetaCons "MacStmt" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Mac a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 MacStmtStyle)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))))
type Rep1 Stmt Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 Stmt = D1 (MetaData "Stmt" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) ((C1 (MetaCons "Local" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Pat) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Maybe :.: Rec1 Ty)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Maybe :.: Rec1 Expr) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))) :+: C1 (MetaCons "ItemStmt" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Item) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)) :+: (C1 (MetaCons "NoSemi" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1) :+: (C1 (MetaCons "Semi" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1) :+: C1 (MetaCons "MacStmt" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Mac) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 MacStmtStyle)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))))

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated Item Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (Item a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (Item a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

show :: Item a -> String #

showList :: [Item a] -> ShowS #

Generic (Item a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep (Item a) :: Type -> Type #

Methods

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

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

NFData a => NFData (Item a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: Item a -> () #

Located a => Located (Item a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: Item a -> Span Source #

(Typeable a, Monoid a) => Resolve (Item a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

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 # 
Instance details

Defined in Language.Rust.Pretty

Methods

prettyUnresolved :: Item a -> Doc b Source #

Parse (Item Span) Source # 
Instance details

Defined in Language.Rust.Parser

Methods

parser :: P (Item Span) Source #

Generic1 Item Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 Item :: k -> Type #

Methods

from1 :: Item a -> Rep1 Item a #

to1 :: Rep1 Item a -> Item a #

type Rep (Item a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep (Item a) = D1 (MetaData "Item" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) ((((C1 (MetaCons "ExternCrate" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Ident)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))) :+: C1 (MetaCons "Use" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (UseTree a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))) :+: (C1 (MetaCons "Static" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) :*: ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ty a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Mutability)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))) :+: C1 (MetaCons "ConstItem" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ty a)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) :+: ((C1 (MetaCons "Fn" PrefixI False) (((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (FnDecl a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Unsafety)))) :*: ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Constness) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Abi)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Generics a)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Block a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) :+: C1 (MetaCons "Mod" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe [Item a])) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) :+: (C1 (MetaCons "ForeignMod" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Abi) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ForeignItem a]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))) :+: C1 (MetaCons "TyAlias" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ty a)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Generics a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))))) :+: (((C1 (MetaCons "Enum" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Variant a]) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Generics a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))) :+: C1 (MetaCons "StructItem" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (VariantData a)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Generics a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) :+: (C1 (MetaCons "Union" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (VariantData a)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Generics a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))) :+: C1 (MetaCons "Trait" PrefixI False) (((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool))) :*: ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Unsafety) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Generics a))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [TyParamBound a]) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [TraitItem a]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))))) :+: ((C1 (MetaCons "TraitAlias" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Generics a)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (NonEmpty (TyParamBound a))) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))) :+: C1 (MetaCons "Impl" PrefixI False) (((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Defaultness) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Unsafety) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ImplPolarity)))) :*: ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Generics a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (TraitRef a)))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ty a)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ImplItem a]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))) :+: (C1 (MetaCons "MacItem" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Ident))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Mac a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))) :+: C1 (MetaCons "MacroDef" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 TokenStream) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))))
type Rep1 Item Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 Item = D1 (MetaData "Item" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) ((((C1 (MetaCons "ExternCrate" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Ident)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))) :+: C1 (MetaCons "Use" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 UseTree) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))) :+: (C1 (MetaCons "Static" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) :*: ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Ty) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Mutability)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))) :+: C1 (MetaCons "ConstItem" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Ty) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) :+: ((C1 (MetaCons "Fn" PrefixI False) (((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 FnDecl) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Unsafety)))) :*: ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Constness) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Abi)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Generics) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Block) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) :+: C1 (MetaCons "Mod" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Maybe :.: ([] :.: Rec1 Item)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) :+: (C1 (MetaCons "ForeignMod" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Abi) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 ForeignItem) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))) :+: C1 (MetaCons "TyAlias" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Ty) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Generics) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))))) :+: (((C1 (MetaCons "Enum" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Variant) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Generics) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))) :+: C1 (MetaCons "StructItem" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 VariantData) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Generics) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) :+: (C1 (MetaCons "Union" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 VariantData) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Generics) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))) :+: C1 (MetaCons "Trait" PrefixI False) (((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool))) :*: ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Unsafety) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Generics)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 TyParamBound) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 TraitItem) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))))) :+: ((C1 (MetaCons "TraitAlias" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Generics) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (NonEmpty :.: Rec1 TyParamBound) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))) :+: C1 (MetaCons "Impl" PrefixI False) (((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Defaultness) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Unsafety) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ImplPolarity)))) :*: ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Generics) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Maybe :.: Rec1 TraitRef)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Ty) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 ImplItem) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))) :+: (C1 (MetaCons "MacItem" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Ident))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Mac) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)) :+: C1 (MetaCons "MacroDef" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 TokenStream) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))))

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated ForeignItem Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (ForeignItem a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Data a => Data (ForeignItem a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show a => Show (ForeignItem a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic (ForeignItem a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep (ForeignItem a) :: Type -> Type #

Methods

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

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

NFData a => NFData (ForeignItem a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: ForeignItem a -> () #

Located a => Located (ForeignItem a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: ForeignItem a -> Span Source #

(Typeable a, Monoid a) => Resolve (ForeignItem a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Pretty (ForeignItem a) Source # 
Instance details

Defined in Language.Rust.Pretty

Generic1 ForeignItem Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 ForeignItem :: k -> Type #

type Rep (ForeignItem a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep (ForeignItem a) = D1 (MetaData "ForeignItem" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (C1 (MetaCons "ForeignFn" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (FnDecl a)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Generics a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))) :+: (C1 (MetaCons "ForeignStatic" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ty a)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Mutability) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))) :+: C1 (MetaCons "ForeignTy" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))
type Rep1 ForeignItem Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 ForeignItem = D1 (MetaData "ForeignItem" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (C1 (MetaCons "ForeignFn" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 FnDecl) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Generics) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))) :+: (C1 (MetaCons "ForeignStatic" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Ty) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Mutability) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))) :+: C1 (MetaCons "ForeignTy" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated ImplItem Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (ImplItem a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (ImplItem a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

show :: ImplItem a -> String #

showList :: [ImplItem a] -> ShowS #

Generic (ImplItem a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep (ImplItem a) :: Type -> Type #

Methods

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

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

NFData a => NFData (ImplItem a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: ImplItem a -> () #

Located a => Located (ImplItem a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: ImplItem a -> Span Source #

(Typeable a, Monoid a) => Resolve (ImplItem a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Pretty (ImplItem a) Source # 
Instance details

Defined in Language.Rust.Pretty

Parse (ImplItem Span) Source # 
Instance details

Defined in Language.Rust.Parser

Generic1 ImplItem Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 ImplItem :: k -> Type #

Methods

from1 :: ImplItem a -> Rep1 ImplItem a #

to1 :: Rep1 ImplItem a -> ImplItem a #

type Rep (ImplItem a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep (ImplItem a) = D1 (MetaData "ImplItem" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) ((C1 (MetaCons "ConstI" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Defaultness))) :*: ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ty a))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))) :+: C1 (MetaCons "MethodI" PrefixI False) (((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Defaultness) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) :*: ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Generics a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (MethodSig a))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Block a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) :+: (C1 (MetaCons "TypeI" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Visibility a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Defaultness))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ty a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))) :+: C1 (MetaCons "MacroI" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Defaultness)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Mac a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))
type Rep1 ImplItem Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 ImplItem = D1 (MetaData "ImplItem" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) ((C1 (MetaCons "ConstI" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Defaultness))) :*: ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Ty)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))) :+: C1 (MetaCons "MethodI" PrefixI False) (((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Defaultness) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) :*: ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Generics) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 MethodSig)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Block) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) :+: (C1 (MetaCons "TypeI" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Visibility) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Defaultness))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Ty) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))) :+: C1 (MetaCons "MacroI" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Defaultness)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Mac) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated TraitItem Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (TraitItem a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (TraitItem a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show a => Show (TraitItem a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic (TraitItem a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep (TraitItem a) :: Type -> Type #

Methods

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

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

NFData a => NFData (TraitItem a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: TraitItem a -> () #

Located a => Located (TraitItem a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: TraitItem a -> Span Source #

(Typeable a, Monoid a) => Resolve (TraitItem a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Pretty (TraitItem a) Source # 
Instance details

Defined in Language.Rust.Pretty

Parse (TraitItem Span) Source # 
Instance details

Defined in Language.Rust.Parser

Generic1 TraitItem Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 TraitItem :: k -> Type #

type Rep (TraitItem a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep (TraitItem a) = D1 (MetaData "TraitItem" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) ((C1 (MetaCons "ConstT" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ty a)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Expr a))) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))) :+: C1 (MetaCons "MethodT" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Generics a)))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (MethodSig a)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Block a))) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))) :+: (C1 (MetaCons "TypeT" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [TyParamBound a]) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Ty a))) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))) :+: C1 (MetaCons "MacroT" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Attribute a]) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Mac a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))))
type Rep1 TraitItem Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 TraitItem = D1 (MetaData "TraitItem" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) ((C1 (MetaCons "ConstT" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Ty) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Maybe :.: Rec1 Expr) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))) :+: C1 (MetaCons "MethodT" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Generics))) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 MethodSig) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Maybe :.: Rec1 Block) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))) :+: (C1 (MetaCons "TypeT" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 TyParamBound) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Maybe :.: Rec1 Ty) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))) :+: C1 (MetaCons "MacroT" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ([] :.: Rec1 Attribute) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Mac) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))))

data Defaultness Source #

An ImplItem can be marked default (syntax::ast::Defaultness).

Constructors

Default 
Final 
Instances
Bounded Defaultness Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Enum Defaultness Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Eq Defaultness Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Data Defaultness Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show Defaultness Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic Defaultness Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep Defaultness :: Type -> Type #

NFData Defaultness Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: Defaultness -> () #

type Rep Defaultness Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep Defaultness = D1 (MetaData "Defaultness" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (C1 (MetaCons "Default" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Final" PrefixI False) (U1 :: Type -> Type))

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Enum ImplPolarity Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Eq ImplPolarity Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Data ImplPolarity Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show ImplPolarity Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic ImplPolarity Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep ImplPolarity :: Type -> Type #

NFData ImplPolarity Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: ImplPolarity -> () #

Pretty ImplPolarity Source # 
Instance details

Defined in Language.Rust.Pretty

type Rep ImplPolarity Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep ImplPolarity = D1 (MetaData "ImplPolarity" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (C1 (MetaCons "Positive" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Negative" PrefixI False) (U1 :: Type -> Type))

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated StructField Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (StructField a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Data a => Data (StructField a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show a => Show (StructField a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic (StructField a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep (StructField a) :: Type -> Type #

Methods

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

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

NFData a => NFData (StructField a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: StructField a -> () #

Located a => Located (StructField a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: StructField a -> Span Source #

(Typeable a, Monoid a) => Resolve (StructField a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Pretty (StructField a) Source # 
Instance details

Defined in Language.Rust.Pretty

Generic1 StructField Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 StructField :: k -> Type #

type Rep (StructField a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 StructField Source # 
Instance details

Defined in Language.Rust.Syntax.AST

data Variant a Source #

A variant in Rust is a constructor (either in a StructItem, Union, or Item) 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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated Variant Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (Variant a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (Variant a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

show :: Variant a -> String #

showList :: [Variant a] -> ShowS #

Generic (Variant a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep (Variant a) :: Type -> Type #

Methods

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

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

NFData a => NFData (Variant a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: Variant a -> () #

Located a => Located (Variant a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: Variant a -> Span Source #

(Typeable a, Monoid a) => Resolve (Variant a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Pretty (Variant a) Source # 
Instance details

Defined in Language.Rust.Pretty

Generic1 Variant Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 Variant :: k -> Type #

Methods

from1 :: Variant a -> Rep1 Variant a #

to1 :: Rep1 Variant a -> Variant a #

type Rep (Variant a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 Variant Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Eq a => Eq (VariantData a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Data a => Data (VariantData a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show a => Show (VariantData a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic (VariantData a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep (VariantData a) :: Type -> Type #

Methods

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

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

NFData a => NFData (VariantData a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: VariantData a -> () #

Located a => Located (VariantData a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: VariantData a -> Span Source #

(Typeable a, Monoid a) => Resolve (VariantData a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Generic1 VariantData Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 VariantData :: k -> Type #

type Rep (VariantData a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 VariantData Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated UseTree Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (UseTree a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (UseTree a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

show :: UseTree a -> String #

showList :: [UseTree a] -> ShowS #

Generic (UseTree a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep (UseTree a) :: Type -> Type #

Methods

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

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

NFData a => NFData (UseTree a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: UseTree a -> () #

Located a => Located (UseTree a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: UseTree a -> Span Source #

(Typeable a, Monoid a) => Resolve (UseTree a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Pretty (UseTree a) Source # 
Instance details

Defined in Language.Rust.Pretty

Generic1 UseTree Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 UseTree :: k -> Type #

Methods

from1 :: UseTree a -> Rep1 UseTree a #

to1 :: Rep1 UseTree a -> UseTree a #

type Rep (UseTree a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 UseTree Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated Visibility Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (Visibility a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (Visibility a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show a => Show (Visibility a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic (Visibility a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep (Visibility a) :: Type -> Type #

Methods

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

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

NFData a => NFData (Visibility a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: Visibility a -> () #

(Typeable a, Monoid a) => Resolve (Visibility a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Pretty (Visibility a) Source # 
Instance details

Defined in Language.Rust.Pretty

Generic1 Visibility Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 Visibility :: k -> Type #

type Rep (Visibility a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep (Visibility a) = D1 (MetaData "Visibility" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) ((C1 (MetaCons "PublicV" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "CrateV" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "RestrictedV" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Path a))) :+: C1 (MetaCons "InheritedV" PrefixI False) (U1 :: Type -> Type)))
type Rep1 Visibility Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 Visibility = D1 (MetaData "Visibility" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) ((C1 (MetaCons "PublicV" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "CrateV" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "RestrictedV" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Path)) :+: C1 (MetaCons "InheritedV" PrefixI False) (U1 :: Type -> Type)))

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Enum Constness Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Eq Constness Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Data Constness Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show Constness Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic Constness Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep Constness :: Type -> Type #

NFData Constness Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: Constness -> () #

type Rep Constness Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep Constness = D1 (MetaData "Constness" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (C1 (MetaCons "Const" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "NotConst" PrefixI False) (U1 :: Type -> Type))

data MethodSig a Source #

Represents a method's signature in a trait declaration, or in an implementation.

Instances
Functor MethodSig Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Eq a => Eq (MethodSig a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (MethodSig a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show a => Show (MethodSig a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic (MethodSig a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep (MethodSig a) :: Type -> Type #

Methods

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

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

NFData a => NFData (MethodSig a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: MethodSig a -> () #

(Typeable a, Monoid a) => Resolve (MethodSig a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Generic1 MethodSig Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 MethodSig :: k -> Type #

type Rep (MethodSig a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 MethodSig Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated Block Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (Block a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (Block a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

show :: Block a -> String #

showList :: [Block a] -> ShowS #

Generic (Block a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep (Block a) :: Type -> Type #

Methods

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

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

NFData a => NFData (Block a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: Block a -> () #

Located a => Located (Block a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: Block a -> Span Source #

(Typeable a, Monoid a) => Resolve (Block a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Pretty (Block a) Source # 
Instance details

Defined in Language.Rust.Pretty

Methods

prettyUnresolved :: Block a -> Doc b Source #

Parse (Block Span) Source # 
Instance details

Defined in Language.Rust.Parser

Methods

parser :: P (Block Span) Source #

Generic1 Block Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 Block :: k -> Type #

Methods

from1 :: Block a -> Rep1 Block a #

to1 :: Rep1 Block a -> Block a #

type Rep (Block a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 Block Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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, 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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Data TokenTree Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show TokenTree Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic TokenTree Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep TokenTree :: Type -> Type #

NFData TokenTree Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: TokenTree -> () #

Located TokenTree Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Resolve TokenTree Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Pretty TokenTree Source # 
Instance details

Defined in Language.Rust.Pretty

Parse TokenTree Source # 
Instance details

Defined in Language.Rust.Parser

type Rep TokenTree Source # 
Instance details

Defined in Language.Rust.Syntax.AST

data TokenStream Source #

An abstract sequence of tokens, organized into a sequence (e.g. stream) of TokenTree, each of which is a single TokenTree 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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Data TokenStream Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show TokenStream Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic TokenStream Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep TokenStream :: Type -> Type #

NFData TokenStream Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: TokenStream -> () #

Located TokenStream Source #

Span is not stored on TokenStream - it is computed

Instance details

Defined in Language.Rust.Syntax.AST

Resolve TokenStream Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

Pretty TokenStream Source # 
Instance details

Defined in Language.Rust.Pretty

Parse TokenStream Source # 
Instance details

Defined in Language.Rust.Parser

type Rep TokenStream Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated Nonterminal Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (Nonterminal a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Data a => Data (Nonterminal a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show a => Show (Nonterminal a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic (Nonterminal a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep (Nonterminal a) :: Type -> Type #

Methods

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

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

NFData a => NFData (Nonterminal a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: Nonterminal a -> () #

Pretty (Nonterminal a) Source # 
Instance details

Defined in Language.Rust.Pretty

Generic1 Nonterminal Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 Nonterminal :: k -> Type #

type Rep (Nonterminal a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep (Nonterminal a) = D1 (MetaData "Nonterminal" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) ((((C1 (MetaCons "NtItem" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Item a))) :+: C1 (MetaCons "NtBlock" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Block a)))) :+: (C1 (MetaCons "NtStmt" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Stmt a))) :+: C1 (MetaCons "NtPat" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Pat a))))) :+: ((C1 (MetaCons "NtExpr" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a))) :+: C1 (MetaCons "NtTy" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ty a)))) :+: (C1 (MetaCons "NtIdent" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) :+: C1 (MetaCons "NtPath" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Path a)))))) :+: (((C1 (MetaCons "NtTT" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 TokenTree)) :+: C1 (MetaCons "NtArm" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Arm a)))) :+: (C1 (MetaCons "NtImplItem" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (ImplItem a))) :+: C1 (MetaCons "NtTraitItem" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (TraitItem a))))) :+: ((C1 (MetaCons "NtGenerics" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Generics a))) :+: C1 (MetaCons "NtWhereClause" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (WhereClause a)))) :+: (C1 (MetaCons "NtArg" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Arg a))) :+: C1 (MetaCons "NtLit" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Lit a)))))))
type Rep1 Nonterminal Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 Nonterminal = D1 (MetaData "Nonterminal" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) ((((C1 (MetaCons "NtItem" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Item)) :+: C1 (MetaCons "NtBlock" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Block))) :+: (C1 (MetaCons "NtStmt" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Stmt)) :+: C1 (MetaCons "NtPat" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Pat)))) :+: ((C1 (MetaCons "NtExpr" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Expr)) :+: C1 (MetaCons "NtTy" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Ty))) :+: (C1 (MetaCons "NtIdent" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) :+: C1 (MetaCons "NtPath" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Path))))) :+: (((C1 (MetaCons "NtTT" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 TokenTree)) :+: C1 (MetaCons "NtArm" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Arm))) :+: (C1 (MetaCons "NtImplItem" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 ImplItem)) :+: C1 (MetaCons "NtTraitItem" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 TraitItem)))) :+: ((C1 (MetaCons "NtGenerics" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Generics)) :+: C1 (MetaCons "NtWhereClause" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 WhereClause))) :+: (C1 (MetaCons "NtArg" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Arg)) :+: C1 (MetaCons "NtLit" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Lit))))))

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

PrettyAnnotated Mac Source # 
Instance details

Defined in Language.Rust.Pretty

Eq a => Eq (Mac a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

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

Data a => Data (Mac a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

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

show :: Mac a -> String #

showList :: [Mac a] -> ShowS #

Generic (Mac a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep (Mac a) :: Type -> Type #

Methods

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

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

NFData a => NFData (Mac a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: Mac a -> () #

Located a => Located (Mac a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

spanOf :: Mac a -> Span Source #

(Typeable a, Monoid a) => Resolve (Mac a) Source # 
Instance details

Defined in Language.Rust.Pretty.Resolve

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 # 
Instance details

Defined in Language.Rust.Pretty

Methods

prettyUnresolved :: Mac a -> Doc b Source #

Generic1 Mac Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep1 Mac :: k -> Type #

Methods

from1 :: Mac a -> Rep1 Mac a #

to1 :: Rep1 Mac a -> Mac a #

type Rep (Mac a) Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep1 Mac Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Enum MacStmtStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Eq MacStmtStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Data MacStmtStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

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 # 
Instance details

Defined in Language.Rust.Syntax.AST

Show MacStmtStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Generic MacStmtStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Associated Types

type Rep MacStmtStyle :: Type -> Type #

NFData MacStmtStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

Methods

rnf :: MacStmtStyle -> () #

type Rep MacStmtStyle Source # 
Instance details

Defined in Language.Rust.Syntax.AST

type Rep MacStmtStyle = D1 (MetaData "MacStmtStyle" "Language.Rust.Syntax.AST" "flp-0.1.0.0-DeMkA8gwwJbCOh6gqZDp9v" False) (C1 (MetaCons "SemicolonMac" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "BracesMac" PrefixI False) (U1 :: Type -> Type))