traq
Safe HaskellSafe-Inferred
LanguageHaskell2010

Traq.CPL.Lenses

Synopsis

Documentation

class MapSize ext where #

Basic functor support for our AST

Associated Types

type MappedSize ext size' #

Methods

mapSize :: (size ~ SizeType ext, size' ~ SizeType ext', ext' ~ MappedSize ext size', PrecType ext ~ PrecType ext') => (size -> size') -> ext -> ext' #

Instances

Instances details
MapSize ext => MapSize (Expr ext) # 
Instance details

Defined in Traq.CPL.Lenses

Associated Types

type MappedSize (Expr ext) size' #

Methods

mapSize :: (size ~ SizeType (Expr ext), size' ~ SizeType ext', ext' ~ MappedSize (Expr ext) size', PrecType (Expr ext) ~ PrecType ext') => (size -> size') -> Expr ext -> ext' #

MapSize ext => MapSize (FunBody ext) # 
Instance details

Defined in Traq.CPL.Lenses

Associated Types

type MappedSize (FunBody ext) size' #

Methods

mapSize :: (size ~ SizeType (FunBody ext), size' ~ SizeType ext', ext' ~ MappedSize (FunBody ext) size', PrecType (FunBody ext) ~ PrecType ext') => (size -> size') -> FunBody ext -> ext' #

MapSize ext => MapSize (FunDef ext) # 
Instance details

Defined in Traq.CPL.Lenses

Associated Types

type MappedSize (FunDef ext) size' #

Methods

mapSize :: (size ~ SizeType (FunDef ext), size' ~ SizeType ext', ext' ~ MappedSize (FunDef ext) size', PrecType (FunDef ext) ~ PrecType ext') => (size -> size') -> FunDef ext -> ext' #

MapSize ext => MapSize (NamedFunDef ext) # 
Instance details

Defined in Traq.CPL.Lenses

Associated Types

type MappedSize (NamedFunDef ext) size' #

Methods

mapSize :: (size ~ SizeType (NamedFunDef ext), size' ~ SizeType ext', ext' ~ MappedSize (NamedFunDef ext) size', PrecType (NamedFunDef ext) ~ PrecType ext') => (size -> size') -> NamedFunDef ext -> ext' #

MapSize ext => MapSize (Program ext) # 
Instance details

Defined in Traq.CPL.Lenses

Associated Types

type MappedSize (Program ext) size' #

Methods

mapSize :: (size ~ SizeType (Program ext), size' ~ SizeType ext', ext' ~ MappedSize (Program ext) size', PrecType (Program ext) ~ PrecType ext') => (size -> size') -> Program ext -> ext' #

MapSize ext => MapSize (Stmt ext) # 
Instance details

Defined in Traq.CPL.Lenses

Associated Types

type MappedSize (Stmt ext) size' #

Methods

mapSize :: (size ~ SizeType (Stmt ext), size' ~ SizeType ext', ext' ~ MappedSize (Stmt ext) size', PrecType (Stmt ext) ~ PrecType ext') => (size -> size') -> Stmt ext -> ext' #

MapSize (VarType size) # 
Instance details

Defined in Traq.CPL.Lenses

Associated Types

type MappedSize (VarType size) size' #

Methods

mapSize :: (size0 ~ SizeType (VarType size), size' ~ SizeType ext', ext' ~ MappedSize (VarType size) size', PrecType (VarType size) ~ PrecType ext') => (size0 -> size') -> VarType size -> ext' #

MapSize prim => MapSize (Primitive prim) # 
Instance details

Defined in Traq.Primitives.Class

Associated Types

type MappedSize (Primitive prim) size' #

Methods

mapSize :: (size ~ SizeType (Primitive prim), size' ~ SizeType ext', ext' ~ MappedSize (Primitive prim) size', PrecType (Primitive prim) ~ PrecType ext') => (size -> size') -> Primitive prim -> ext' #

MapSize (Core size prec) # 
Instance details

Defined in Traq.CPL.Lenses

Associated Types

type MappedSize (Core size prec) size' #

Methods

