i8S      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUV W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                           !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~               !!!!!!!!!!!!!!!!!!!!!!!!!"""""########### # # # $ %%%%%%)&#(C) 2015-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>None9;<='Safe !"#$% !"#$% !"#$%((C) 2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>Safe#(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>None9;BLOT(A class that can generate unique numbersGet a new unique^Create a TH expression that returns the a formatted string containing the name of the module 4 is spliced into, and the line where it was spliced.$Cache the result of a monadic actionICache the result of a monadic action in a State 3 transformer layers downSpine-strict cache variant of  mkCachedT3 IRun a State-action using the State that is stored in a higher-layer Monad Functorial version of )* Functorial version of )+ 0Performs trace when first argument evaluates to &Monadic version of ,-Monadic version of ,.6Composition of a unary function with a binary function)if-then-else as a function on an argument&Applicative version of 'GHC.Types.(:)'Safe indexing, returns a ' if the index does not existBUnsafe indexing, return a custom error message when indexing fails5Split the second list at the length of the first list*x y -> floor (logBase x y), x > 1 && y > 0,x y -> ceiling (logBase x y), x > 1 && y > 0%The key the action is associated with)The Lens to the HashMap that is the cacheThe action to cache%The key the action is associated with)The Lens to the HashMap that is the cacheThe action to cache +Lens to the State in the higher-layer monadThe State-action to perform !()*+,-./01   5/#(C) 2015-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>None2MParse a ByteString according to the given JSON template. Prints failures on stdout, and returns ' if parsing fails.2Bytestring to parse22#(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>None9;[Externally defined primitiveLA primitive that has a template that can be filled out by the backend render/A primitive that carries additional informationName of the primitive! Either a  declaration or an  expression template."Additional information#Primitive Definitions  !"#$ ! "# # !"$  !"#$#(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>None&hGenerate a set of primitives that are found in the primitive definition files in the given directories.&/Directories to search for primitive definitions&&&#(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>Safe$ 34'(56789:'('( 34'(56789:#(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>Safe,Component instantiation hole. First argument indicates which function argument to instantiate. Second argument corresponds to output and input assignments, where the first element is the output assignment, and the subsequent elements are the consecutive input assignments.eThe LHS of the tuple is the name of the signal, while the RHS of the tuple is the type of the signal.Elements of a blackbox context/Constant0Component instantiation hole1 Output hole2 Input hole3 Literal hole4 Symbol hole5VClock hole (Maybe clk corresponding to input, clk corresponding to output if Nothing)6 Reset hole7Type declaration hole8Type root hole9Error value hole:&Select element type from a vector type;IHole for the name of the component in which the blackbox is instantiated=AIndex data type hole, the field is the (exclusive) maximum index>Size of a type hole?Length of a vector hole@Depth of a tree holeA*Hole containing a filepath for a data fileBGHole marking beginning (True) or end (False) of a generative constructEHole indicating whether IntWordInteger are 64-BitF>Hole indicating which synthesis tool we're generating HDL forG*Convert to (True)/from(False) a bit-vectorM)A BlackBox Template is a List of Elements%)*+,-./0123456789:;<=>?@ABCDEFGHIJKLM%)+*,-.0/B3D2A1>5G@?L9CF4678:;<=EHIJKM%M./0123456789:;<=>?@ABCDEFGHIJKL,-)*+)*+,-./0123456789:;<=>?@ABCDEFGHIJKLM#(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>NoneSSParse a text as a BlackBoxTemplate, returns a list of errors in case parsing fails;7Parse a BlackBoxTemplate (Declarations and Expressions)<Parse a single Template Element=!Parse the Text part of a Template>)Parse a Declaration or Expression element?Parse a Declaration@#Parse the output tag of DeclarationA"Parse the input tag of DeclarationBParse an Expression elementCParse a bracketed textD)Parse a token and eat trailing whitespaceE/Parse the expression part of Blackbox TemplatesFParse an Expression or TextG Parse SigDHS;<=>?@ABCDEFGSSHS;<=>?@ABCDEFG #(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>None57<=] Type variable^ Term variable_Variables in CoreHW`Constructor for type variablesaConstructor for term variableseChange the name of a variable ]^_`abcdefgh ]^_a`bdce _`abcbd^]e]^_`abcbdefgh #(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>None 579;<= mDataCon referencen:Syntactical position of the DataCon in the type definitionoData ConstructorqName of the DataConr+Syntactical position in the type definitionsType of the 'DataContmUniversally quantified type-variables, these type variables are also part of the result type of the DataConuExistentially quantified type-variables, these type variables are not part of the result of the DataCon, but only of the arguments.vArgument typeswGiven a DataCon and a list of types, the type variables of the DataCon type are substituted for the list of types. The argument types are returned.NThe list of types should be equal to the number of type variables, otherwise Nothing is returned.mnopqrstuvwxyz{| mnoprqtsuvw opqrstuvmnw mnopqrstuvwxyz{|#(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>None579;<=TTyCon referenceUType Constructor The RHS of an Algebraic DatatypeThe DataCons of a TyConThe newtype DataConThe argument type of the newtype DataCon in eta-reduced form, which is just the representation of the TyCon. The TyName's are the type-variables from the corresponding TyCon.Algorithmic DataCons$Function TyCons (e.g. type families)Primitive TyCons'To close the loop on the type hierarchyName of the TyConKind of the TyConNumber of type argumentsDataCon definitions&List of: ([LHS match types], RHS type) Create a Kind out of a TyConName&Does the TyCon look like a tuple TyCon%Get the DataCons belonging to a TyConTUTUUT TU #(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>NoneI Builtin NameJ Builtin NameK Builtin NameL Builtin NameM Builtin KindN Builtin KindO Builtin KindP Builtin KindQ Builtin TypeR Builtin TypeS Builtin TypeT Builtin TypeU Builtin TypeV Builtin TypeW Builtin TypeX Builtin TypeY Builtin TypeZ Builtin Type,IJKLMNOP[\]^_`abcdefQRSTUVWXYZ,IJKLMNOP[\]^_`abcdefQRSTUVWXYZ#(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>None579;<= Term Literal Determines the Type of a Literal  #(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>None579;<=VTerm referenceWDTerm representation in the CoreHW language: System F + LetRec + Case+Patterns in the LHS of a case-decompositionVDatatype pattern, '[TyVar]' bind existentially-quantified type-variables of a DataConLiteral patternDefault patternBinding in a LetRec constructVariable referenceDatatype constructorLiteral PrimitiveTerm-abstractionType-abstraction ApplicationType-applicationRecursive let-bindingECase-expression: subject, type of alternatives, list of alternativesVWVWWV VW #(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>NoneSubstitutes types in a typeSubstitutes a type in a typeSubstitutes kinds in a kindSubstitutes a type in a termSubstitutes types in a termSubstitutes a term in a termSubstitutes terms in a term #(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>None $579;<=B&XReference to a KindYReference to a TypeZThe level above types[/Types in CoreHW: function and polymorphic types\Make a Type out of a TyConEither a Kind or a Type Literal TypesType Constants TyCon type Function typeAn easier view on types Function type Applied TyConNeither of the above Type variable Type constantPolymorphic TypeType Application Type literalAn easier view on typesA view on types in which newtypes are transparent, the Signal type is transparent, and type functions are evaluated to WHNF (when possible).Only strips away one "layer".gZInstantiate and Apply the RHS/Original of a NewType with the given list of argument types3Make a function type of an argument and result typeDMake a TyCon Application out of a TyCon and a list of argument types6Split a TyCon Application in a TyCon and its argumentshIs a type a Superkind?Determine the kind of a typeIs a type polymorphic?4Split a function type in an argument and result type^Split a poly-function type in a: list of type-binders and argument types, and the result typenSplit a poly-function type in a: list of type-binders and argument types, and the result type. Looks through Signal and type functions.)Is a type a polymorphic or function type?/Is a type a polymorphic or function type under ?Is a type a function type?AApply a function type to an argument type and get the result type(Substitute the type variable of a type () with another typeiCSplit a type application in the applied type and the argument types-The type of GHC.Err.undefined :: forall a . a6XYZ[\ghjiklm )XYZ[\])[ZXY]\*XYZ[\ghjiklm #(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>None'Gives the free type-variables in a Type'Gives the free term-variables of a Term'Gives the free type-variables of a Term#(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>None$9;#Pretty printing Show-like typeclass Print a Pretty thing to a String?nopqrstuvwxyz{|}~ !"#$%&'(7nopqrstuvwxyz{|}~ !"#$%&'(#(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>None$+Kind environment/context,Type environment/context-Determine the type of a term.>Split a (Type)Application in the applied term and it arguments/HSplit a (Type)Abstraction in the bound variables and the abstracted term0GGet the result type of a polymorphic function given a list of arguments16Get the list of term-binders out of a DataType pattern2Make a type variable3Make a term variable46Abstract a term over a list of term and type variables5-Abstract a term over a list of term variables6-Abstract a term over a list of type variables7)Apply a list of types and terms to a term8Apply a list of terms to a term9Apply a list of types to a term:!Does a term have a function type?;0Does a term have a function or polymorphic type?<Is a term a term-abstraction?="Is a term a recursive let-binding?>Is a term a variable reference??!Is a term a datatype constructor?@Is a term a primitive?A,Make variable reference out of term variableB0Make a term variable out of a variable referenceD$Create a vector of supplied elementsE&Append elements to the supplied vectorFCreate let-bindings with case-statements that select elements out of a vector. Returns both the variables to which element-selections are bound and the let-bindingsGCreate let-bindings with case-statements that select elements out of a tree. Returns both the variables to which element-selections are bound and the let-bindingsH$Create a vector of supplied elementsI*Determine whether a type is isomorphic to CLaSH.Signal.Internal.Signal' It is i.e.: Signal' clk a(Signal' clk a, Signal' clk b)Vec n (Signal' clk a)data Wrap = W (Signal clk' Int)etc. +,-./0123456789:;<=>?@ABCDThe Nil constructorThe Cons (:>) constructor Element typeLength of the vectorElements to put in the vectorEThe Cons (:>) constructor Element type$The vector to append the elements toLength of the vectorElements to appendFThe Cons (:>) constructorThe element type*Char to append to the bound variable namesLength of the vector The vectorGThe LR constructorThe BR constructorThe element type*Char to append to the bound variable namesDepth of the treeThe treeHThe LR constructorThe BR constructor Element typeDepth of the treeElements to put in the treeIJ +,-./0123456789:;<=>?@ABCDEFGHIJ ,+-./0123456789:;<=>?@ABCDEFGHIJ +,-./0123456789:;<=>?@ABCDEFGHIJ#(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>None5IAL\Either the name of the identifier, or a tuple of the identifier and the corresponding clockM8Context used to fill in the holes of a BlackBox templateOResult name and typeP2Argument names, types, and whether it is a literalQ&Function arguments (subset of inputs):,(Blackbox Template,Partial Blackbox Concext)S Bit literalTHighULowV UndefinedWHigh-impedanceXLiterals used in an expressionYNumber literalZ Bit literal[Boolean literal\Vector literal]String literal^'Expression used in RHS of a declaration_Literal expression`DataCon applicationaSignal referencebLeft e : tagToEnum, @Right e@: dataToTagc&Instantiation of a BlackBox expressiondExpression Modifiere@Index the expression: (Type of expression,DataCon tag,Field Tag)fJSee expression in a DataCon context: (Type of the expression, DataCon tag)g>See the expression in the context of a Vector append operationh<See the expression in the context of a Tree append operationlInternals of a ComponentmSignal assignment:Signal to assignAssigned expressionnConditional signal assignment:Signal to assignType of the result/alternativesScrutinized expressionType of the scrutineeVList of: (Maybe expression scrutinized expression is compared with,RHS of alternative)o"Instantiation of another componentp%Instantiation of blackbox declarationqSignal declarationrRepresentable hardware typess Empty typet String typeu Boolean typevBitVector of a specified sizew9Unsigned integer with specified (exclusive) upper bounderx"Signed integer of a specified sizey$Unsigned integer of a specified sizez Vector type{ RTree type|$Sum type: Name and Constructor names}"Product type: Name and field types~=Sum-of-Product type: Name and Constructor names + field types)Clock type with specified name and periodBReset type corresponding to clock with a specified name and period?Size indication of a type (e.g. bit-size or number of elements)!Component: base unit of a NetlistName of the componentBPorts that have no correspondence the original function definition Input ports Output portsInternal declarationsSignal referenceState of the NetlistMonadGlobal bindersType environment/contextNumber of signal declarationsCached componentsPrimitive Definitions#Hardcoded Type -> HWType translator TyCon cache}Monad that caches generated components (StateT) and remembers hidden inputs of components that are being generated (WriterT)eKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~aKLMNOPQRSUVWTXYZ[\]^`_abcdefghijklmonpqrtuw~}|svxy{zerstuvwxyz{|}~lmnopqijkdefgh^_`abcXYZ[\]STUVWMNOPQRLK"KLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~#(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>None9;<=I!State of a rewriting session!Number of applied transformationsGlobal bindersSupply of unique numbers&Function which is currently normalized Used for Additional stateContext in which a term appears#Function position of an application#Argument position of an application'Function position of a type application)RHS of a Let-binder with the sibling LHS')Body of a Let-binding with the bound LHS'2Body of a lambda-term with the abstracted variable:Body of a TyLambda-term with the abstracted type-variableMRHS of a case-alternative with the variables bound by the pattern on the LHSSubject of a case-decomposition,Read-only environment of a rewriting session(Lvl at which we print debugging messages"Hardcode Type -> HWType translator TyCon cacheTuple TyCon cache&Hardcoded evaluator (delta-reduction)}&Zero bit wide things are representableDebug Message VerbosityDon't show debug messages&Show completely normalized expressions Names of applied transformations/Show sub-expressions after a successful rewrite8Show all sub-expressions on which a rewrite is attemptedA  action in the context of the =Monadic action that transforms a term given a certain contextMonad that keeps track how many transformations have been applied and can generate fresh variables and unique identifiers. In addition, it keeps track if a transformation/rewrite has been successfully applied.:1: #(C) 2013-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>NoneGlobal function binders                     #(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>None  State of the #Global binders*Cache of previously specialised functions:NKey: (name of the original function, argument position, specialised term/type)AElem: (name of specialised function,type of specialised function)2Cache of how many times a function was specializedNumber of time a function f can be specialized,Cache of function where inlining took place:'Key: function where inlining took place=Elem: (functions which were inlined, number of times inlined)Number of times a function f can be inlined in a function gKSize of a function below which it is always inlined if it is not recursivePrimitive Definitions =Map telling whether a components is part of a recursive group!A  Transform action in the context of the  and #"3RewriteSession with extra Normalisation information#?State monad that stores specialisation and inlining information !"#$%&'()*+, !"#$%&'()*+, ,+*)('&%$#"!   !"#$%&'()*+,#(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>NoneT -1Apply a transformation on the subtrees of an term.'Apply two transformations in succession/JApply two transformations in succession, and perform a deepseq in between.0-Apply a transformation in a topdown traversal1OApply a transformation in a topdown traversal. Doesn't freshen bound variables2.Apply a transformation in a bottomup traversal3PApply a transformation in a bottomup traversal. Doesn't freshen bound variables4?Only apply the second transformation if the first one succeeds.5<Only apply the second transformation if the first one fails.6.Keep applying a transformation until it fails.8<Only traverse downwards when the assertion evaluates to true -/Freshen variable references in abstracted terms+The transformation to apply to the subtrees./012345678 -./012345678 -./012345678 -./012345678.6/64555#(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>None$=Split a normalized term into: a list of arguments, a list of let-bindings, and a variable reference that is the body of the let-binding. Returns a String containing the error is the term was not in a normalized form.>Converts a Core type to a HWType given a function that translates certain builtin types. Errors if the Core type is not translatable.?KConverts a Core type to a HWType within the NetlistMonad; errors on failure@:Converts a Core type to a HWType within the NetlistMonad; ' on failureA@Returns the name and period of the clock corresponding to a typeBConverts a Core type to a HWType given a function that translates certain builtin types. Returns a string containing the error message when the Core type is not translatable.CRConverts an algebraic Core type (split into a TyCon and its argument) to a HWType.D/Simple check if a TyCon is recursively defined.EnDetermines if a Core type is translatable to a HWType given a function that translates certain builtin types.F Determines the bitsize of a typeG3Determines the bitsize of the constructor of a typeH(Gives the length of length-indexed typesI}Gives the HWType corresponding to a term. Returns an error if the term has a Core type that is not translatable to a HWType.J2Gives the HWType corresponding to a term. Returns 'C if the term has a Core type that is not translatable to a HWType.KLUniquely rename all the variables and their references in a normalized termL\Make a set of IDs unique; also returns a substitution from old ID to new updated unique ID.NAppend a string to a nameOPreserve the Netlist  and  when executing a monadic action<=>?@A TyCon cacheBC#Hardcoded Type -> HWType translator TyCon cache9String representation of the Core type for error messages The TyConIts applied argumentsDEAllow zero-bit thingsFGHIJKLExisting substitutionIDs to make unique!(Unique IDs, update substitution)MNOP<=>?@ABCDEFGHIJKLMNOP<=>?@ABCDEFGHIJKLMNOP<=>?@ABCDEFGHIJKLMNOP#(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>None$OTQLift an action working in the  state to the R1Record if a transformation is succesfully appliedS"Perform a transformation on a TermT,Evaluate a RewriteSession to its inner monadU7Notify that a transformation has changed the expressionV^Identity function that additionally notifies that a transformation has changed the expressionW>Create a type and kind context out of a transformation contextZaCreate a complete type and kind context out of the global binders and the transformation context[3Make a new binder and variable reference for a term\DMake a new binder and variable reference for either a term or a type]CMake a new, unique, identifier and corresponding variable reference^@Inline the binders in a let-binding that have a certain property_RDetermine whether a binder is a join-point created for a complex case expression.lA join-point is when a local function only occurs in tail-call positions, and when it does, more than once.`GCount the number of (only) tail calls of a function in an expression. 'B indicates that the function was used in a non-tail call position.a6Determines whether a function has the following shape: \(w :: Void) -> f a b c8i.e. is a wrapper around a (partially) applied function f!, where the introduced argument w is not used by fbSubstitute the RHS of the first set of Let-binders for references to the first set of Let-binders in: the second set of Let-binders and the additional termcCalculate the localb free variable of an expression: the free variables that are not bound in the global environment.eCreate a global function for a Let-binding and return a Let-binding where the RHS is a reference to the new global function applied to the free variables of the original RHSf,Make a global function for a name-term tupleg+Add a function to the set of global bindersh@Create a new name out of the given name, but with another uniquei=Test whether a term is a variable reference to a local binderj5Determine if a term cannot be represented in hardwarek5Determine if a type cannot be represented in hardwarel1Is the Context a Lambda/Term-abstraction context?m+Make a binder that should not be referencednNMake a case-decomposition that extracts a field out of a (Sum-of-)Product typeo)Specialise an application on its argumentp)Specialise an application on its argumentq=Create binders and variable references for free variables in specArg!QRName of the transformationTransformation to be appliedSName of the transformationTransformation to performTerm to transformTUVWXYZ[ TyCon cacheName of the new binder Term to bind\ TyCon cacheName of the new binderType or Term to bind]Name of the identifier^ Property test_^ of the local binder'Expression in which the binder is bound`Function to checkExpression to check it inabLet-binders to substitute*Let-binders where substitution takes place)Expression where substitution takes placecd Property testTest whether to lift or inline True: inline False: liftefName of the functionTerm bound to the function6Name with a proper unique and the type of the functionghijklmn#Name of the caller of this function TyCon cacheSubject of the case-compositiono"Lens into previous specialisations$Lens into the specialisation history"Lens into the specialisation limitp"Lens into previous specialisations Lens into specialisation history"Lens into the specialisation limit Original term@Function part of the term, split into root and applied argumentsArgument to specialize onq!QRSTUVWXYZ[\]^_`abcdefghijklmnopq!QRSTUVWXYZ[\]^_`abcdefghijklmnopq!QRSTUVWXYZ[\]^_`abcdefghijklmnopq#(C) 2015-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>None$rReplace an application of the CLaSH.Sized.Vector.zipWith) primitive on vectors of a known length n3, by the fully unrolled recursive "definition" of CLaSH.Sized.Vector.zipWithsReplace an application of the CLaSH.Sized.Vector.map) primitive on vectors of a known length n3, by the fully unrolled recursive "definition" of CLaSH.Sized.Vector.maptReplace an application of the CLaSH.Sized.Vector.imap) primitive on vectors of a known length n3, by the fully unrolled recursive "definition" of CLaSH.Sized.Vector.imapuReplace an application of the CLaSH.Sized.Vector.traverse#) primitive on vectors of a known length n3, by the fully unrolled recursive "definition" of CLaSH.Sized.Vector.traverse#vCreate the traversable vectore.g. for a length '2' input vector, we get *(:>) <$> x0 <*> ((:>) <$> x1 <*> pure Nil)wReplace an application of the CLaSH.Sized.Vector.foldr) primitive on vectors of a known length n3, by the fully unrolled recursive "definition" of CLaSH.Sized.Vector.foldrxReplace an application of the CLaSH.Sized.Vector.fold) primitive on vectors of a known length n3, by the fully unrolled recursive "definition" of CLaSH.Sized.Vector.foldyReplace an application of the CLaSH.Sized.Vector.dfold) primitive on vectors of a known length n3, by the fully unrolled recursive "definition" of CLaSH.Sized.Vector.dfoldzReplace an application of the CLaSH.Sized.Vector.head) primitive on vectors of a known length n4, by a projection of the first element of a vector.{Replace an application of the CLaSH.Sized.Vector.tail) primitive on vectors of a known length n+, by a projection of the tail of a vector.|Replace an application of the CLaSH.Sized.Vector.last) primitive on vectors of a known length n3, by a projection of the last element of a vector.}Replace an application of the CLaSH.Sized.Vector.init) primitive on vectors of a known length n+, by a projection of the init of a vector.~Replace an application of the CLaSH.Sized.Vector.(++)) primitive on vectors of a known length n3, by the fully unrolled recursive "definition" of CLaSH.Sized.Vector.(++)Replace an application of the CLaSH.Sized.Vector.unconcat) primitive on vectors of a known length n3, by the fully unrolled recursive "definition" of CLaSH.Sized.Vector.unconcatReplace an application of the CLaSH.Sized.Vector.transpose) primitive on vectors of a known length n3, by the fully unrolled recursive "definition" of CLaSH.Sized.Vector.transposeReplace an application of the CLaSH.Sized.Vector.dtfold) primitive on vectors of a known length n3, by the fully unrolled recursive "definition" of CLaSH.Sized.Vector.dtfoldReplace an application of the CLaSH.Sized.RTree.tdfold& primitive on trees of a known depth n3, by the fully unrolled recursive "definition" of CLaSH.Sized.RTree.tdfoldrLength of the vector(s)Type of the lhs of the functionType of the rhs of the function"Type of the result of the functionThe zipWith'd functionsThe 1st vector argumentThe 2nd vector argumentsLength of the vectorArgument type of the functionResult type of the functionThe map'd functionThe map'd over vectortLength of the vectorArgument type of the functionResult type of the functionThe imap'd functionThe imap'd over vectoruLength of the vector#Element type of the argument vectorThe type of the applicative!Element type of the result vectorThe  Applicative dictionaryThe function to traverse withThe argument vectorv Vec tconNil conCons con) term* term termb tyLength of the vectorElements of the vectorwLength of the vector#Element type of the argument vectorThe function to fold withThe starting valueThe argument vectorxLength of the vector#Element type of the argument vectorThe function to fold withThe argument vectoryLength of the vector#Element type of the argument vectorFunction to fold withStarting valueThe vector to foldzLength of the vectorElement type of the vectorThe argument vector{Length of the vectorElement type of the vectorThe argument vector|Length of the vectorElement type of the vectorThe argument vector}Length of the vectorElement type of the vectorThe argument vector~Length of the LHS argLenght of the RHS argElement type of the vectorsThe LHS argumentThe RHS argumentLength of the result vector+Length of the elements of the result vector Element typeArgument vectorLength of the result vector+Length of the elements of the result vector Element typeArgument vectorLength of the vector#Element type of the argument vector!Function to convert elements with!Function to combine branches withThe vector to foldDepth of the tree!Element type of the argument tree!Function to convert elements with!Function to combine branches withThe tree to foldDepth of the tree Element type Result typeElementrstuvwxyz{|}~rstuvwxyz{|}~rstuvwxyz{|}~#(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>None[ADetermine if a function is already inlined in the context of the  NetlistMonad(Specialize under the Normalization MonadDetermine if a term is closed)Determine if a term represents a constant=Create a call graph for a set of global binders, given a rootIDetermine the sets of recursive components given the edges of a callgraph Function we want to inline1Function in which we want to perform the inliningFunction we want to inline1Function in which we want to perform the inlining.List of functions that should not be inspectedGlobal bindersRoot of the call graph "(calling function,[called function)]Original BindersDependency GraphRecursive blockLambda-dropped BindersDependency GraphRecursive blockRecursive block dominatorOriginal BindersRecursive block dominatorRecursive block dominator rootBlock sank binder   #(C) 2015-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>None$24JL  Test if a  collected from an expression indicates that application of a global binder is disjoint: occur in separate branches of a case-expression.7Test if all elements in a list are equal to each other.Collect s for (potentially) disjoint applications of globals out of an expression. Also substitute truly disjoint applications of globals by a reference to a lifted out application.Collect s for (potentially) disjoint applications of globals out of a list of application arguments. Also substitute truly disjoint applications of globals by a reference to a lifted out application.Collect s for (potentially) disjoint applications of globals out of a list of alternatives. Also substitute truly disjoint applications of globals by a reference to a lifted out application.Collect s for (potentially) disjoint applications of globals out of a list of let-bindings. Also substitute truly disjoint applications of globals by a reference to a lifted out application.Given a case-tree corresponding to a disjoint interesting "term-in-a- function-position", return a let-expression: where the let-binding holds a case-expression selecting between the uncommon arguments of the case-tree, and the body is an application of the term applied to the common arguments of the case tree, and projections of let-binding corresponding to the uncommon argument positions.{Create a single selector for all the representable uncommon arguments by selecting between tuples. This selector is only (j) created when the number of representable uncommmon arguments is larger than one, otherwise it is not (').It also returns:<For all the non-representable uncommon arguments: a selectorFor all the representable uncommon arguments: a projection out of the tuple created by the larger selector. If this larger selector does not exist, a single selector is created for the single representable uncommon argument.aCreate a list of arguments given a map of positions to common arguments, and a list of argumentsWCreate a case-expression that selects between the uncommon arguments given a case-tree_Determine if a term in a function position is interesting to lift out of of a case-expression.]This holds for all global functions, and certain primitives. Currently those primitives are:$All non-power-of-two multiplications<All division-like operations with a non-power-of-two divisorSSubstitution of (applications of) a global binder by a reference to a lifted term.#List of already seen global bindersThe expressionSSubstitution of (applications of) a global binder by a reference to a lifted term.#List of already seen global bindersThe list of argumentsSSubstitution of (applications of) a global binder by a reference to a lifted term.#List of already seen global bindersThe subject termThe list of alternativesSSubstitution of (applications of) a global binder by a reference to a lifted term.#List of already seen global bindersThe list let-bindingsCurrent free variables.5Case-tree of arguments belonging to the applied term.Types of the argumentsCurrent position$map from position to common argument$(projections for) uncommon argumentsType of the alternatives"DataCon to pack multiple argumentsTypes of the argumentsCaseTree of argumentsin scope EvaluatorTerm in function position Arguments#(C) 2015-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>NoneInitial state for state monad&Location for the primitive definitionsmName of backend, used for directory to put output files in. Should be | constant function / ignore argument."File extension for target langauge!Get the set of types out of state$Generate HDL for a Netlist componentHGenerate a HDL package containing type definitions for the given HWTypes-Convert a Netlist HWType to a target HDL type<Convert a Netlist HWType to an HDL error value for that type9Convert a Netlist HWType to the root of a target HDL typeHCreate a signal declaration from an identifier (Text) and Netlist HWType*Create a generative block statement marker4Turn a Netlist Declaration to a HDL concurrent block/Turn a Netlist expression into a HDL expressionBit-width of IntWordIntegerConvert to a bit-vectorConvert from a bit-vector'Synthesis tool we're generating HDL for mkBasicId setModName setSrcSpan getSrcSpan#(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>None$:[!Determine if the number of normalliteralqfunction inputs of a blackbox context at least matches the number of argument that is expected by the template.uUpdate all the symbol references in a template, and increment the symbol counter for every newly encountered symbol.*Get the name of the clock of an identifierXRender a blackbox given a certain context. Returns a filled out template and a list of hidden9 inputs that must be added to the encompassing component. Render a single template elementFill out the template corresponding to an output/input assignment of a component instantiation, and turn it into a single identifier so it can be used for a new blackbox context.pGive a context and a tagged hole (of a template), returns part of the context that matches the tag of the hole.Blackbox to verifyTemplate to check againstBlackbox template Context used to fill in the hole#(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>NoneL2Generate the context for a BlackBox instantiation.Create an template instantiation text and a partial blackbox content for an argument term, given that the term is a function. Errors if the term is not a function>Instantiate symbols references with a new symbol and increment symbol counter instantiateSym :: BlackBoxTemplate -> NetlistMonad BlackBoxTemplate instantiateSym l = do i <- Lens.use varCount ids <- Lens.use seenIds let (l',(ids',i')) = setSym ids i l varCount .= i' seenIds .= ids' return l'5Identifier binding the primitive/blackbox application/Arguments of the primitive/blackbox applicationLHS of the original let-binder&Put BlackBox expression in parenthesis(Treat BlackBox expression as declarationId to assign the result toBIdentifier binding the encompassing primitive/blackbox applicationThe function argument term#(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>NoneL9UGenerate an expression for a DataCon application occurring on the RHS of a let-binder:FGenerate an expression for a term occurring on the RHS of a let-binder;3Generate a component for a given function (caching)EGenerate a hierarchical netlist out of a set of global binders with  topEntity at the top.0Run a NetlistMonad action in a given environment)Generate a component for a given function0Generate a list of Declarations for a let-binderXGenerate a list of Declarations for a let-binder where the RHS is a function application 9#HWType of the LHS of the let-binderId to assign the result toApplied DataConDataCon Arguments@Returned expression and a list of generate BlackBox declarations:(Treat BlackBox expression as declarationId to assign the result to!Type of the LHS of the let-binder Term to convert to an expression@Returned expression and a list of generate BlackBox declarations;Name of the function$Starting value of the unique counter Global bindersPrimitive definitions TyCon cache#Hardcoded Type -> HWType translator Symbol count"Name of the module containing the  topEntitySet of collected data-filesIntWordInteger bit-widthvalid identifiers Seen components  Name of the  topEntity Global bindersPrimitive Definitions TyCon cache"Hardcode Type -> HWType translator"Name of the module containing the  topEntitySet of collected data-filesIntWordInteger bit-widthvalid identifiersSeen components  Action to runName of the functionCorresponding term$Starting value of the unique counterLHS of the let-binderRHS of the let-binderLHS of the let-binderName of the applied functionFunction arguments 9:; ;:9 9:; #(C) 2015-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>None!"L ICreate a wrapper around a component, potentially initiating clock sources(Create extra input ports for the wrapper)Create extra output ports for the wrapperGenerate input port mappings$Create a Vector chain for a list of s#Create a RTree chain for a list of sGenerate output port mappingsCreate clock generatorsCreate a single clock generatorCreate a single clock pathGenerate resetsYGenerate a reset synchroniser that synchronously de-asserts an asynchronous reset signalThe  NetListMonad is a transformer stack with  at the bottom. So we must use .TopEntity specifications"Name of the module containing the  topEntityIntWordInteger bit-widthEntity to wrap!#(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>None$"Specialize functions on their type8Specialize functions on their non-representable argument@Lift the let-bindings out of the subject of a Case-decompositionVMove a Case-decomposition from the subject of a Case-decomposition to the alternatives\Inline function with a non-representable result if it's the subject of a Case-decompositionSpecialize a Case-decomposition (replace by the RHS of an alternative) if the subject is (an application of) a DataCon; or if there is only a single alternative that doesn't reference variables bound by the pattern.lBring an application of a DataCon or Primitive in ANF, when the argument is is considered non-representablekEnsure that top-level lambda's eventually bind a let-expression of which the body is a variable-reference.Remove unused let-bindingsUInline let-bindings when the RHS is either a local variable reference or is constantInline nullary/closed functionsInline small functions4Specialise functions on arguments which are constant7Propagate arguments of application inwards; except for ' where the argument becomes let-bound.3Flatten ridiculous case-statements generated by GHC+For case-statements in haskell of the form: Rf :: Unsigned 4 -> Unsigned 4 f x = case x of 0 -> 3 1 -> 2 2 -> 1 3 -> 0 #GHC generates Core that looks like: f = (x :: Unsigned 4) -> case x == fromInteger 3 of False -> case x == fromInteger 2 of False -> case x == fromInteger 1 of False -> case x == fromInteger 0 of False -> error "incomplete case" True -> fromInteger 3 True -> fromInteger 2 True -> fromInteger 1 True -> fromInteger 0 ]Which would result in a priority decoder circuit where a normal decoder circuit was desired.;This transformation transforms the above Core to the saner: f = (x :: Unsigned 4) -> case x of _ -> error "incomplete case" 0 -> fromInteger 3 1 -> fromInteger 2 2 -> fromInteger 1 3 -> fromInteger 0 lTurn an expression into a modified ANF-form. As opposed to standard ANF, constants do not become let-bound.9Eta-expand top-level lambda's (DON'T use in a traversal!)Turn a normalized recursive function, where the recursive calls only pass along the unchanged original arguments, into let-recursive function. This means that all recursive calls are replaced by the same variable reference as found in the body of the top-level let-expression.+Inline a function with functional argumentsDSimplified CSE, only works on let-bindings, works from top to bottomReplace primitives by their "definition" if they would lead to let-bindings with a non-representable type when a function is in ANF. This happens for example when CLaSH.Size.Vector.map consumes or produces a vector of non-representable elements.Basically what this transformation does is replace a primitive the completely unrolled recursive definition that it represents. e.g. 8zipWith ($) (xs :: Vec 2 (Int -> Int)) (ys :: Vec 2 Int)is replaced by: let (x0 :: (Int -> Int)) = case xs of (:>) _ x xr -> x (xr0 :: Vec 1 (Int -> Int)) = case xs of (:>) _ x xr -> xr (x1 :: (Int -> Int)( = case xr0 of (:>) _ x xr -> x (y0 :: Int) = case ys of (:>) _ y yr -> y (yr0 :: Vec 1 Int) = case ys of (:>) _ y yr -> xr (y1 :: Int = case yr0 of (:>) _ y yr -> y in (($) x0 y0 :> ($) x1 y1 :> Nil)3Currently, it only handles the following functions: CLaSH.Sized.Vector.mapCLaSH.Sized.Vector.zipWithCLaSH.Sized.Vector.traverse#CLaSH.Sized.Vector.foldrCLaSH.Sized.Vector.foldCLaSH.Sized.Vector.dfoldCLaSH.Sized.Vector.(++)CLaSH.Sized.Vector.headCLaSH.Sized.Vector.tailCLaSH.Sized.Vector.unconcatCLaSH.Sized.Vector.transposeCLaSH.Sized.Vector.replicateCLaSH.Sized.Vector.dtfoldaThis transformation lifts applications of global binders out of alternatives of case-statements.e.g. It converts: /case x of A -> f 3 y B -> f x x C -> h x into: let f_arg0 = case x of {A -> 3; B -> x} f_arg1 = case x of {A -> y; B -> x} f_out = f f_arg0 f_arg1 in case x of A -> f_out B -> f_out C -> h x !!"#(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>NoneNormalisation transformation+Topdown traversal, stops upon first success##(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>None-Run a NormalizeSession in a given environment7Rewrite a term according to the provided transformation;Check if the call graph (second argument), starting at the topEnity (first argument) is non-recursive. Returns the list of normalized terms if call graph is indeed non-recursive, errors otherwise.`Perform general "clean up" of the normalized (non-recursive) function hierarchy. This includes:6Inlining functions that simply "wrap" another function  Level of debug messages to print UniqueSupplyGlobal Binders#Hardcoded Type -> HWType translator TyCon cacheTuple TyCon cache%Hardcoded evaluator (delta-reduction)Primitive Definitions=Map telling whether a components is part of a recursive group NormalizeSession to runTransformation to applyTerm to transform  topEntityList of normalized bindersVisitedGlobal bindersRoot of the call graph            $#(C) 2013-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>None gGenerate a HDL testbench for a component given a set of stimuli and a set of matching expected outputs  Primitives Global binders Stimuli Expected output "Name of the module containing the  topEntity Set of collected data-filesComponent to generate TB for   %#(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij <christiaan.baaij@gmail.com>NoneT 7Create a set of target HDL files for a set of functions(Pretty print Components to HDL DocumentsPrepares the directory for writing HDL files. This means creating the dir if it does not exist and removing all existing .hdl files from it.(Writes a HDL file to the given directory Set of functions Primitive / BlackBox Definitions TyCon cacheTuple TyCon cache Hardcoded [ -> r translator%Hardcoded evaluator (delta-reduction)-topEntity bndr + (maybe) TopEntity annotationtestInput bndr expectedOutput bndr 5Debug information level for the normalization processBackendList of componentsRemove existing HDL files File extension of the HDL files.   012013456789:;<=>?@ABCDEFGHIJKLMNONPQRSTUVWXYZ[\]^__`abcdefghijklmnopqrstuvw\xyz{|}~                                                                 ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ep      !"#$%&'()**+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~PM               !!!!!!!!!!!!!!!!!!!!!!!!!"" " " " # #############$%%%%% %!&"&#&$&%'&'''(')'*'+','-'.'/'0'1'2'3'456789:89;89<89=8>?8@A8@B8)*8)+8)C8DE/FGHIJKLMNOPQRSTUVWXYZ[\ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~   8989568!!!!!!!!$$$$$$$clash-lib-0.7-83ZNOjNIImPHkX9dasXVwoCLaSH.Driver.Types CLaSH.UtilCLaSH.Primitives.TypesCLaSH.Primitives.UtilCLaSH.Netlist.IdCLaSH.Netlist.BlackBox.TypesCLaSH.Netlist.BlackBox.ParserCLaSH.Core.TyConCLaSH.Core.TermCLaSH.Core.TypeCLaSH.Core.VarCLaSH.Core.DataConCLaSH.Core.TysPrimCLaSH.Core.LiteralCLaSH.Core.SubstCLaSH.Core.FreeVarsCLaSH.Core.PrettyCLaSH.Core.UtilCLaSH.Netlist.TypesCLaSH.Rewrite.TypesCLaSH.Normalize.TypesCLaSH.Rewrite.Combinators CLaSH.NetlistCLaSH.Netlist.UtilCLaSH.Rewrite.Util#CLaSH.Normalize.PrimitiveReductionsCLaSH.Normalize.UtilCLaSH.Normalize.DEC CLaSH.BackendCLaSH.Netlist.BlackBox.UtilCLaSH.Netlist.BlackBoxCLaSH.Driver.TopWrapperCLaSH.Normalize.TransformationsCLaSH.Normalize.StrategyCLaSH.NormalizeCLaSH.Driver.TestbenchGen CLaSH.Driver&Unbound.Generics.LocallyNameless.ExtraPaths_clash_lib GHC.Extra Control.Arrowfirstsecond Data.List partition mapAccumLData.Aeson.ExtraghcSrcLoc noSrcSpanSrcSpan"lens-4.15.1-Dv4JOnzKlV9HUqfM5UXTqlControl.Lens.TH makeLenses MonadUnique getUniqueMcurLoc makeCached makeCachedT3 makeCachedT3S liftStatefirstMsecondMcombineMtraceIf partitionM mapAccumLMdot ifThenElse<:> indexMaybe indexNote splitAtListclashLibVersionflogBaseclogBase$fMonadUniqueStateT PrimitiveBlackBoxnamelibraryimports qsysIncludetemplateprimTypePrimMap$fFromJSONPrimitive$fShowPrimitivegeneratePrimMap mkBasicId'stripDollarPrefixesHdlSynVivadoOtherDeclElementCDOILSymClkRstTypTypMErrTypElemCompNameQSysIncludeName IndexTypeSizeLengthDepthFilePathGenIFAndIW64BVIsLitIsVarVarsGenSymSigDBlackBoxTemplate $fEqHdlSyn $fShowHdlSyn $fReadHdlSyn $fShowElement $fShowDeclrunParse TyConNameTyConTmNameTermKiNameTyNameKindType mkTyConTyTyVarIdVarvarNamevarKindvarType modifyVarName$fSubstTypeVar$fSubstTermVar $fAlphaVar$fEqVar $fShowVar $fGenericVar $fNFDataVarDcNameConTagDataConMkDatadcNamedcTagdcType dcUnivTyVars dcExtTyVarsdcArgTysdataConInstArgTys$fSubstaDataCon$fAlphaDataCon $fOrdDataCon $fEqDataCon $fShowDataCon$fGenericDataCon$fNFDataDataCon AlgTyConRhs DataTyConNewTyCondataConsdataCon ntEtadRhsAlgTyConFunTyCon PrimTyConSuperKindTyCon tyConName tyConKind tyConArityalgTcRhs tyConSubst mkKindTyConisTupleTyConLike tyConDataCons $fAlphaTyCon $fOrdTyCon $fEqTyCon $fShowTyCon$fShowAlgTyConRhs$fGenericAlgTyConRhs$fNFDataAlgTyConRhs$fAlphaAlgTyConRhs$fGenericTyCon $fNFDataTyConliftedTypeKind typeNatKindtypeSymbolKind intPrimTy integerPrimTy charPrimTy stringPrimTy voidPrimTy wordPrimTy int64PrimTy word64PrimTy floatPrimTy doublePrimTy tysPrimMapLiteralIntegerLiteral IntLiteral WordLiteral Int64Literal Word64Literal StringLiteral FloatLiteral DoubleLiteral CharLiteral literalType$fSubstaLiteral$fAlphaLiteral $fEqLiteral $fOrdLiteral $fShowLiteral$fGenericLiteral$fNFDataLiteralPatDataPatLitPat DefaultPat LetBindingDataPrimLamTyLamAppTyAppLetrecCase$fSubstTypeTerm$fSubstTermTerm$fSubstTermPat$fSubstTypePat $fAlphaTerm $fOrdTerm$fEqTerm$fEqPat $fShowPat $fGenericPat $fNFDataPat $fAlphaPat $fShowTerm $fGenericTerm $fNFDataTermsubstTyssubstTy substKindWith substTyInTm substTysinTmsubstTmsubstTms KindOrTypeLitTyNumTySymTyConstTyArrowTypeViewFunTyTyConApp OtherTypeVarTyForAllTyAppTytyViewcoreViewmkFunTy mkTyConAppsplitTyConAppMtypeKindisPolyTy splitFunTy splitFunTyssplitFunForallTysplitCoreFunForallTy isPolyFunTyisPolyFunCoreTyisFunTy applyFunTyapplyTy findFunSubstreduceTypeFamily undefinedTy $fOrdType$fEqType$fSubstTypeType$fSubstTermType$fSubstaConstTy $fSubstaLitTy $fAlphaType $fShowLitTy$fGenericLitTy $fNFDataLitTy $fAlphaLitTy $fShowType $fGenericType $fNFDataType $fShowConstTy$fGenericConstTy$fNFDataConstTy$fAlphaConstTy$fShowTypeView typeFreeVars termFreeIdstermFreeTyVarsPrettypprpprPrecshowDoc $fPrettyPat$fPrettyLiteral$fPrettyDataCon $fPrettyVar $fPrettyTerm $fPrettyLitTy $fPrettyTyCon $fPrettyVar0 $fPrettyType $fPretty(,) $fPretty[] $fPrettyName $fEqTypePrec $fOrdTypePrecDeltaGammatermType collectArgs collectBndrsapplyTypeToArgspatIdsmkTyVarmkId mkAbstractionmkTyLamsmkLamsmkAppsmkTmAppsmkTyAppsisFun isPolyFunisLamisLetisVarisConisPrimidToVarvarToIdtermSizemkVec appendToVec extractElems extractTElemsmkRTree isSignalType tyNatSizeSyncExprSyncIdentifierBlackBoxContextContextbbResultbbInputs bbFunctions bbQsysIncNameBitHUZNumLitBitLitBoolLitVecLit StringLitExpr IdentifierDataTag BlackBoxEModifierIndexedDC VecAppend RTreeAppend PortDirectionInOut Declaration AssignmentCondAssignmentInstDecl BlackBoxDNetDeclHWTypeVoidStringBool BitVectorIndexSignedUnsignedVectorRTreeSumProductSPClockReset Component componentName hiddenPortsinputsoutputs declarations NetlistState _bindings_varEnv _varCount _components _primitives_typeTranslator_tcCache _curCompNm _dataFiles _intWidth _mkBasicIdFn_seenIds _seenComps_componentNames NetlistMonad runNetlistemptyBBContext$fNFDataDeclaration$fNFDataHWType$fHashableHWType$fNFDataComponent $fEqHWType $fOrdHWType $fShowHWType$fGenericHWType$fShowPortDirection$fShowModifier$fEqBit $fShowBit $fShowExpr$fShowBlackBoxContext$fShowDeclaration$fShowComponent$fFunctorNetlistMonad$fMonadNetlistMonad$fApplicativeNetlistMonad$fMonadWriterNetlistMonad$fMonadStateNetlistMonad$fFreshNetlistMonad$fMonadIONetlistMonadbindingscomponentNames components curCompNm dataFilesintWidth mkBasicIdFn primitives seenCompsseenIdstcCachetypeTranslatorvarCountvarEnv RewriteState_transformCounter _uniqSupply_curFun _nameCounter_extra CoreContextAppFunAppArgTyAppCLetBodyLamBody TyLamBodyCaseAlt CaseScrut$fEqCoreContext$fShowCoreContext RewriteEnv _dbgLevel _tupleTcCache _evaluator _allowZero DebugLevel DebugNone DebugFinal DebugName DebugAppliedDebugAllcurFunextra nameCountertransformCounter uniqSupply$fEqDebugLevel$fOrdDebugLevel$fReadDebugLevelRewrite Transform RewriteMonadRrunR allowZerodbgLevel evaluator tupleTcCache$fMonadFixRewriteMonad#$fMonadReaderRewriteEnvRewriteMonad$fMonadWriterAnyRewriteMonad$fMonadUniqueRewriteMonad$fFreshRewriteMonad$$fMonadStateRewriteStateRewriteMonad$fMonadRewriteMonad$fApplicativeRewriteMonad$fFunctorRewriteMonadCLaSHException CLaSHOptsopt_inlineLimit opt_specLimitopt_inlineBelow opt_dbgLevel opt_cleanhdl opt_intWidth opt_hdlDir opt_hdlSynopt_errorExtraopt_floatSupport opt_allowZero BindingMap$fExceptionCLaSHException$fShowCLaSHExceptionNormalizeState _normalized_specialisationCache_specialisationHistory_specialisationLimit_inlineHistory _inlineLimit _inlineBelow_recursiveComponents NormRewriteNormalizeSessionNormalizeMonad inlineBelow inlineHistory inlineLimit normalizedrecursiveComponentsspecialisationCachespecialisationHistoryspecialisationLimitallR>->>-!->topdownRunsafeTopdownR bottomupRunsafeBottomupR!->>-!repeatRwhenR bottomupWhenRmkDcApplicationmkExpr genComponent mkBasicIdsplitNormalizedunsafeCoreTypeToHWTypeunsafeCoreTypeToHWTypeMcoreTypeToHWTypeMsynchronizedClkcoreTypeToHWTypemkADT isRecursiveTyrepresentableTypetypeSizeconSize typeLength termHWType termHWTypeMmkUniqueNormalizedmkUniquemkUniqueIdentifier appendToNamepreserveVarEnv dcToLiteral zoomExtraapply runRewriterunRewriteSession setChangedchanged contextEnvclosestLetBinder mkDerivedNamemkEnv mkTmBinderFor mkBinderFor mkInternalVar inlineBinders isJoinPointIn tailCalls isVoidWrappersubstituteBinders localFreeIdsinlineOrLiftBinders liftBinding mkFunction addGlobalBindcloneVar isLocalVarisUntranslatableisUntranslatableTypeisLambdaBodyCtxmkWildValBindermkSelectorCase specialise specialise'specArgBndrsAndVars reduceZipWith reduceMap reduceImapreduceTraverse mkTravVec reduceFoldr reduceFold reduceDFold reduceHead reduceTail reduceLast reduceInit reduceAppendreduceUnconcatreduceTransposereduceReplicate reduceDTFold reduceTFoldreduceTReplicatealreadyInlined addNewInlinespecializeNormisClosed isConstantisRecursiveBndr callGraphmkRecursiveComponentslambdaDropPrep lambdaDrop dominator blockSink isDisjointcollectGlobalsmkDisjointGroup $fEqCaseTree$fShowCaseTree$fFunctorCaseTree$fFoldableCaseTreeBackend initBackendprimDir extension extractTypesgenHDL mkTyPackagehdlTypehdlTypeErrValue hdlTypeMarkhdlSiggenStmtinstexpriwWidthtoBVfromBVhdlSyn setModName setSrcSpan getSrcSpanModNameverifyBlackBoxContextextractLiteralssetSym setCompName setClocksfindAndSetDataFilesrenderFilePath clkSyncIdrenderBlackBox renderElem parseFailsyncIdToSyncExprlineToIdentifier lineToType renderTagprettyBlackBox prettyElem usedArgumentsmkBlackBoxContextprepareBlackBox mkArgument mkPrimitive mkFunInputinstantiateCompNamecollectFilePaths genNetlistrunNetlistMonadgenNames genComponentTgenComponentNamemkDeclarationsmkFunApp toSimpleVar mkTopWrapperextraInextraOutmkInput mkVectorChain mkRTreeChainmkOutputmkClocks stringToVarmkClock mkClockDecl clockPortsmkResets genSyncResetunsafeRunNetlistinlineOrLiftNonReptypeSpec nonRepSpeccaseLetcaseCase inlineNonRepcaseCon nonRepANFtopLetdeadCoderemoveUnusedExprbindConstantVar inlineClosed inlineSmall constantSpecappPropcaseFlatmakeANFetaExpansionTL recToLetRecinlineHO simpleCSE reduceConstreduceNonRepPrimdisjointExpressionConsolidation normalizationconstantPropgation topdownSucR innerMost applyManyCallTreeCLeafCBranchrunNormalization normalize normalize' rewriteExprcheckNonRecursive cleanupGraph mkCallTree stripArgs flattenNodeflattenCallTreecallTreeToList genTestBench generateHDLparsePrimitive createHDL prepareDirwriteHDL copyDataFiles $fSubstbText $fAlphaText$fHashableName $fSubstbRatiocatchIOversionbindirlibdir dynlibdirdatadir libexecdir sysconfdir getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileNameghc-prim GHC.TypesTruebaseGHC.BaseNothing Applicativepure<*> Data.Functor<$> Control.Monad<=<>=>*** Data.FunctionondecodeAndReport EncodedString UserStringzEncode encodeDigitChencodeCh unencodedChar maybeTuple countCommas pBlackBoxDpElementpTextpTagDpDeclpOutputpInputpTagE pBracketspTokenWS pBlackBoxEpElemEpSigDParsertySuperKindTyConNameliftedTypeKindTyConNametypeNatKindTyConNametypeSymbolKindTyConName tySuperKindtcliftedTypeKindtc typeNatKindtctypeSymbolKindtc intPrimTc integerPrimTc charPrimTc stringPrimTc voidPrimTc wordPrimTc int64PrimTc word64PrimTc floatPrimTc doublePrimTc tySuperKindintPrimTyConNameintegerPrimTyConNamestringPrimTyConNamecharPrimTyConNamevoidPrimTyConNamewordPrimTyConNameint64PrimTyConNameword64PrimTyConNamefloatPrimTyConNamedoublePrimTyConName liftedPrimTCnewTyConInstRhs isSuperKind splitTyAppM kindFunResult funSubstsfunSubstlitViewTypePrecTopPrecFunPrec TyConPrec BindingSite LambdaBindCaseBindLetBindnoPrecopPrecappPrec prettyParenpprTopLevelBndrdcolonperiodrarrow pprPrecLam pprPrecTyLam pprPrecApp pprPrecTyApp pprPrecLetrec pprPrecCase pprPrecAltpprBndr maybeParenpprType pprParendTypeppr_type pprForAllType pprSigmaType pprForAll pprTvBndrpprKindpprTcApppprTypeNameApp pprInfixApp pprPrefixApp pprPrefixVar pprInfixVar pprArrowChain isSymNameisLexSym isLexConSym isLexVarSym startsConSym startsVarSym isSymbolASCII-unbound-generics-0.3.1-CMamE7Be0MxLT8mDohTkmt&Unbound.Generics.LocallyNameless.FreshFreshfmapCaseTreeallEqualcollectGlobalsArgscollectGlobalsAltscollectGlobalsLbsdisJointSelProjJustmkDJArgsgenCaseinterestingToLiftLeafLBBranch removeEmptyisCommonIO GHC.IO.UnsafeunsafePerformIO NormRewriteW caseOneAlt collectFlatisEq isFromInt collectANFreduceBindersFix reduceBindersgenClockgenReset genFinishgenDone genStimuli genVerifier