mapSize :: (size0 ~ SizeType (Core size prec), size' ~ SizeType ext', ext' ~ MappedSize (Core size prec) size', PrecType (Core size prec) ~ PrecType ext') => (size0 -> size') -> Core size prec -> ext' #

MapSize (DistrExpr prec size) # 
Instance details

Defined in Traq.CPL.Lenses

Associated Types

type MappedSize (DistrExpr prec size) size' #

Methods

mapSize :: (size0 ~ SizeType (DistrExpr prec size), size' ~ SizeType ext', ext' ~ MappedSize (DistrExpr prec size) size', PrecType (DistrExpr prec size) ~ PrecType ext') => (size0 -> size') -> DistrExpr prec size -> ext' #

MapSize (DefaultPrimCollection size prec) # 
Instance details

Defined in Traq.Primitives

Associated Types

type MappedSize (DefaultPrimCollection size prec) size' #

Methods

mapSize :: (size0 ~ SizeType (DefaultPrimCollection size prec), size' ~ SizeType ext', ext' ~ MappedSize (DefaultPrimCollection size prec) size', PrecType (DefaultPrimCollection size prec) ~ PrecType ext') => (size0 -> size') -> DefaultPrimCollection size prec -> ext' #

MapSize (CAmplify size prec) # 
Instance details

Defined in Traq.Primitives.Amplify.CAmplify

Associated Types

type MappedSize (CAmplify size prec) size' #

Methods

mapSize :: (size0 ~ SizeType (CAmplify size prec), size' ~ SizeType ext', ext' ~ MappedSize (CAmplify size prec) size', PrecType (CAmplify size prec) ~ PrecType ext') => (size0 -> size') -> CAmplify size prec -> ext' #

MapSize (Amplify size prec) # 
Instance details

Defined in Traq.Primitives.Amplify.Prelude

Associated Types

type MappedSize (Amplify size prec) size' #

Methods

mapSize :: (size0 ~ SizeType (Amplify size prec), size' ~ SizeType ext', ext' ~ MappedSize (Amplify size prec) size', PrecType (Amplify size prec) ~ PrecType ext') => (size0 -> size') -> Amplify size prec -> ext' #

MapSize (QAmplify size prec) # 
Instance details

Defined in Traq.Primitives.Amplify.QAmplify

Associated Types

type MappedSize (QAmplify size prec) size' #

Methods

mapSize :: (size0 ~ SizeType (QAmplify size prec), size' ~ SizeType ext', ext' ~ MappedSize (QAmplify size prec) size', PrecType (QAmplify size prec) ~ PrecType ext') => (size0 -> size') -> QAmplify size prec -> ext' #

MapSize (QMax size prec) # 
Instance details

Defined in Traq.Primitives.Max.QMax

Associated Types

type MappedSize (QMax size prec) size' #

Methods

mapSize :: (size0 ~ SizeType (QMax size prec), size' ~ SizeType ext', ext' ~ MappedSize (QMax size prec) size', PrecType (QMax size prec) ~ PrecType ext') => (size0 -> size') -> QMax size prec -> ext' #

MapSize (DetSearch size prec) # 
Instance details

Defined in Traq.Primitives.Search.DetSearch

Associated Types

type MappedSize (DetSearch size prec) size' #

Methods

mapSize :: (size0 ~ SizeType (DetSearch size prec), size' ~ SizeType ext', ext' ~ MappedSize (DetSearch size prec) size', PrecType (DetSearch size prec) ~ PrecType ext') => (size0 -> size') -> DetSearch size prec -> ext' #

MapSize (PrimSearch size prec) # 
Instance details

Defined in Traq.Primitives.Search.Prelude

Associated Types

type MappedSize (PrimSearch size prec) size' #

Methods

mapSize :: (size0 ~ SizeType (PrimSearch size prec), size' ~ SizeType ext', ext' ~ MappedSize (PrimSearch size prec) size', PrecType (PrimSearch size prec) ~ PrecType ext') => (size0 -> size') -> PrimSearch size prec -> ext' #

MapSize (QSearchCFNW size prec) # 
Instance details

Defined in Traq.Primitives.Search.QSearchCFNW

Associated Types

type MappedSize (QSearchCFNW size prec) size' #

Methods

mapSize :: (size0 ~ SizeType (QSearchCFNW size prec), size' ~ SizeType ext', ext' ~ MappedSize (QSearchCFNW size prec) size', PrecType (QSearchCFNW size prec) ~ PrecType ext') => (size0 -> size') -> QSearchCFNW size prec -> ext' #

MapSize (RandomSearch size prec) # 
Instance details

Defined in Traq.Primitives.Search.RandomSearch

Associated Types

type MappedSize (RandomSearch size prec) size' #

Methods

mapSize :: (size0 ~ SizeType (RandomSearch size prec), size' ~ SizeType ext', ext' ~ MappedSize (RandomSearch size prec) size', PrecType (RandomSearch size prec) ~ PrecType ext') => (size0 -> size') -> RandomSearch size prec -> ext' #

MapSize (FindXorPeriod size prec) # 
Instance details

Defined in Traq.Primitives.Simons.Prelude

Associated Types

type MappedSize (FindXorPeriod size prec) size' #

Methods

mapSize :: (size0 ~ SizeType (FindXorPeriod size prec), size' ~ SizeType ext', ext' ~ MappedSize (FindXorPeriod size prec) size', PrecType (FindXorPeriod size prec) ~ PrecType ext') => (size0 -> size') -> FindXorPeriod size prec -> ext' #

MapSize (SimonsFindXorPeriod size prec) # 
Instance details

Defined in Traq.Primitives.Simons.Quantum

Associated Types

type MappedSize (SimonsFindXorPeriod size prec) size' #

Methods

mapSize :: (size0 ~ SizeType (SimonsFindXorPeriod size prec), size' ~ SizeType ext', ext' ~ MappedSize (SimonsFindXorPeriod size prec) size', PrecType (SimonsFindXorPeriod size prec) ~ PrecType ext') => (size0 -> size') -> SimonsFindXorPeriod size prec -> ext' #

class MapPrec ext where #

Associated Types

type MappedPrec ext prec' #

Methods

mapPrec :: (prec ~ PrecType ext, prec' ~ PrecType ext', ext' ~ MappedPrec ext prec', SizeType ext ~ SizeType ext') => (prec -> prec') -> ext -> ext' #

Instances

Instances details
MapPrec ext => MapPrec (Expr ext) # 
Instance details

Defined in Traq.CPL.Lenses

Associated Types

type MappedPrec (Expr ext) prec' #

Methods

mapPrec :: (prec ~ PrecType (Expr ext), prec' ~ PrecType ext', ext' ~ MappedPrec (Expr ext) prec', SizeType (Expr ext) ~ SizeType ext') => (prec -> prec') -> Expr ext -> ext' #

MapPrec ext => MapPrec (FunBody ext) # 
Instance details

Defined in Traq.CPL.Lenses

Associated Types

type MappedPrec (FunBody ext) prec' #

Methods

mapPrec :: (prec ~ PrecType (FunBody ext), prec' ~ PrecType ext', ext' ~ MappedPrec (FunBody ext) prec', SizeType (FunBody ext) ~ SizeType ext') => (prec -> prec') -> FunBody ext -> ext' #

MapPrec ext => MapPrec (FunDef ext) # 
Instance details

Defined in Traq.CPL.Lenses

Associated Types

type MappedPrec (FunDef ext) prec' #

Methods

mapPrec :: (prec ~ PrecType (FunDef ext), prec' ~ PrecType ext', ext' ~ MappedPrec (FunDef ext) prec', SizeType (FunDef ext) ~ SizeType ext') => (prec -> prec') -> FunDef ext -> ext' #

MapPrec ext => MapPrec (NamedFunDef ext) # 
Instance details

Defined in Traq.CPL.Lenses

Associated Types

type MappedPrec (NamedFunDef ext) prec' #

Methods

mapPrec :: (prec ~ PrecType (NamedFunDef ext), prec' ~ PrecType ext', ext' ~ MappedPrec (NamedFunDef ext) prec', SizeType (NamedFunDef ext) ~ SizeType ext') => (prec -> prec') -> NamedFunDef ext -> ext' #

MapPrec ext => MapPrec (Program ext) # 
Instance details

Defined in Traq.CPL.Lenses

Associated Types

type MappedPrec (Program ext) prec' #

Methods

mapPrec :: (prec ~ PrecType (Program ext), prec' ~ PrecType ext', ext' ~ MappedPrec (Program ext) prec', SizeType (Program ext) ~ SizeType ext') => (prec -> prec') -> Program ext -> ext' #

MapPrec ext => MapPrec (Stmt ext) # 
Instance details

Defined in Traq.CPL.Lenses

Associated Types

type MappedPrec (Stmt ext) prec' #

Methods

mapPrec :: (prec ~ PrecType (Stmt ext), prec' ~ PrecType ext', ext' ~ MappedPrec (Stmt ext) prec', SizeType (Stmt ext) ~ SizeType ext') => (prec -> prec') -> Stmt ext -> ext' #

MapPrec prim => MapPrec (Primitive prim) # 
Instance details

Defined in Traq.Primitives.Class

Associated Types

type MappedPrec (Primitive prim) prec' #

Methods

mapPrec :: (prec ~ PrecType (Primitive prim), prec' ~ PrecType ext', ext' ~ MappedPrec (Primitive prim) prec', SizeType (Primitive prim) ~ SizeType ext') => (prec -> prec') -> Primitive prim -> ext' #

MapPrec (Core size prec) # 
Instance details

Defined in Traq.CPL.Lenses

Associated Types

type MappedPrec (Core size prec) prec' #

Methods

mapPrec :: (prec0 ~ PrecType (Core size prec), prec' ~ PrecType ext', ext' ~ MappedPrec (Core size prec) prec', SizeType (Core size prec) ~ SizeType ext') => (prec0 -> prec') -> Core size prec -> ext' #

MapPrec (DistrExpr prec size) # 
Instance details

Defined in Traq.CPL.Lenses

Associated Types

type MappedPrec (DistrExpr prec size) prec' #

Methods

mapPrec :: (prec0 ~ PrecType (DistrExpr prec size), prec' ~ PrecType ext', ext' ~ MappedPrec (DistrExpr prec size) prec', SizeType (DistrExpr prec size) ~ SizeType ext') => (prec0 -> prec') -> DistrExpr prec size -> ext' #

MapPrec (DefaultPrimCollection size prec) # 
Instance details

Defined in Traq.Primitives

Associated Types

type MappedPrec (DefaultPrimCollection size prec) prec' #

Methods

mapPrec :: (prec0 ~ PrecType (DefaultPrimCollection size prec), prec' ~ PrecType ext', ext' ~ MappedPrec (DefaultPrimCollection size prec) prec', SizeType (DefaultPrimCollection size prec) ~ SizeType ext') => (prec0 -> prec') -> DefaultPrimCollection size prec -> ext' #

MapPrec (CAmplify size prec) # 
Instance details

Defined in Traq.Primitives.Amplify.CAmplify

Associated Types

type MappedPrec (CAmplify size prec) prec' #

Methods

mapPrec :: (prec0 ~ PrecType (CAmplify size prec), prec' ~ PrecType ext', ext' ~ MappedPrec (CAmplify size prec) prec', SizeType (CAmplify size prec) ~ SizeType ext') => (prec0 -> prec') -> CAmplify size prec -> ext' #

MapPrec (Amplify size prec) # 
Instance details

Defined in Traq.Primitives.Amplify.Prelude

Associated Types

type MappedPrec (Amplify size prec) prec' #

Methods

mapPrec :: (prec0 ~ PrecType (Amplify size prec), prec' ~ PrecType ext', ext' ~ MappedPrec (Amplify size prec) prec', SizeType (Amplify size prec) ~ SizeType ext') => (prec0 -> prec') -> Amplify size prec -> ext' #

MapPrec (QAmplify size prec) # 
Instance details

Defined in Traq.Primitives.Amplify.QAmplify

Associated Types

type MappedPrec (QAmplify size prec) prec' #

Methods

mapPrec :: (prec0 ~ PrecType (QAmplify size prec), prec' ~ PrecType ext', ext' ~ MappedPrec (QAmplify size prec) prec', SizeType (QAmplify size prec) ~ SizeType ext') => (prec0 -> prec') -> QAmplify size prec -> ext' #

MapPrec (QMax size prec) # 
Instance details

Defined in Traq.Primitives.Max.QMax

Associated Types

type MappedPrec (QMax size prec) prec' #

Methods

mapPrec :: (prec0 ~ PrecType (QMax size prec), prec' ~ PrecType ext', ext' ~ MappedPrec (QMax size prec) prec', SizeType (QMax size prec) ~ SizeType ext') => (prec0 -> prec') -> QMax size prec -> ext' #

MapPrec (DetSearch size prec) # 
Instance details

Defined in Traq.Primitives.Search.DetSearch

Associated Types

type MappedPrec (DetSearch size prec) prec' #

Methods

mapPrec :: (prec0 ~ PrecType (DetSearch size prec), prec' ~ PrecType ext', ext' ~ MappedPrec (DetSearch size prec) prec', SizeType (DetSearch size prec) ~ SizeType ext') => (prec0 -> prec') -> DetSearch size prec -> ext' #

MapPrec (PrimSearch size prec) # 
Instance details

Defined in Traq.Primitives.Search.Prelude

Associated Types

type MappedPrec (PrimSearch size prec) prec' #

Methods

mapPrec :: (prec0 ~ PrecType (PrimSearch size prec), prec' ~ PrecType ext', ext' ~ MappedPrec (PrimSearch size prec) prec', SizeType (PrimSearch size prec) ~ SizeType ext') => (prec0 -> prec') -> PrimSearch size prec -> ext' #

MapPrec (QSearchCFNW size prec) # 
Instance details

Defined in Traq.Primitives.Search.QSearchCFNW

Associated Types

type MappedPrec (QSearchCFNW size prec) prec' #

Methods

mapPrec :: (prec0 ~ PrecType (QSearchCFNW size prec), prec' ~ PrecType ext', ext' ~ MappedPrec (QSearchCFNW size prec) prec', SizeType (QSearchCFNW size prec) ~ SizeType ext') => (prec0 -> prec') -> QSearchCFNW size prec -> ext' #

MapPrec (RandomSearch size prec) # 
Instance details

Defined in Traq.Primitives.Search.RandomSearch

Associated Types

type MappedPrec (RandomSearch size prec) prec' #

Methods

mapPrec :: (prec0 ~ PrecType (RandomSearch size prec), prec' ~ PrecType ext', ext' ~ MappedPrec (RandomSearch size prec) prec', SizeType (RandomSearch size prec) ~ SizeType ext') => (prec0 -> prec') -> RandomSearch size prec -> ext' #

MapPrec (FindXorPeriod size prec) # 
Instance details

Defined in Traq.Primitives.Simons.Prelude

Associated Types

type MappedPrec (FindXorPeriod size prec) prec' #

Methods

mapPrec :: (prec0 ~ PrecType (FindXorPeriod size prec), prec' ~ PrecType ext', ext' ~ MappedPrec (FindXorPeriod size prec) prec', SizeType (FindXorPeriod size prec) ~ SizeType ext') => (prec0 -> prec') -> FindXorPeriod size prec -> ext' #

MapPrec (SimonsFindXorPeriod size prec) # 
Instance details

Defined in Traq.Primitives.Simons.Quantum

Associated Types

type MappedPrec (SimonsFindXorPeriod size prec) prec' #

Methods

mapPrec :: (prec0 ~ PrecType (SimonsFindXorPeriod size prec), prec' ~ PrecType ext', ext' ~ MappedPrec (SimonsFindXorPeriod size prec) prec', SizeType (SimonsFindXorPeriod size prec) ~ SizeType ext') => (prec0 -> prec') -> SimonsFindXorPeriod size prec -> ext' #

_exts :: forall ext ext'. (HasExts f, SizeType ext ~ SizeType ext', PrecType ext ~ PrecType ext') => Traversal (f ext) (f ext') ext ext' #