h$%r      !"#$%&'() * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j klmnopqrstuvwxyz{|}~                                                                                                                                                                                                                                                                               !!!!!!!!!!!!!!!!!!!!!!!!!!!!""""""""""""""""""""""""""""""""""""""""""""""                                                                                                                                                                                                                        # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # $ $ $ $ $ $ $ $ $ $ % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % & & ' ' ' ' ' ' ' ' ( ( ( ( ( ( ) * + + , , , , , , , , , - - . / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 . . . . . . . . . . . . . . . . . . . . . .     3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 & & & & 6 6 6 6 6 6 6 6 6 6 666++++++++++777777777,,,,,,,,888888888888888889999999999999::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<<None&/02356789;<%( clash-lib0Performs trace when first argument evaluates to #(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij  Safe-Inferred &/02356789;<%(C) 2018, QBayLogicBSD2 (see the file LICENSE)-Christiaan Baaij  Safe-Inferred&/02356789;<)$ clash-libSee:  1https://en.wikipedia.org/wiki/Topological_sorting. This function errors if edges mention nodes not mentioned in the node list or if the given graph contains cycles.% clash-libSame as `reverse (topSort nodes edges)` if alternative representations are considered the same. That is, topSort might produce multiple answers and still deliver on its promise of yielding a topologically sorted node list. Likewise, this function promises one of those lists in reverse, but not necessarily the reverse of topSort itself.$ clash-libNodes clash-libEdges clash-lib+Error message or topologically sorted nodes% clash-libNodes clash-libEdges clash-lib%Reversely, topologically sorted nodes$%$%>(C) 2019, QBayLogic B.V. 2013, Nikita VolkovBSD2 (see the file LICENSE)%QBayLogic B.V. None&/02356789;<*a&& None&/02356789;<+) clash-lib A variant of Pretty that is not polymorphic on the type of annotations. This is needed to derive instances from Clash's pretty printer (PrettyPrec), which annotates documents with Clash-specific information and, therefore, fixes the type of annotations.)*+,-./+,-.)*/ None &/02356789;<6(0 clash-libSet of things that have a 5=Invariant: they keys in the map are the uniques of the values1 clash-libMap indexed by a 2 key6 clash-lib The empty map7 clash-lib Map with a single key-value pair8 clash-libCheck whether the map is empty9 clash-libExtend the map with a new key-value pair. If the key already exists in the associated value will be overwritten: clash-libExtend the map with a new key-value pair. If the key already exists in the associated value will be combined with the new value using the function provided; clash-libExtend the map with a list of key-value pairs. Positions with existing keys will be overwritten with the new values< clash-libLook up a value in the map= clash-libLike =,, but errors out when the key is not present> clash-lib!Check whether a key is in the map? clash-libCheck whether an element exists in the uniqmap based on a given 5@ clash-lib%Check whether a key is not in the mapA clash-lib;Derive a map where all the elements adhere to the predicateB clash-lib$Remove a key-value pair from the mapC clash-lib-Remove a list of key-value pairs from the mapD clash-lib!A (left-biased) union of two mapsE clash-libA union of two maps, key-value pairs with the same key will be merged using the given functionF clash-lib#Get the difference between two mapsG clash-lib*Convert a list of key-value pairs to a mapH clash-lib*Convert a map to a list of key-value pairsI clash-lib)Extract the elements of a map into a listJ clash-lib,Apply a function to every element in the mapK clash-lib%Extract the keys of a map into a listL clash-libApply a function to every element in the map. When the function returns $, the key-value pair will be removedM clash-lib2Right-fold over a map using both the key and valueN clash-lib?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[,523418<=679:;BCDEFJLA>@?MNIKGHZ0VOPQRWSTU[YX= Safe-Inferred&/02356789;<9 clash-libMonadic version of >? clash-lib&Applicative version of 'GHC.Types.(:)' clash-libSafe indexing, returns a  if the index does not exist clash-lib1Return number of occurrences of an item in a list clash-libZip two lists of equal lengthNB Errors out for a 1 compiler when the two lists are not of equal length clash-libHaystack clash-lib"Times needle was found in haystack5@ Safe-Inferred&/02356789;<>:A(C) 2019, QBayLogic B.VBSD2 (see the file LICENSE)$QBayLogic B.V None&/02356789;<; Safe-Inferred&/02356789;<>;8 klmnopqrstuvwxyz{|}~8klmnopqrstuvwxyz{|}~ ~6BNone&/02356789;<<C(C) 2017, Google Inc.BSD2 (see the file LICENSE)-Christiaan Baaij None&/02356789;<>D(C) 2017, Google Inc.BSD2 (see the file LICENSE)-Christiaan Baaij None&/02356789:;<?N(C) 2017, Google Inc.BSD2 (see the file LICENSE)-Christiaan Baaij None &/02356789:;<>?(C) 2012-2016, University of Twente, 2017-2018, Google Inc.BSD2 (see the file LICENSE)-Christiaan Baaij None%&'(/02356789:;<Cf  clash-lib Type variable clash-lib Term variable clash-libVariables in CoreHW clash-libConstructor for type variables clash-libConstructor for term variables clash-lib6Invariant: forall x . varUniq x ~ nameUniq (varName x) clash-lib>Interal version of Clash.Annotations.SynthesisAttributes.Attr.Needed because Clash.Annotations.SynthesisAttributes.Attr uses the Symbol kind for names, which do not have a term-level representation clash-libChange the name of a variable clash-libMake a type variable clash-libMake a term variableE Safe-Inferred&/02356789;<D#(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij None &/02356789;<>K1  clash-lib(A class that can generate unique numbers clash-libGet a new unique clash-libCreate 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. clash-lib$Cache the result of a monadic action clash-lib-Cache the result of a monadic action using a 1 clash-libSame as  with last two arguments swapped clash-libUnsafe indexing, return a custom error message when indexing fails clash-lib*x y -> floor (logBase x y), x > 1 && y > 0 clash-lib,x y -> ceiling (logBase x y), x > 1 && y > 0 clash-libGet the package id of the type of a value >>> pkgIdFromTypeable (undefined :: TopEntity) "clash-prelude-0.99.3-64904d90747cb49e17166bbc86fec8678918e4ead3847193a395b258e680373c" clash-libLeft-biased choice on maybes clash-libLeft-biased choice on maybes clash-libTrigger warning? clash-lib File name clash-lib Line number clash-libMessage clash-libPass value (like trace) clash-lib%The key the action is associated with clash-lib)The Lens to the HashMap that is the cache clash-libThe action to cache clash-lib!Key the action is associated with clash-libLens to the cache clash-libAction to cache clash-libError message to display clash-libIndex n clash-lib List to index clash-libError or element n clash-libError message to display clash-lib List to index clash-libIndex n clash-libError or element n& & F#(C) 2015-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij None &/02356789;<O clash-libSee . A line map maps "virtual" lines to a range of "real" lines. E.g., a map of {0: (0, 3), 1: (4, 5)} would mean that line 0 in the virtual JSON (i.e., the one with newlines replaced) file map to lines 0 up to and including 3 in the original user-supplied one. clash-libAeson versions <1.5.0 accept unescaped newlines in JSON strings. This is in violation of RFC 7159. Aeson 1.5.0 fixes this bug. Unfortunately, "Clash JSON" files rely on the old behavior. This function replaces newlines (in stings) with their escaped variants. clash-lib/Pretty print part of json file related to error clash-libParse a ByteString according to the given JSON template. Throws exception if it fails. clash-lib"Path read from (for error message) clash-libBytestring to parse(C) 2012-2016, University of Twente, 2017, Google Inc.BSD2 (see the file LICENSE)-Christiaan Baaij None&/02356789:;<>Sj  clash-libDataCon reference clash-lib:Syntactical position of the DataCon in the type definition clash-libData Constructor clash-libName of the DataCon clash-lib4Invariant: forall x . dcUniq x ~ nameUniq (dcName x) clash-lib+Syntactical position in the type definition clash-libType of the 'DataCon clash-libUniversally quantified type-variables, these type variables are also part of the result type of the DataCon clash-libExistentially quantified type-variables, these type variables are not part of the result of the DataCon, but only of the arguments. clash-libArgument types clash-libNames of fields. Used when data constructor is referring to a record type.   #(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij None&/02356789:;<>X clash-libTyCon reference clash-libType Constructor clash-lib The RHS of an Algebraic Datatype clash-libThe DataCons of a TyCon clash-libThe newtype DataCon clash-libThe 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. clash-libAlgorithmic DataCons clash-lib$Function TyCons (e.g. type families) clash-libPrimitive TyCons clash-lib'To close the loop on the type hierarchy clash-libName of the TyCon clash-libKind of the TyCon clash-libNumber of type arguments clash-libDataCon definitions clash-libIs this a class dictionary? clash-lib&List of: ([LHS match types], RHS type) clash-lib Create a Kind out of a TyConName clash-lib&Does the TyCon look like a tuple TyCon clash-lib%Get the DataCons belonging to a TyCon(C) 2012-2016, University of Twente, 2016 , Myrtle Software LtdBSD2 (see the file LICENSE)-Christiaan Baaij None &/02356789;<YP(C) 2012-2016, University of Twente, 2016 , Myrtle Software Ltd, 2017 , Google Inc.BSD2 (see the file LICENSE)-Christiaan Baaij None&/02356789:;<>Z clash-lib Term Literal clash-lib Determines the Type of a Literal   (C) 2012-2016, University of Twente, 2016 , Myrtle Software Ltd, 2017 , Google Inc.BSD2 (see the file LICENSE)-Christiaan Baaij None  %&/02356789:;<>h( clash-libReference to a Kind clash-libReference to a Type clash-libThe level above types clash-lib/Types in CoreHW: function and polymorphic types clash-libMake a Type out of a TyCon clash-libEither a Kind or a Type clash-lib Literal Types clash-libType Constants clash-lib TyCon type clash-lib Function type clash-libAn easier view on types clash-lib Function type clash-lib Applied TyCon clash-libNeither of the above clash-lib Type variable clash-lib Type constant clash-libPolymorphic Type clash-libType Application clash-lib Type literal clash-lib9Annotated type, see Clash.Annotations.SynthesisAttributes clash-libAn easier view on typesNote [Arrow arguments]Clash' Arrow type can either have 2 or 4 arguments, depending on who created it. By default it has two arguments: the argument type of a function, and the result type of a function.So when do we have 4 arguments? When in Haskell/GHC land the arrow was unsaturated. This can happen in instance heads, or in the eta-reduced representation of newtypes. So what are those additional 2 arguments compared to the "normal" function type? They're the kinds of argument and result type. clash-libA view on types in which newtypes are transparent, the Signal type is transparent, and type functions are evaluated to WHNF (when possible).Strips away ALL layers. If no layers are found it returns the given type. clash-libA 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". clash-lib3Make a function type of an argument and result type clash-libMake a TyCon Application out of a TyCon and a list of argument types clash-lib6Split a TyCon Application in a TyCon and its arguments clash-libDetermine the kind of a type clash-libIs a type polymorphic? clash-lib4Split a function type in an argument and result type clash-libSplit a poly-function type in a: list of type-binders and argument types, and the result type clash-libMake a polymorphic function type out of a result type and a list of quantifiers and function argument types clash-libSplit a poly-function type in a: list of type-binders and argument types, and the result type. Looks through Signal and type functions. clash-lib)Is a type a polymorphic or function type? clash-lib/Is a type a polymorphic or function type under ? clash-libExtract attributes from type. Will return an empty list if this is an AnnType with an empty list AND if this is not an AnnType at all. clash-libIs a type a function type? clash-libApply a function type to an argument type and get the result type clash-lib clash-lib The type  forall a . a clash-lib6Normalize a type, looking through Signals and newtypes For example: %Signal a (Vec (6-1) (Unsigned (3+1))) normalizes to Vec 5 (Unsigned 4) clash-lib Result type clash-lib/List of quantifiers and function argument types11 (C) 2012-2016, University of Twente, 2017, Google Inc.BSD2 (see the file LICENSE)-Christiaan Baaij None&/02356789:;<>z= clash-libTerm reference clash-libTerm representation in the CoreHW language: System F + LetRec + Case clash-lib A list of  CoreContext describes the complete navigation path from the top-level to a specific sub-expression. clash-libContext in which a term appears clash-lib#Function position of an application clash-libArgument position of an application. If this is an argument applied to a primitive, a tuple is defined containing (name of the primitive, #type args, #term args) clash-lib'Function position of a type application clash-lib)RHS of a Let-binder with the sibling LHS' clash-lib)Body of a Let-binding with the bound LHS' clash-lib2Body of a lambda-term with the abstracted variable clash-lib9Body of a TyLambda-term with the abstracted type-variable clash-lib;RHS of a case-alternative with the bound pattern on the LHS clash-libSubject of a case-decomposition clash-libBody of a Cast clash-libBody of a Tick clash-lib+Patterns in the LHS of a case-decomposition clash-libDatatype pattern, '[TyVar]' bind existentially-quantified type-variables of a DataCon clash-libLiteral pattern clash-libDefault pattern clash-libBinding in a LetRec construct clash-lib-Ignores its arguments, and outputs a constant clash-libNever adds any work clash-lib)Does work when the arguments are variable clash-libPerforms work regardless of whether the variables are constant or variable; these are things like clock or reset generators clash-lib>Tag to indicate which instance/register name modifier was used clash-lib Clash.Magic.prefixName clash-lib Clash.Magic.suffixName clash-lib Clash.Magic.suffixNameP clash-lib Clash.Magic.setName clash-lib=Source tick, will get added by GHC by running clash with `-g` clash-libModifier for naming module instantiations and registers, are added by the user by using the functions +Clash.Magic.[prefixName,suffixName,setName] clash-libDeduplicate, i.e. try to share expressions between multiple branches. clash-libDo not deduplicate, i.e. keep, an expression inside a case-alternative; do not try to share expressions between multiple branches. clash-libVariable reference clash-libDatatype constructor clash-libLiteral clash-lib Primitive clash-libTerm-abstraction clash-libType-abstraction clash-lib Application clash-libType-application clash-libRecursive let-binding clash-libCase-expression: subject, type of alternatives, list of alternatives clash-lib$Cast a term from one type to another clash-libAnnotated term clash-lib6Get the list of term-binders out of a DataType pattern clash-lib6Abstract a term over a list of term and type variables clash-lib-Abstract a term over a list of term variables clash-lib-Abstract a term over a list of type variables clash-lib)Apply a list of types and terms to a term clash-libApply a list of terms to a term clash-libApply a list of types to a term clash-lib1Is the Context a Lambda/Term-abstraction context? clash-libIs the Context a Tick context? clash-lib>Split a (Type)Application in the applied term and it arguments clash-libSplit a (Type)Abstraction in the bound variables and the abstracted term clash-libGiven a function application, find the primitive it's applied. Yields Nothing if given term is not an application or if it is not a primitive. clash-lib1Partition ticks in source ticks and nameMod ticks clash-libVisit all terms in a term, testing it with a predicate, and returning a list of predicate yields. clash-lib,Make variable reference out of term variable clash-lib0Make a term variable out of a variable reference clash-libFunction application clash-libIf Term& was a primitive: (name of primitive,  type args,  term args) clash-lib(source ticks, nameMod ticks)(C) 2012-2016, University of Twente, 2017 , Myrtle Software LtdBSD2 (see the file LICENSE)-Christiaan Baaij None&/02356789:;<. clash-libComponent instantiation hole. First argument indicates which function argument to instantiate. Third argument corresponds to output and input assignments, where the first element is the output assignment, and the subsequent elements are the consecutive input assignments.The LHS of the tuple is the name of the signal, while the RHS of the tuple is the type of the signal clash-libElements of a blackbox context. If you extend this list, make sure to update the following functions:'Clash.Netlist.BlackBox.Types.prettyElem'Clash.Netlist.BlackBox.Types.renderElem&Clash.Netlist.BlackBox.Types.renderTag#Clash.Netlist.BlackBox.Types.setSym-Clash.Netlist.BlackBox.Types.getUsedArguments*Clash.Netlist.BlackBox.Types.usedVariables2Clash.Netlist.BlackBox.Types.verifyBlackBoxContext(Clash.Netlist.BlackBox.Types.walkElement clash-lib*Dumps given text without processing in HDL clash-libComponent instantiation hole clash-lib Output hole; Bool asserts escape marker stripping clash-lib Input hole; Bool asserts escape marker stripping clash-libLike Arg, but its first argument is the scoping level. For use in in generated code only. clash-lib,Like Arg, but input hole must be a constant. clash-lib*Like Arg, but input hole must be a literal clash-lib Name hole clash-libLike Arg but only insert variable reference (creating an assignment elsewhere if necessary). clash-lib Symbol hole clash-libType declaration hole clash-libType root hole clash-libError value hole clash-lib&Select element type from a vector type clash-libHole for the name of the component in which the blackbox is instantiated clash-libIndex data type hole, the field is the (exclusive) maximum index clash-libSize of a type hole clash-libLength of a vector hole clash-libDepth of a tree hole clash-libMax index into a vector clash-lib*Hole containing a filepath for a data file clash-libCreate data file  HOLE0 with contents HOLE1 clash-libHole marking beginning (True) or end (False) of a generative construct clash-libHole indicating whether IntWordInteger are 64-Bit clash-libCompare less-or-equal clash-lib=Hole indicating which synthesis tool we're generating HDL for clash-lib*Convert to (True)/from(False) a bit-vector clash-libRecord selector of a type clash-lib/Whether a domain's reset lines are synchronous. clash-libTag of a domain. clash-libPeriod of a domain. clash-lib7Test active edge of memory elements in a certain domain clash-libWhether a domain's reset lines are synchronous. Errors if not applied to a KnownDomain. clash-libWhether given enable line is active. More specifically, whether the enable line is NOT set to a constant . clash-libRepeat  hole n times clash-lib Evaluate  hole but swallow output clash-lib The "context name", name set by GH-, defaults to the name of the closest binder clash-libA BlackBox Template is a List of Elements TODO: Add name of function for better error messages clash-libA BlackBox function generates a blackbox template, given the inputs and result type of the function it should provide a blackbox for. This is useful when having a need for blackbox functions, ... TODO: docs clash-libSee Clash.Primitives.Types.BlackBox for documentation on this record's fields. (They are intentionally renamed to prevent name clashes.) clash-libWhether this primitive should be rendered when its result type is void. Defaults to . clash-lib,Render blackbox, even if result type is void clash-libDon't render blackbox result type is void. Default for all blackboxes. clash-libUse this value in your blackbox template function if you do want to accept the defaults as documented in Clash.Primitives.Types.BlackBox. clash-lib0Argument position of the function to instantiate clash-libSubposition of function: blackboxes can request multiple instances to be rendered of their given functions. This subposition indicates the nth function instance to be rendered (zero-indexed).This is a hack: the proper solution would postpone rendering the function until the very last moment. The blackbox language has no way to indicate the subposition, and every ~INST will default its subposition to zero. Haskell blackboxes can use this data type. clash-lib (name of signal, type of signal) clash-libIndicates whether caller needs a declaration. If set, the function is still free to return an expression, but the caller will convert it to a declaration. clash-libName of primitive clash-lib Arguments clash-lib Result type(C) 2012-2016, University of Twente, 2016-2017, Myrtle Software Ltd 2018 , Google Inc.BSD2 (see the file LICENSE)-Christiaan Baaij None %&/02356789:;<> clash-libExternally defined primitive clash-libPrimitive template written in a Clash specific templating language clash-libPrimitive template rendered by a Haskell function (given as raw source code) clash-libA primitive that carries additional information. These are "real" primitives, hardcoded in the compiler. For example:  mapSignal in GHC2Core.coreToTerm. clash-libName of the primitive clash-lib9Whether the primitive does any work, i.e. takes chip area clash-libWhether this primitive should be rendered when its result type is void. Defaults to . clash-lib6Whether this results in an expression or a declaration clash-libA warning to be outputted when the primitive is instantiated. This is intended to be used as a warning for primitives that are not synthesizable, but may also be used for other purposes. clash-lib-Verilog only: whether the result should be a reg(True) or wire (False); when not specified in the .json" file, the value will default to False (i.e. wire). clash-libVHDL only: add library! declarations for the given names clash-libVHDL only: add use! declarations for the given names clash-libIndicates how often a function will be instantiated in a blackbox. For example, consider the following higher-order function that creates a tree structure:%fold :: (a -> a -> a) -> Vec n a -> aIn order to generate HDL for an instance of fold we need log2(n) calls to the first argument, `a -> a -> a` (plus a few more if n is not a power of two). Note that this only targets multiple textual instances of the function. If you can generate the HDL using a for-loop and only need to call ~INST once, you don't have to worry about this option. See the blackbox for IJ for an example of this.Right now, option can only be generated by BlackBoxHaskell. It cannot be used within JSON primitives. To see how to use this, see the Haskell blackbox for IK. clash-libCreate files to be included with the generated primitive. The fields are ((name, extension), content), where content is a template of the file Defaults to [] when not specified in the .json file clash-lib0(Maybe) Control the generated name of the result clash-lib8(Maybe) Control the initial/power-up value of the result clash-libUsed to indiciate type of template (declaration or expression). Will be filled with Template or an Either decl expr. clash-libArguments used by blackbox. Used to remove arguments during normalization. clash-libHolds blackbox function and its hash, (Int, BlackBoxFunction), in a CompiledPrimitive. clash-libAdditional information clash-lib=Data type to indicate what arguments are in use by a BlackBox clash-libOnly these are used clash-libAll but these are used clash-lib,Template source stored in file on filesystem clash-libTemplate stored inline clash-libA BBFN is a parsed version of a fully qualified function name. It is guaranteed to have at least one module name which is not Main. clash-libA PrimMap maps primitive names to a  Primitive clash-libA compiled primitive has compiled all templates and functions from its ResolvedPrimitive counterpart. The Int in the tuple is a hash of the (uncompiled) BlackBoxFunction. clash-libA parsed primitive does not contain pointers to filesystem files anymore, but holds uncompiled BlackBoxTemplates and BlackBoxFunctions. clash-lib9An unresolved primitive still contains pointers to files.++(C) 2012-2016, University of Twente, 2017 , Myrtle Software LtdBSD2 (see the file LICENSE)-Christiaan Baaij None &/02356789;<o clash-libParse a text as a BlackBoxTemplate, returns a list of errors in case parsing fails runParse :: Text -> (BlackBoxTemplate, [Error LineColPos]) runParse = PCC.parse ((,)  $ pBlackBoxD  */ pEnd) . createStr (LineColPos 0 0 0)(C) 2012-2016, University of Twente, 2016 , Myrtle Software LtdBSD2 (see the file LICENSE)-Christiaan Baaij None &/02356789;<>  clash-lib'PrettyPrec printing Show-like typeclass clash-libClash's specialized Doc type holds metadata of type ClashAnnotation. clash-lib&Specific places in the program syntax. clash-lib+Annotations carried on pretty-printed code. clash-lib)marking navigation to a different context clash-lib!marking a specific sort of syntax clash-libOptions for the pretty-printer, controlling which elements to hide. clash-lib%whether to display unique identifiers clash-lib#whether to display type information clash-lib$whether to display module qualifiers clash-lib$Print a PrettyPrec thing to a StringNone &/02356789:;<>3 clash-lib-Rename environment for e.g. alpha equivalence!When going under binders for e.g.  x -> e1 aeq y -> e2 We want to rename [x -> y] or [y -> x]8, but we have to pick a binder that is neither free in e1 nor e2 or we risk accidental capture.So we must maintain: A renaming for the left termA renaming for the right termA set of in scope variables clash-lib/Set of variables that is in scope at some pointThe  is a kind of hash-value used to generate new uniques. It should never be zeroSee "Secrets of the Glasgow Haskell Compiler inliner" Section 3.2 for the motivation clash-libSet of variables clash-libMap indexed by variables clash-lib Empty map clash-lib3Environment containing a single variable-value pair clash-lib%Look up a value based on the variable clash-lib0Lookup a value based on the unique of a variable clash-lib$Lookup a value based on the variable+Errors out when the variable is not present clash-lib1Remove a variable-value pair from the environment clash-lib:Remove a list of variable-value pairs from the environment clash-libAdd a variable-value pair to the environment; overwrites the value if the variable already exists clash-libAdd a variable-value pair to the environment; if the variable already exists, the two values are merged with the given function clash-libAdd a list of variable-value pairs; the values of existing keys will be overwritten clash-libIs the environment empty clash-lib/Get the (left-biased) union of two environments clash-libGet the union of two environments, mapped values existing in both environments will be merged with the given function. clash-lib5Create an environment given a list of var-value pairs clash-lib4Apply a function to every element in the environment clash-libApply a function to every element in the environment; values for which the function returns ! are removed from the environment clash-libStrict left-fold over an environment using both the unique of the the variable and the value clash-libExtract the elements clash-lib*Does the variable exist in the environment clash-lib.Does the variable not exist in the environment clash-lib The empty set clash-libThe set of a single variable clash-libUnion two sets clash-lib%Is the variable an element in the set clash-lib)Is the variable not an element in the set clash-lib,Remove a variable from the set based on its 5 clash-lib%Create a set from a list of variables clash-lib The empty set clash-lib Add a list of variables in scope clash-lib$Union two sets of in scope variables clash-lib Is the set of variables in scope clash-libLook up a variable in the 7. This gives you the canonical version of the variable clash-libIs the variable in scope clash-lib8Check whether an element exists in the set based on the 5 contained in that element clash-libIs the variable not in scope clash-lib"Create a set of variables in scope clash-lib The empty set clash-libEnsure that the 5% of a variable does not occur in the  clash-lib$Create an empty renaming environment clash-libLook up the renaming of an type-variable occurrence in the left term clash-libLook up the renaming of an type-variable occurrence in the right term clash-lib1Simultaneously go under the type-variable binder bTvL and type-variable binder bTvR, finds a new binder newTvB%, and return an environment mapping [bTvL -> newB] and [bTvR -> newB] clash-libApplies  to several variables: the two variable lists must be of equal length. clash-lib6Look up the renaming of an occurrence in the left term clash-lib6Look up the renaming of an occurrence in the left term clash-lib#Simultaneously go under the binder bL and binder bR, finds a new binder newTvB$, and return an environment mapping  [bL -> newB] and  [bR -> newB] clash-libApplies  to several variables: the two variable lists must be of equal length. clash-libUnique in scope test clash-libSeed55(C) 2013-2016, University of Twente, 2016-2017, Myrtle Software Ltd, 2017 , QBayLogic, Google Inc.BSD2 (see the file LICENSE)-Christiaan Baaij None#$&/02356789:;<~ clash-libInformation about the generated HDL between (sub)runs of the compiler clash-libHash of the TopEntity and all its dependencies + (maybe) Hash of the TestBench and all its dependencies clash-lib6Compiler flags used to achieve successful compilation:opt_inlineLimit opt_specLimitopt_floatSupport clash-libThe rendered versions of the types of the input ports of the TopEntity Used when dealing with multiple  TopEntitys who have different names for types which are structurally equal clash-libThe rendered versions of the types of the output ports of the TopEntity Used when dealing with multiple  TopEntitys who have different names for types which are structurally equal clash-lib.Names of all the generated components for the  TopEntity7 (does not include the names of the components of the  TestBench accompanying the  TopEntity). clash-lib>Only output debug information from (applied) transformation n clash-libOnly output debug information for n (applied) transformations. If this limit is exceeded, Clash will stop normalizing. clash-libDirectory to store temporary files in. Will be cleaned after Clash has finished executing. clash-libPerform a high-effort compile, trading improved performance for potentially much longer compile times.#Name inspired by Design Compiler's  compile_ultra flag. clash-libNothing!: generate undefined's in the HDL Just Nothing: replace undefined's by a constant in the HDL; the compiler decides what's best Just (Just x): replace undefined's by x in the HDL clash-libEnable aggressive X optimization, which may remove undefineds from generated HDL by replaced with defined alternatives. clash-libAt what size do we cache normalized work-free top-level binders. clash-libDebug Message Verbosity clash-libDon't show debug messages clash-libRun invariant checks and err if violated (enabled by any debug flag) clash-lib&Show completely normalized expressions clash-lib%Show names of applied transformations clash-lib/Show names of tried AND applied transformations clash-lib/Show sub-expressions after a successful rewrite clash-lib8Show all sub-expressions on which a rewrite is attempted clash-libGlobal function bindersGlobal functions cannot be mutually recursive, only self-recursive.55#(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij None&/02356789;<Ԛ clash-lib:Gives the free type-variables in a Type, implemented as a The / is closed over the types of its variables, so:  k) Int) = {a, k}  clash-libGives the "interesting" free variables in a Type, implemented as a The + is closed over the types of variables, so: foldMapOf (typeFreeVars' (const True) IntSet.empty) unitVarSet ((a:* -> k) Int) = {a, k} "Note [Closing over kind variables]Consider the type forall k . b -> kwhere b :: k -> Type)When we close over the free variables of forall k . b -> k, i.e. b , then the k in b :: k -> Type is most definitely not the k in forall k . b -> k. So when a type variable is free, i.e. not in the inScope set, its kind variables also arent; so in order to prevent collisions due to shadowing we close using an empty inScope set. See also: https://git.haskell.org/ghc.git/commitdiff/503514b94f8dc7bd9eab5392206649aee45f140b clash-lib9Check whether an identifier does not occur free in a term clash-libCheck whether a set of identifiers does not occur free in a term clash-lib>Check whether a set of variables does not occur free in a term clash-lib6Check whether a local identifier occurs free in a term clash-lib6Check whether a local identifier occurs free in a term clash-libCalculate the local free variable of an expression: the free type variables and the free identifiers that are not bound in the global environment. clash-lib7Gives the free identifiers of a Term, implemented as a  clash-libCalculate the local free identifiers of an expression: the free identifiers that are not bound in the global environment. clash-libCalculate the global free identifiers of an expression: the free identifiers that are bound in the global environment. clash-libDetermines if term has any locally free variables. That is, the free type variables and the free identifiers that are not bound in the global scope. clash-lib:Gives the free type-variables of a Term, implemented as a The + is closed over the types of variables, so: foldMapOf termFreeTyVars unitVarSet (case (x : (a:* -> k) Int)) of {}) = {a, k}  clash-libGives the "interesting" free variables in a Term, implemented as a The + is closed over the types of variables, so: foldMapOf (termFreeVars' (const True)) unitVarSet (case (x : (a:* -> k) Int)) of {}) = {x, a, k} "Note [Closing over type variables]Consider the term /\(k :: Type) -> \(b :: k) -> awhere a :: k)When we close over the free variables of /k -> (b :: k) -> (a :: k), i.e. a , then the k in a :: k is most definitely not the k in introduced by the /k ->. So when a term variable is free, i.e. not in the inScope set, its type variables also arent; so in order to prevent collisions due to shadowing we close using an empty inScope set. See also: https://git.haskell.org/ghc.git/commitdiff/503514b94f8dc7bd9eab5392206649aee45f140b clash-lib4Determine whether a type has no free type variables. clash-lib=Collect the free variables of a collection of type into a set clash-lib>Collect the free variables of a collection of terms into a set clash-libGet the free variables of an expression and count the number of occurrences clash-lib3Predicate telling whether a variable is interesting clash-lib+Uniques of the variables in scope, used by  clash-lib3Predicate telling whether a variable is interestingNone &/02356789;<ڛ  clash-libData type that indicates what kind of solution (if any) was found clash-lib1Solution was found. Variable equals some integer. clash-lib8A solution was found, but it involved negative naturals. clash-lib4Given type wasn't an equation, or it was unsolvable. clash-lib9Solve given equations and return all non-absurd solutions clash-lib Solve simple equalities such as:a ~ 33 ~ aSomeType a b ~ SomeType 3 5SomeType 3 5 ~ SomeType a bSomeType a 5 ~ SomeType 3 b clash-libSolve equations supported by  normalizeAdd. See documentation of TypeEqSolution to understand the return value. clash-libGiven the left and right side of an equation, normalize it such that equations of the following forms: 5 ~ n + 2 5 ~ 2 + n n + 2 ~ 5 2 + n ~ 5are returned as (5, 2, n) clash-libTests for unreachable alternative due to types being "absurd". See  isAbsurdEq for more info. clash-lib-Determines if an "equation" obtained through altEqs or typeEq is absurd. That is, it tests if two types that are definitely not equal are asserted to be equal OR if the computation of the types yield some absurd (intermediate) result such as -1. clash-libGet constraint equations clash-lib+If type is an equation, return LHS and RHS. clash-libexistential tvs  (C) 2012-2016, University of Twente, 2017, Google Inc.BSD2 (see the file LICENSE)-Christiaan Baaij None &/02356789;< clash-libAlpha equality for types clash-libType substitution, see Works only if the domain of the substitution is superset of the type being substituted into clash-lib6A substitution environment containing containing both  and  substitutions.6Some invariants apply to how you use the substitution: The  contains at least those s and s that will be in scope after applying the substitution to a term. Precisely, the in-scope set must be a superset of the free variables of the substitution range that might possibly clash with locally-bound variables in the thing being substituted in..You may only apply the substitution once. See There are various ways of setting up the in-scope set such that the first of of these invariants holds:?Arrange that the in-scope set really is all the things in scopeArrange that it's the free vars of the range of the substitutionMake it empty, if you know that all the free variables of the substitution are fresh, and hence cant possibly clash clash-libType substitution#The following invariants must hold: The 8 is needed only to guide the generation of fresh uniques5In particular, the kind of the type variables in the  is not relevant.%The substitution is only applied onceNote [Apply Once]We might instantiate forall a b. ty with the types [a, b] or [b, a]%. So the substitution might go like [a -> b, b -> a]. A similar situation arises in terms when we find a redex like (a ->  b -> e) b a. Then we also end up with a substitution that permutes variables. Other variations happen to; for example  [a -> (a,b)].SO A TvSubst MUST BE APPLIED PRECISELY ONCE, OR THINGS MIGHT LOOP!Note [The substitution invariant]?When calling (substTy subst ty) it should be the case that the  is a superset of both:3The free variables of the range of the substitutionThe free variables of ty% minus the domain of the substitution clash-libA substitution of s for s%Note [Extending the TvSubstEnv] See " for the invariants that must holdThis invariant allows a short-cut when the subst env is empty: if the TvSubstEnv is empty, i.e. nullVarEnv TvSubstEnv. holds, then (substTy subst ty) does nothing.For example, consider:(a -> b(a ~ Int) -> ... b ...) IntWe substitute Int for a. The Unique of b+ does not change, but nevertheless we add b to the  because b's kind does change(This invariant has several consequences:In , we extend TvSubstEnv if the unique has changed, or if the kind has changedIn  , we do not need to consult the ; the TvSubstEnv is enoughIn /, we can short-circuit when TvSubstEnv is empty clash-libAn empty substitution, starting the variables currently in scope clash-libCreate a type substitution clash-lib/Extend the substitution environment with a new  substitution clash-lib3Extend the substitution environment with a list of  substitutions clash-lib:Extend the substitution environment with a list of global  substitutions clash-lib/Extend the substitution environment with a new  substitution clash-lib3Extend the substitution environment with a list of  substitutions clash-libAdd an  to the in-scope set: as a side effect, remove any existing substitutions for it. clash-libAdd  s to the in-scope set. See also  clash-libSubstitute within a None %&/02356789;< clash-lib$Create a vector of supplied elements clash-lib&Append elements to the supplied vector clash-libCreate 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-bindings clash-libCreate 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-bindings clash-lib$Create a vector of supplied elements clash-lib*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.#This also includes BiSignals, i.e.:BiSignalIn High System Intetc. clash-lib>Determines whether given type is an (alias of en) Enable line. clash-libDetermines whether given type is an (alias of en) Clock or Reset line clash-libSame as dataConInstArgTys, but it tries to compute existentials too, hence the extra argument TyConMap=. WARNING: It will return the types of non-existentials only clash-libGiven 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.The list of types should be equal to the number of type variables, otherwise Nothing is returned. clash-libMake a coercion clash-libMake an undefined term clash-libTry to reduce an arbitrary type to a literal type (Symbol or Nat), and subsequently extract its String representation clash-libDetermine whether we should split away types from a product type, i.e. clocks should always be separate arguments, and not part of a product. clash-lib Worker of  , works on  instead of  clash-libPotentially split apart a list of function argument types. e.g. given: [Int,(Clock,(Reset,Bool)),Char] we return nt,Clock,Reset,Bool,Char]But we would leave [Int, (Bool,Int), Char] unchanged. clash-lib&Strip implicit parameter wrappers (IP) clash-libDo an inverse topological sorting of the let-bindings in a let-expression clash-libGroup let-bindings into cyclic groups and acyclic individual bindings clash-libThe Nil constructor clash-libThe Cons (:>) constructor clash-lib Element type clash-libLength of the vector clash-libElements to put in the vector clash-libThe Cons (:>) constructor clash-lib Element type clash-lib$The vector to append the elements to clash-libLength of the vector clash-libElements to append clash-lib Unique supply clash-lib (Superset of) in scope variables clash-libThe Cons (:>) constructor clash-libThe element type clash-lib*Char to append to the bound variable names clash-libLength of the vector clash-lib The vector clash-lib Unique supply clash-lib (Superset of) in scope variables clash-libThe LR constructor clash-libThe BR constructor clash-libThe element type clash-lib*Char to append to the bound variable names clash-libDepth of the tree clash-libThe tree clash-libThe LR constructor clash-libThe BR constructor clash-lib Element type clash-libDepth of the tree clash-libElements to put in the tree clash-libType to examine clash-lib:If we want to split values of the given type then we have Just: The (type-applied) data-constructor which, when applied to values of the types in 2., creates a value of the examined type:The arguments types of the product we are trying to split.Note that we only split one level at a time (although we check all the way down), e.g. given (Int, (Clock, Bool)) we return: 4Just ((,) @Int @(Clock, Bool), [Int, (Clock, Bool)])4An outer loop is required to subsequently split the  (Clock, Bool) tuple.None&/02356789;<K(C) 2019, Myrtle Software LtdBSD2 (see the file LICENSE)-Christiaan Baaij None&/02356789;<>$ clash-lib)Tools to deal with literals encoded as a Term. clash-libConvert  to the constant it represents. Will return an error if (one of the subterms) fail to translate. clash-libSame as , but returns printable error message if it couldn't translate a term. clash-libSame as >, but errors hard if it can't translate a given term to data. clash-libTerm to convert clash-lib indicates a failure, containing the (sub)term that failed to translate.  indicates a success.None&/02356789;< r  clash-libDetermine the type of a term clash-libGet the result type of a polymorphic function given a list of arguments clash-libLike 7, but errors out when a type application is not valid.Do not iterate , because it's inefficient to substitute one variable at a time; instead use  clash-libLike  but for a single argument.Do not iterate , because it's inefficient to substitute one variable at a time; instead use  clash-lib"(piResultTys f_ty [ty1, ..., tyn]) give sthe type of (f ty1 .. tyn) where  f :: f_ty is interesting because: f_ty* may have more foralls than there are args)Less obviously, it may have fewer forallsFore case 2. think of:,piResultTys (forall a . a) [forall b.b, Int]5This really can happen, such as situations involving s type:undefined :: forall a. a undefined (forall b. b -> b) IntThis term should have the type  (Int -> Int)<, but notice that there are more type args than foralls in s type.For efficiency reasons, when there are no foralls, we simply drop arrows from a function type/kind. clash-lib!Does a term have a function type? clash-lib0Does a term have a function or polymorphic type? clash-libIs a term a term-abstraction? clash-lib"Is a term a recursive let-binding? clash-libIs a term a variable reference? clash-lib!Is a term a datatype constructor? clash-libIs a term a primitive? (C) 2020, QBayLogic B.V.BSD2 (see the file LICENSE)-Christiaan Baaij None &/02356789;<G  clash-lib Functions clash-libType abstractions clash-libData constructors clash-libLiterals clash-libClash's number types are represented by their "fromInteger#" primitive function. So some primitives are values. clash-libUsed by lazy primitives clash-lib#Preserve ticks from Terms in Values clash-lib#Preserve casts from Terms in Values clash-libNone %&/02356789;<  clash-libA single step in the partial evaluator. The result is the new heap and stack, and the next expression to be reduced. clash-lib1Evaluate to WHNF given an existing Heap and Stack clash-lib9Completely unwind the stack to get back the complete term clash-lib!Small-step operational semantics. clash-libTake a list of types or type variables and create a lambda / type lambda for each one around the given term. clash-libUnwind the stack by 1 clash-lib'Update the Heap with the evaluated term clash-libApply a value to a function clash-libInstantiate a type-abstraction clash-libEvaluate a case-expression clash-lib!Allocate let-bindings on the heap clash-lib6Create a unique name and substitution for a let-binder"(C) 2015-2016, University of Twente, 2017 , Myrtle Software Ltd, Google Inc.BSD2 (see the file LICENSE)-Christiaan Baaij None &/02356789;< clash-libInitial state for state monad clash-lib"What HDL is the backend generating clash-lib&Location for the primitive definitions clash-libName of backend, used for directory to put output files in. Should be constant function / ignore argument. clash-lib"File extension for target langauge clash-lib!Get the set of types out of state clash-lib$Generate HDL for a Netlist component clash-libGenerate a HDL package containing type definitions for the given HWTypes clash-lib-Convert a Netlist HWType to a target HDL type clash-libNone &'(/02356789:;<E clash-libMonad that caches generated components (StateT) and remembers hidden inputs of components that are being generated (WriterT) clash-lib'Expression used in RHS of a declaration  clash-lib!Component: base unit of a Netlist! clash-libInternals of a Component" clash-libRepresentable hardware types# clash-libSignal reference clash-lib-Type of declaration, concurrent or sequential clash-libNetlist-level identifier clash-libIdentifier generated in the NetlistMonad, always derived from another  clash-libAn original Core identifier clash-libA split identifier (into several sub-identifiers), needed to assign expressions of types that have to be split apart (e.g. tuples of Files) clash-lib8Context used to fill in the holes of a BlackBox template clash-lib,Blackbox function name (for error reporting) clash-libResult name and type clash-lib2Argument names, types, and whether it is a literal clash-lib&Function arguments (subset of inputs):6( Blackbox Template , Whether the result should be reg or a wire2 (Verilog only) , Partial Blackbox Context )  clash-libThe scoping level this context is associated with, ensures that  ~ARGN[k][n]8 holes are only filled with values from this context if k0 is equal to the scoping level of this context.  clash-lib-The component the BlackBox is instantiated in  clash-lib The "context name", name set by GH-, defaults to the name of the closest binder  clash-lib Bit literal  clash-libHigh  clash-libLow  clash-lib Undefined  clash-libHigh-impedance  clash-libLiterals used in an expression  clash-libNumber literal  clash-lib Bit literal  clash-libBitVector literal  clash-libBoolean literal  clash-libVector literal  clash-libString literal  clash-libLiteral expression  clash-libDataCon application  clash-libSignal reference  clash-libLeft e: tagToEnum#, Right e : dataToTag#  clash-lib&Instantiation of a BlackBox expression  clash-lib Do nothing  clash-libExpression Modifier  clash-libIndex the expression: (Type of expression,DataCon tag,Field Tag)  clash-libSee expression in a DataCon context: (Type of the expression, DataCon tag)  clash-lib>See the expression in the context of a Vector append operation  clash-lib HWType translator  clash-lib TyCon cache  clash-libKeeps track of invocations of mkPrimitive. It is currently used to filter duplicate warning invocations for dubious blackbox instantiations, see GitHub pull request #286.  clash-lib8The current scoping level assigned to black box contexts  clash-libSettings Clash was called with  clash-lib>Whether we're compiling a testbench (suppresses some warnings)  clash-lib3Whether the backend supports ifThenElse expressions  clash-libThe current HDL backend  clash-libEnvironment of the NetlistMonad  clash-lib"Prefix for instance/register names  clash-lib#Postfix for instance/register names  clash-lib)(Maybe) user given instance/register name  clash-libStructure describing a top entity: it's id, its port annotations, and associated testbench.  clash-libId of top entity  clash-lib(Maybe) a topentity annotation  clash-lib2(Maybe) a test bench associated with the topentity  clash-libExtract hardware attributes from Annotated. Returns an empty list if non-Annotated given or if Annotated has an empty list of attributes.  clash-libEliminator for   clash-libEliminator for  , fails on   clash-libReturn the type(s) of a  NetListId', returns multiple types when given a   clash-libReturn the type of a  , fails on   clash-libNB6: serialisation doesn't preserve the embedded function  clash-libPrimitive name clash-libVHDL only: add library declarations clash-libVHDL only: add use declarations: clash-libIntel/Quartus only: create a .qsys file from given template. clash-libTemplate tokens clash-lib*Context in which tokens should be rendered clash-libWrap in paretheses?  clash-lib2Edge of the clock the statement should be executed clash-libClock expression clash-libStatements to be executed on the active clock edge | Statements running at simulator start  clash-libScrutinized expresson clash-lib"Type of the scrutinized expression clash-lib*List of: (Maybe match, RHS of Alternative)  clash-libSignal to assign clash-libAssigned expression  clash-libSignal to assign clash-libType of the result/alternatives clash-libScrutinized expression clash-libType of the scrutinee clash-libList of: (Maybe expression scrutinized expression is compared with,RHS of alternative)  clash-lib%Whether it's an entity or a component clash-lib$Comment to add to the generated code clash-lib"The component's (or entity's) name clash-libInstance label clash-libList of parameters for this component (param name, param type, param value) clash-lib3Ports (port name, port direction, type, assignment)  clash-libPrimitive name clash-libVHDL only: add library declarations clash-libVHDL only: add use declarations clash-libIntel Quartus only: create a .qsys file from given template clash-libTemplate tokens clash-lib*Context in which tokens should be rendered  clash-lib1Note; will be inserted as a comment in target hdl clash-libWire or register clash-libName of signal clash-lib+Pointer to type of signal or type of signal clash-lib#Initial value ^ Signal declaration  clash-lib1Note; will be inserted as a comment in target hdl clash-libName of signal clash-libType of signal  clash-libmask clash-libvalue  clash-lib8Eliminator for Identifiers generated in the NetlistMonad clash-lib(Eliminator for original Core Identifiers  clash-lib8Eliminator for Identifiers generated in the NetlistMonad clash-lib(Eliminator for original Core Identifiers  ! " #  !   ! " #  #(C) 2012-2016, University of Twente, 2016 , Myrtle Software Ltd, 2017 , Google Inc.BSD2 (see the file LICENSE)-Christiaan Baaij None&/02356789:;<>P"  clash-libState of a rewriting session  clash-lib!Number of applied transformations  clash-libGlobal binders  clash-libSupply of unique numbers  clash-lib&Function which is currently normalized  clash-lib Used for Fresh  clash-libUsed as a heap for compile-time evaluation of primitives that live in I/O  clash-lib6Map telling whether a binder's definition is work-free  clash-libAdditional state  clash-libState used by the inspection mechanism for recording rewrite steps.  clash-libcurrent context  clash-libName of the transformation  clash-libName of the current binder  clash-lib Term before apply  clash-lib Term after apply  clash-lib,Read-only environment of a rewriting session  clash-lib*Level at which we print debugging messages  clash-lib See ClashOpts.dbgTransformations  clash-lib(See ClashOpts.opt_dbgTransformationsFrom  clash-lib)See ClashOpts.opt_dbgTransformationsLimit  clash-lib+Transformations to print debugging info for  clash-lib*Hardcode Type -> FilteredHWType translator  clash-lib TyCon cache  clash-libTuple TyCon cache  clash-lib&Hardcoded evaluator (delta-reduction)}  clash-lib)Functions that are considered TopEntities  clash-libCustom bit representations  clash-libA   action in the context of the   clash-lib=Monadic action that transforms a term given a certain context  clash-libMonad 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.  clash-lib'Run the computation in the RewriteMonad< < $#(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij None&/02356789;<Ts  clash-lib1Apply a transformation on the subtrees of an term  clash-lib'Apply two transformations in succession  clash-libApply two transformations in succession, and perform a deepseq in between.  clash-lib-Apply a transformation in a topdown traversal  clash-lib.Apply a transformation in a bottomup traversal  clash-lib?Only apply the second transformation if the first one succeeds.  clash-libNone&/02356789;<]  clash-lib State of the   clash-libGlobal binders  clash-lib*Cache of previously specialized functions:Key: (name of the original function, argument position, specialized term/type)Elem: (name of specialized function,type of specialized function)  clash-lib2Cache of how many times a function was specialized  clash-libNumber of time a function f can be specialized  clash-lib,Cache of function where inlining took place:'Key: function where inlining took place=Elem: (functions which were inlined, number of times inlined)  clash-libNumber of times a function f can be inlined in a function g  clash-libSize of a function below which it is always inlined if it is not recursive  clash-libSize of a constant below which it is always inlined; 0 = no limit  clash-libPrimitive Definitions  clash-lib7Cache for looking up constantness of blackbox arguments  clash-lib8Map telling whether a components is recursively defined.NB: there are only no mutually-recursive component, only self-recursive ones.  clash-lib:Flattening stage should use the new (no-)inlining strategy  clash-libHigh-effort normalization session, trading performance improvement for potentially much longer compile times. Follows the 8L flag.  clash-libAt what size do we cache normalized work-free top-level binders.  clash-libDescription of a Term' in terms of the type "components" the Term has.%Is used as a performance/size metric.  clash-libNumber of functions  clash-libNumber of primitives  clash-lib!Number of selections/multiplexers  clash-libA  Transform action in the context of the   and   clash-lib3RewriteSession with extra Normalisation information  clash-lib?State monad that stores specialisation and inlining information) ) 'None&/02356789;<]  ((C) 2019, Myrtle Software LtdBSD2 (see the file LICENSE)-Christiaan Baaij None &/02356789;<_M  clash-libConstructs "clean" literals.  clash-lib(Base name of constructors (for example:  GHC.Word.W) clash-libFunctions processing  )(C) 2019, Myrtle Software LtdBSD2 (see the file LICENSE)-Christiaan Baaij None &/02356789;<`  clash-libTemplate function for Word8,Word16,.. Constructs "clean" literals. This function generates valid (System)Verilog only!  *(C) 2019, Myrtle Software LtdBSD2 (see the file LICENSE)-Christiaan Baaij None &/02356789;<a  clash-libTemplate function for Int8,Int16,.. Constructs "clean" literals.  M(C) 2017, Google Inc.BSD2 (see the file LICENSE)-Christiaan Baaij None&/02356789;<b'-(C) 2018, Google Inc.BSD2 (see the file LICENSE)-Christiaan Baaij None&/02356789;<c_  clash-libConverts a list of BitRepresentation.Bits to their Netlist counterpart.  clash-lib*Type to convert to bit representation type  /(C) 2012-2016, University of Twente, 2017 , Myrtle Software Ltd 2017-2018, Google Inc.BSD2 (see the file LICENSE)-Christiaan Baaij None %&/02356789; Type -> Type where Nil :: Vec 0 a Cons :: forall m . (n ~ m + 1) => a -> Vec m a -> Vec n a!where we can generate a type for m when we know n (by doing `n-1`).7And here is an example of an unconstrained existential:data SomeSNat where where SomeSNat :: forall m . SNat m -> SomeSNat-where there is no way to generate a type for m from any context.So why do we care? Because terms need to be completely monomorphic in order to be translated to circuits. And having a topEntity lambda-bound variable with an unconstrained existential type prevents us from achieving a fully monomorphic term.  clash-lib/Simple check if a TyCon is recursively defined.  clash-libDetermines if a Core type is translatable to a HWType given a function that translates certain builtin types.  clash-libDetermines the bitsize of a type. For types that don't get turned into real values in hardware (string, integer) the size is 0.  clash-lib3Determines the bitsize of the constructor of a type  clash-lib(Gives the length of length-indexed types  clash-libGives the HWType corresponding to a term. Returns an error if the term has a Core type that is not translatable to a HWType.  clash-lib2Gives the HWType corresponding to a term. Returns  if the term has a Core type that is not translatable to a HWType.  clash-libHelper function of collectPortNames, which operates on a PortName instead of a TopEntity.  clash-libRecursively get all port names from top entity annotations. The result is a list of user defined port names, which should not be used by routines generating unique function names. Only completely qualified names are returned, as it does not (and cannot) account for any implicitly named ports under a PortProduct.  clash-libRemove ports having a void-type from user supplied PortName annotation  clash-libUniquely rename all the variables and their references in a normalized term  clash-libSet the name of the binderNormally, it just keeps the existing name, but there are two exceptions: It's the binding for the result which is also referenced by another binding; in this case it's suffixed with _rec;The binding binds a primitive that has a name control fieldtakes priority over 1. Additionally, we create an additional binder when the return value gets a new name.  clash-libSame as idToPort, but * Throws an error if the port is a composite type with a BiSignalIn  clash-libSame as idToPort, but: * Throws an error if port is of type BiSignalIn  clash-libMake a set of IDs unique; also returns a substitution from old ID to new updated unique ID.  clash-libPreserve the complete state before running an action, and restore it afterwards.  clash-libPreserve the Netlist  , , ! when executing a monadic action  clash-lib%Prefix given string before portnames except when this string is empty.  clash-libIn addition to the original port name (where the user should assert that it's a valid identifier), we also add the version of the port name that has gone through the 'mkIdentifier Basic' process. Why? so that the provided port name is copied verbatim into the generated HDL, but that in e.g. case-insensitive HDLs, a case-variant of the port name is not used as one of the signal names.  clash-lib$Create a Vector chain for a list of #s  clash-lib#Create a RTree chain for a list of #s  clash-libStrips one or more layers of attributes from a HWType; stops at first non-Annotated. Accumilates all attributes of nested annotations.  clash-libGenerate output port mappings  clash-libGenerate output port mappings. Will yield Nothing if the only output is Void.  clash-libInstantiate a TopEntity, and add the proper type-conversions where needed  clash-lib)Convert between BitVector for an argument  clash-lib(Convert between BitVector for the result  clash-lib&Add to/from-BitVector conversion logic  clash-lib.Generate input port mappings for the TopEntity  clash-lib&Consider the following type signature:  f :: Signal dom (Vec 6 A) `Annotate` Attr "keep" -> Signal dom (Vec 6 B) What does the annotation mean, considering that Clash will split these vectors into multiple in- and output ports? Should we apply the annotation to all individual ports? How would we handle pin mappings? For now, we simply throw an error. This is a helper function to do so.  clash-lib8Generate output port mappings for the TopEntity. Yields Nothing if the output is Void  clash-lib/Generate output port mappings for the TopEntity  clash-libTry to merge nested modifiers into a single modifier, needed by the VHDL and SystemVerilog backend.  clash-libDetermines if any type variables (exts) are bound in any of the given type or term variables (tms). It's currently only used to detect bound existentials, hence the name.  clash-libRun a NetlistMonad computation in the context of the given source ticks and name modifier ticks  clash-libAdd the pre- and suffix names in the current environment to the given identifier  clash-lib,Approximate location in original source file  clash-lib,Approximate location in original source file  clash-libType to convert to HWType  clash-libType to convert to HWType  clash-libConstructor index clash-lib Field index  clash-lib;Map containing all custom representations index on its type clash-libCustom reprs are index on type, so we need the clash core type to look it up. clash-lib1Type of previous argument represented as a HWType  clash-libType to convert to HWType  clash-libType to convert to HWType  clash-lib3Were voids. Length must be less than or equal to n. clash-libOriginal indices  clash-lib#Hardcoded Type -> HWType translator clash-lib TyCon cache clash-lib9String representation of the Core type for error messages clash-lib The TyCon clash-libIts applied arguments clash-libAn error string or a tuple with the type and possibly a list of removed arguments.  clash-libString considered representable  clash-libTerm to convert to HWType  clash-libTop entity annotation where:!Nothing: term is not a top entityJust Nothing: term is a top entity, but has no explicit annotationJust (Just ..): term is a top entity, and has an explicit annotation  clash-libCurrent substitution clash-libThe binder for the result clash-lib9Whether the result binder is referenced by another binder clash-lib#The (renamed) binder for the result=The updated substitution in case the result binder is renamedA new binding, to assign the result in case the original binder for the result got renamed. clash-lib The binding  clash-libTop entity annotation where:!Nothing: term is not a top entityJust Nothing: term is a top entity, but has no explicit annotationJust (Just ..): term is a top entity, and has an explicit annotation  clash-libTop entity annotation where:!Nothing: term is not a top entityJust Nothing: term is a top entity, but has no explicit annotationJust (Just ..): term is a top entity, and has an explicit annotation  clash-libExisting substitution clash-libIDs to make unique clash-lib!(Unique IDs, update substitution)  clash-libName of the TopEntity component clash-lib(maybe) a corresponding  TopEntity annotation clash-liba corresponding Manifest clash-lib=The name and type of the signal to which to assign the result clash-lib The arguments clash-libTick declarations  clash-lib(maybe) Name of the _TopEntity_ clash-libEither: * A normal" argument * An argument with a PortName  clash-lib(mabye) Name of the _TopEntity_ clash-libEither: * A normal result * A result with a PortName  clash-lib!We only need it for certain types clash-libNothing: No _given_ TopEntity, no need for conversion, this happens when we have a _TestBench_, but no _TopEntity_ annotation.Just Nothing: Converting to/from a BitVector for one of the internally defined types.Just (Just top): Converting to/from a BitVector for one of the types defined by top. clash-libTrue: convert to a BitVectorFalse: convert from a BitVector clash-lib>The expression on top of which we have to add conversion logic  clash-lib(maybe) Name of the _TopEntity_ clash-libRendered input port names and types clash-lib (maybe) The PortName+ of a _TopEntity_ annotation for this input  clash-lib(maybe) Name of the _TopEntity_ clash-libRendered output port names and types clash-lib (maybe) The PortName, of a _TopEntity_ annotation for this output  clash-lib(maybe) Name of the _TopEntity_ clash-libRendered output port names and types clash-lib (maybe) The PortName, of a _TopEntity_ annotation for this output  clash-lib!The source ticks are turned into  s and are passed as an argument to the NetlistMonad computation. Name modifier ticks will change the local environment for the NetlistMonad computation. 0(C) 2012-2016, University of Twente, 2016 , Myrtle Software Ltd, 2017 , Google Inc.BSD2 (see the file LICENSE)-Christiaan Baaij None &/02356789; f a b c8i.e. is a wrapper around a (partially) applied function f!, where the introduced argument w is not used by f  clash-libInline the first set of binder into the second set of binders and into the body of the original let expression.  clash-libLift the first set of binders to the level of global bindings, and substitute these lifted bindings into the second set of binders and the body of the original let expression.  clash-libDetermines whether a global binder is work free. Errors if binder does not exist.  clash-libDetermine whether a term does any work, i.e. adds to the size of the circuit  clash-lib)Determine if a term represents a constant  clash-libA conservative version of  . Is used to determine in bindConstantVar to determine whether an expression can be "bound" (locally inlined). While binding workfree expressions won't result in extra work for the circuit, it might very well cause extra work for Clash. In fact, using   in bindConstantVar makes Clash two orders of magnitude slower for some of our test cases.)In effect, this function is a version of   that also considers references to clocks and resets constant. This allows us to bind HiddenClock(ResetEnable) constructs, allowing Clash to constant spec subconstants - most notably KnownDomain. Doing that enables Clash to eliminate any case-constructs on it.  clash-libCreate 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 RHS  clash-libEnsure that the 5% of a variable does not occur in the   clash-lib,Make a global function for a name-term tuple  clash-lib+Add a function to the set of global binders  clash-libCreate a new name out of the given name, but with another unique. Resulting unique is guaranteed to not be in the given InScopeSet.  clash-libCreate a new name out of the given name, but with another unique. Resulting unique is guaranteed to not be in the given BindingMap.  clash-lib5Determine if a term cannot be represented in hardware  clash-lib5Determine if a type cannot be represented in hardware  clash-lib+Make a binder that should not be referenced  clash-libMake a case-decomposition that extracts a field out of a (Sum-of-)Product type  clash-lib)Specialise an application on its argument  clash-lib)Specialise an application on its argument  clash-lib=Create binders and variable references for free variables in specArg  clash-libEvaluate an expression to weak-head normal form (WHNF), and apply a transformation on the expression in WHNF.  clash-lib>Binds variables on the PureHeap over the result of the rewriteTo prevent unnecessary rewrites only do this when rewrite changed something.  clash-lib4Remove unused binders in given let-binding. Returns Nothing" if no unused binders were found.  clash-libName of the transformation clash-libTransformation to be applied  clash-libThe current debugging level clash-libTransformations to debug clash-libOnly print debug information for transformations [n, n+limit]. See flag documentation of "-fclash-debug-transformations-from" and "-fclash-debug-transformations-limit" clash-libName of the transformation clash-libOriginal expression clash-lib$Whether the rewrite indicated change clash-libNew expression  clash-libName of the transformation clash-libTransformation to perform clash-libTerm to transform  clash-lib TyCon cache clash-libName of the new binder clash-lib Term to bind  clash-lib TyCon cache clash-libName of the new binder clash-libType or Term to bind  clash-libName of the identifier  clash-lib Property test  clash-lib of the local binder clash-lib'Expression in which the binder is bound  clash-libFunction to check clash-libExpression to check it in  clash-libLet-binders to substitute clash-lib*Let-binders where substitution takes place clash-lib#Body where substitution takes place clash-lib Let-bindings that we wanted to substitute, but turned out to be recursive+1 Let-binders where substitution took place$2 Body where substitution took place  clash-lib5Let-binders to lift, and substitute the lifted result clash-lib*Lef-binders where substitution takes place clash-lib#Body where substitution takes place  clash-lib Property test clash-libTest whether to lift or inline True: inline False: lift  clash-libName of the function clash-libTerm bound to the function clash-lib6Name with a proper unique and the type of the function  clash-libString representable  clash-libString representable  clash-lib#Name of the caller of this function clash-lib TyCon cache clash-libSubject of the case-composition  clash-lib"Lens into previous specialisations clash-lib$Lens into the specialisation history clash-lib"Lens into the specialisation limit  clash-lib"Lens into previous specialisations clash-lib Lens into specialisation history clash-lib"Lens into the specialisation limit clash-lib Original term clash-libFunction part of the term, split into root and applied arguments clash-libArgument to specialize on  clash-libWhether the expression we're reducing to WHNF is the subject of a case expression.- - 1(C) 2015-2016, University of Twente, 2016 , Myrtle Software LtdBSD2 (see the file LICENSE)-Christiaan Baaij None &/02356789;<?  clash-libReplace an application of the Clash.Sized.Vector.reverse) primitive on vectors of a known length n3, by the fully unrolled recursive "definition" of Clash.Sized.Vector.reverse  clash-libReplace 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.zipWith  clash-libReplace 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.map  clash-libReplace 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.imap  clash-libReplace 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#  clash-libCreate the traversable vector*e.g. for a length '2' input vector, we get *(:>) <$> x0 <*> ((:>) <$> x1 <*> pure Nil)  clash-libReplace 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.foldr  clash-libReplace 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.fold  clash-libReplace 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.dfold  clash-libReplace 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.  clash-libReplace 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.  clash-libReplace 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.  clash-libReplace 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.  clash-libReplace 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.(++)  clash-libReplace 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.unconcat  clash-libReplace 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.transpose  clash-libReplace 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.dtfold  clash-libReplace 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.tdfold  clash-libLength of the vector clash-libElement of type of the vector clash-libThe vector to reverse  clash-libLength of the vector(s) clash-libType of the lhs of the function clash-libType of the rhs of the function clash-lib"Type of the result of the function clash-libThe zipWith'd functions clash-libThe 1st vector argument clash-libThe 2nd vector argument  clash-libLength of the vector clash-libArgument type of the function clash-libResult type of the function clash-libThe map'd function clash-libThe map'd over vector  clash-libLength of the vector clash-libArgument type of the function clash-libResult type of the function clash-libThe imap'd function clash-libThe imap'd over vector  clash-libLength of the vector clash-lib#Element type of the argument vector clash-libThe type of the applicative clash-lib!Element type of the result vector clash-libThe  Applicative dictionary clash-libThe function to traverse with clash-libThe argument vector  clash-libVec tcon clash-libNil con clash-libCons con clash-lib term clash-lib term clash-lib term clash-libb ty clash-libLength of the vector clash-libElements of the vector  clash-libLength of the vector clash-lib#Element type of the argument vector clash-libThe function to fold with clash-libThe starting value clash-libThe argument vector  clash-libLength of the vector clash-lib#Element type of the argument vector clash-libThe function to fold with clash-libThe argument vector  clash-libLength of the vector clash-lib#Element type of the argument vector clash-libFunction to fold with clash-libStarting value clash-libThe vector to fold  clash-libLength of the vector clash-libElement type of the vector clash-libThe argument vector  clash-libLength of the vector clash-libElement type of the vector clash-libThe argument vector  clash-libLength of the vector clash-libElement type of the vector clash-libThe argument vector  clash-libLength of the vector clash-libElement type of the vector clash-libThe argument vector  clash-libLength of the LHS arg clash-libLenght of the RHS arg clash-libElement type of the vectors clash-libThe LHS argument clash-libThe RHS argument  clash-libLength of the result vector clash-lib+Length of the elements of the result vector clash-lib Element type clash-libArgument vector  clash-libLength of the result vector clash-lib+Length of the elements of the result vector clash-lib Element type clash-libArgument vector  clash-libSize of vector clash-libType of vector element clash-libType of vector clash-libVector clash-libIndex clash-libElement  clash-libSize of vector clash-libType of vector element clash-libVector clash-libIndex  clash-libLength of the vector clash-lib#Element type of the argument vector clash-lib!Function to convert elements with clash-lib!Function to combine branches with clash-libThe vector to fold  clash-libDepth of the tree clash-lib!Element type of the argument tree clash-lib!Function to convert elements with clash-lib!Function to combine branches with clash-libThe tree to fold  clash-libDepth of the tree clash-lib Element type clash-lib Result type clash-libElement  2#(C) 2015-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij None &/02356789;<m  clash-lib Test if a  collected from an expression indicates that application of a global binder is disjoint: occur in separate branches of a case-expression.  clash-libCollect 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.  clash-libCollect 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.  clash-libGiven 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 distinct arguments of the case-tree, and the body is an application of the term applied to the shared arguments of the case tree, and projections of let-binding corresponding to the distinct argument positions.  clash-libSubstitution of (applications of) a global binder by a reference to a lifted term. clash-lib#List of already seen global binders clash-libThe expression  clash-libSubstitution of (applications of) a global binder by a reference to a lifted term. clash-lib#List of already seen global binders clash-libThe list of arguments  clash-libVariables in scope at the very top of the case-tree, i.e., the original expression clash-lib5Case-tree of arguments belonging to the applied term.  .(C) 2012-2016, University of Twente, 2016-2017, Myrtle Software Ltd,BSD2 (see the file LICENSE)-Christiaan Baaij None &/02356789;None #$%&/02356789;<K  clash-libHash a compiled primitive map. It needs a separate function (as opposed to just ) as it might contain (obviously unhashable) Haskell functions. This function takes the hash value stored with the function instead.  clash-libGenerate a set of primitives that are found in the primitive definition files in the given directories.  clash-lib4Determine what argument should be constant / literal  clash-lib?Looks up the plurality of a function's function argument. See  for more information. If not set, the returned plurality will default to 1.  clash-libunresolved primitives found in annotations (in LoadModules and LoadInterfaceFiles) clash-lib/Directories to search for primitive definitions  clash-libArguments passed to blackbox clash-lib Result type clash-lib0Argument number holding the function of interest clash-libPlurality of function. Defaults to 1. Does not err if argument isn't a function in the first place. State of monad will not be modified.   3#(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij None #$&/02356789;<  clash-lib>New let-bindings to be created for all the non-constants found  clash-libA term where all the non-constant constructs are replaced by variable references (found in  )  clash-libWhether the algorithm found a constant at all. (If it didn't, it's no use creating any new let-bindings!)  clash-libDetermine if argument should reduce to a constant given a primitive and an argument number. Caches results.  clash-libGiven a list of transformation contexts, determine if any of the contexts indicates that the current arg is to be reduced to a constant / literal.  clash-libDetermine if a function is already inlined in the context of the  NetlistMonad  clash-lib(Specialize under the Normalization Monad  clash-libDetermine if a term is closed  clash-libTest whether a given term represents a non-recursive global variable  clash-lib;Assert whether a name is a reference to a recursive binder.  clash-libCalculate constant spec info. The goal of this function is to analyze a given term and yield a new term that:+Leaves all the constant parts as they were.Has all _variable_ parts replaced by a newly generated identifier./The result structure will additionally contain:4Whether the function found any constant parts at allA list of let-bindings binding the aforementioned identifiers with the term they replaced.This can be used in functions wanting to constant specialize over partially constant data structures.  clash-lib9Collect all binders mentioned in CallGraph into a HashSet  clash-lib=Create a call graph for a set of global binders, given a root  clash-libGive a "performance/size" classification of a function in normal form.  clash-lib;Determine whether a function adds a lot of hardware or not.It is considered expensive when it has 2 or more of the following components: functions primitivesselections (multiplexers)  clash-libTurn type equality constraints into substitutions and apply them. So given: ?/\dom . \(eq : dom ~ "System") . \(eta : Signal dom Bool) . eta#we create the substitution [dom := System] and apply it to create: \(eq : "System" ~ "System") . \(eta : Signal "System" Bool) . etaNB: Users of this function should ensure it's only applied to TopEntities  clash-libThe type equivalent of   clash-lib7Rewrite a term according to the provided transformation  clash-libA tick to prefix an inlined expression with it's original name. For example, given?foo = bar -- ... bar = baz -- ... baz = quuz -- ...if bar is inlined into foo, then the name of the component should contain the name of the inlined component. This tick ensures that the component in foo is called bar_baz instead of just baz.  clash-libPrimitive name clash-libArgument number clash-libYields DontCare for if given primitive name is not found, if the argument does not exist, or if the argument was not mentioned by the blackbox.  clash-lib!..in the current transformcontext  clash-libFunction we want to inline clash-lib1Function in which we want to perform the inlining  clash-libFunction we want to inline clash-lib1Function in which we want to perform the inlining  clash-libTransformation to apply clash-libTerm to transform clash-lib&Renew current function being rewritten  4(C) 2018, Google Inc.BSD2 (see the file LICENSE)-Christiaan Baaij None &/02356789;<  5(C) 2012-2016, University of Twente, 2016-2017, Myrtle Software Ltd, 2017-2018, Google Inc.BSD2 (see the file LICENSE)-Christiaan Baaij None %&/02356789; STy Int SBool :: Bool -> STy Boolf :: STy ty -> ty f (SInt b) = b + 1 f (SBool True) = False f (SBool False) = True {- NOINLINE f -}g :: STy Int -> Int g = ff is always specialized on STy Int. The SBool alternatives are therefore unreachable. Additional information can be found at: 5https://github.com/clash-lang/clash-compiler/pull/465  clash-libTries to eliminate existentials by using heuristics to determine what the existential should be. For example, consider Vec:data Vec :: Nat -> Type -> Type where Nil :: Vec 0 a Cons x xs :: a -> Vec n a -> Vec (n + 1) aThus, / (annotated with existentials) could look like:null :: forall n . Vec n Bool -> Bool null v = case v of Nil {n ~ 0} -> True Cons {n1:Nat} {n~n1+1} (x :: a) (xs :: Vec n1 a) -> False8When it's applied to a vector of length 5, this becomes:null :: Vec 5 Bool -> Bool null v = case v of Nil {5 ~ 0} -> True Cons {n1:Nat} {5~n1+1} (x :: a) (xs :: Vec n1 a) -> FalseThis function solves n1 and replaces every occurrence with its solution. A very limited number of solutions are currently recognized: only adds (such as in the example) will be solved.  clash-libMove a Case-decomposition from the subject of a Case-decomposition to the alternatives  clash-libInline function with a non-representable result if it's the subject of a Case-decomposition  clash-libBring an application of a DataCon or Primitive in ANF, when the argument is is considered non-representable  clash-libEnsure that top-level lambda's eventually bind a let-expression of which the body is a variable-reference.  clash-libRemove unused let-bindings  clash-libInline let-bindings when the RHS is either a local variable reference or is constant (except clock or reset generators)  clash-lib/Push a cast over a case into it's alternatives.  clash-lib(Push a cast over a Letrec into it's body  clash-lib;Push cast over an argument to a function into that functionThis is done by specializing on the casted argument. Example: ) y = f (cast a) where f x = g x  transforms to: 6 y = f' a where f' x' = (x -> g x) (cast x') The reason d'etre for this transformation is that we hope to end up with and expression where two casts are "back-to-back" after which we can eliminate them in  .  clash-lib&Only inline casts that just contain a , because these are guaranteed work-free. These are the result of the   transformation.  clash-libEliminate two back to back casts where the type going in and coming out are the same 0 (cast :: b -> a) $ (cast :: a -> b) x ==> x  clash-libMake a cast work-free by splitting the work of to a separate binding 9let x = cast (f a b) ==> let x = cast x' x' = f a b  clash-libInline work-free functions, i.e. fully applied functions that evaluate to a constant  clash-libInline small functions  clash-libSpecialise functions on arguments which are constant, except when they are clock, reset generators.  clash-lib7Propagate arguments of application inwards; except for ( where the argument becomes let-bound.   tries to propagate as many arguments as possible, down as many levels as possible; and should be called in a top-down traversal.The idea is that this reduces the number of traversals, which hopefully leads to shorter compile times.Note [AppProp no shadowing]Case 1.Imagine: $(case x of D a b -> h a) (f x y) rewriting this to: 1let b = f x y in case x of D a b -> h a b is very bad because b in 'h a b' is now bound by the pattern instead of the newly introduced let-bindinginstead me must deshadow w.r.t. the new variable and rewrite to: 2let b = f x y in case x of D a b1 -> h a b Case 2.Imagine  (x -> e) u where u has a free variable named x, rewriting this to: let x = u in e would be very bad, because the let-binding suddenly captures the free variable in u. To prevent this from happening we over-approximate and check whether x is in the current InScopeSet, and deshadow if that's the case, i.e. we then rewrite to:let x1 = u in e [x:=x1]Case 3. The same for: (let x = w in e) u where u again has a free variable x, rewriting this to: let x = w in (e u) would be bad because the let-binding now captures the free variable in u.To prevent this from happening, we unconditionally deshadow the function part of the application w.r.t. the free variables in the argument part of the application. It is okay to over-approximate in this case and deshadow w.r.t the current InScopeSet.  clash-lib3Flatten ridiculous case-statements generated by GHC+For case-statements in haskell of the form: f :: 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  clash-libTurn an expression into a modified ANF-form. As opposed to standard ANF, constants do not become let-bound.  clash-lib9Eta-expand top-level lambda's (DON'T use in a traversal!)  clash-libEta-expand functions with a Synthesize annotation, needed to allow such functions to appear as arguments to higher-order primitives.  clash-libTurn 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.  clash-lib+Inline a function with functional arguments  clash-libSimplified CSE, only works on let-bindings, does an inverse topological sort of the let-bindings and then works from top to bottomXXX: Check whether inverse top-sort followed by single traversal removes as many binders as the previous "apply-until-fixpoint" approach in the presence of recursive groups in the let-bindings. If not but just for checking whether changes to transformation affect the eventual size of the circuit, it would be really helpful if we tracked circuit size in the regression/test suite. On the two examples that were tested, Reducer and PipelinesViaFolds, this new version of CSE removed the same amount of let-binders.  clash-libReplace 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.zipWithClash.Sized.Vector.mapClash.Sized.Vector.traverse#Clash.Sized.Vector.foldClash.Sized.Vector.foldrClash.Sized.Vector.dfoldClash.Sized.Vector.(++)Clash.Sized.Vector.headClash.Sized.Vector.tailClash.Sized.Vector.lastClash.Sized.Vector.initClash.Sized.Vector.unconcatClash.Sized.Vector.transposeClash.Sized.Vector.replicateClash.Sized.Vector.replace_intClash.Sized.Vector.imapClash.Sized.Vector.dtfoldClash.Sized.RTree.tdfoldClash.Sized.RTree.treplicate%Clash.Sized.Internal.BitVector.split#"Clash.Sized.Internal.BitVector.eq#  clash-libThis 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  clash-libGiven a function in the desired normal form, inline all the following let-bindings:Let-bindings with an internal name that is only used once, where it binds: * a primitive that will be translated to an HDL expression (as opposed to a HDL declaration) * a projection case-expression (1 alternative) * a data constructor * I/O actions  clash-libUsed by   to inline binders that we want to inline into the binders that we want to keep.  clash-libFlatten's letrecs after   0 sometimes exposes additional possibilities for  , which then introduces let-bindings in what should be ANF. This transformation flattens those nested let-bindings again.1NB: must only be called in the cleaning up phase.  clash-libWorker function of  .  clash-libSplit apart (global) function arguments that contain types that we want to separate off, e.g. Clocks. Works on both the definition side (i.e. the lambda), and the call site (i.e. the application of the global variable). e.g. turns 6f :: (Clock System, Reset System) -> Signal System Intinto 6f :: Clock System -> Reset System -> Signal System Int  clash-libRemove all undefined alternatives from case expressions, replacing them with the value of another defined alternative. If there is one defined alternative, the entire expression is replaced with that alternative. If there are no defined alternatives, the entire expression is replaced with a call to errorX.e.g. It convertscase x of D1 a -> f a D2 -> undefined D3 -> undefinedtolet subj = x a = case subj of D1 a -> field0 in f awhere fieldN is an internal variable referring to the nth argument of a data constructor.  clash-libCurrent InScopeSet clash-libOriginal let-binders with their free variables (+ #occurrences), that we want to inline clash-libProcessed let-binders with their free variables and a tag to mark the progress: * Temp: Will eventually form a recursive cycle * Done: Processed, non-recursive * Rec: Processed, recursive clash-libThe let-binders with their free variables (+ #occurrences), that we want to keep  clash-lib Lambda binder clash-lib Lambda body clash-libIf lambda is split up, this function returns a Just containing the new term( ( &#(C) 2012-2016, University of TwenteBSD2 (see the file LICENSE)-Christiaan Baaij None&/02356789;<&A  clash-libNormalisation transformation  clash-lib+Topdown traversal, stops upon first success  6(C) 2012-2016, University of Twente, 2016 , Myrtle Software Ltd, 2017 , Google Inc.BSD2 (see the file LICENSE)-Christiaan Baaij None &/02356789;<+  clash-libA tree of identifiers and their bindings, with branches containing additional bindings which are used. See Clash.Driver.Types.Binding.  clash-lib-Run a NormalizeSession in a given environment  clash-libCheck whether the normalized bindings are non-recursive. Errors when one of the components is recursive.  clash-libPerform general "clean up" of the normalized (non-recursive) function hierarchy. This includes:6Inlining functions that simply "wrap" another function  clash-lib Level of debug messages to print clash-lib UniqueSupply clash-libGlobal Binders clash-lib#Hardcoded Type -> HWType translator clash-lib TyCon cache clash-libTuple TyCon cache clash-lib%Hardcoded evaluator (delta-reduction) clash-libPrimitive Definitions  clash-lib=Map telling whether a components is part of a recursive group  clash-lib topEntities  clash-libNormalizeSession to run  clash-libList of normalized binders  clash-libVisited clash-libGlobal binders clash-libRoot of the call graph  +(C) 2012-2016, University of Twente, 2016-2017, Myrtle Software Ltd, 2017 , Google Inc.BSD2 (see the file LICENSE)-Christiaan Baaij None #$&/02356789;<4  clash-lib2Generate the context for a BlackBox instantiation.  clash-libExtract a compiled primitive from a guarded primitive. Emit a warning if the guard wants to, or fail entirely. clash-lib#Emits (colorized) warning to stderr clash-lib(Determine if a term represents a literal clash-libTurn a mealyIO expression into a two sequential processes, one "initial" process for the starting state, and one clocked sequential process. clash-lib(Collect the sequential declarations for bindIO clash-lib(Collect the sequential declarations for appIO clash-libUnwrap the new-type wrapper for things of type SimIO, this is needed to allow applications of the `State# World` token to the underlying IO type.XXX: this is most likely needed because Ghc2Core that threw away the cast that this unwrapping; we should really start to support casts. clash-libCreate 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  clash-libBlackbox function name clash-lib5Identifier binding the primitive/blackbox application clash-lib/Arguments of the primitive/blackbox application  clash-libName of primitive clash-libBlackbox function name clash-libLHS of the original let-binder clash-lib2Argument n (zero-indexed). Used for error message. clash-lib&Put BlackBox expression in parenthesis clash-lib(Treat BlackBox expression as declaration clash-libId to assign the result to clash-libPrimitive info clash-lib Arguments clash-libTick declarations clash-lib(Identifier to assign the final result to clash-lib Id to assign the final result to clash-libThe arguments to mealyIO clash-libIdentifier binding the encompassing primitive/blackbox application clash-libThe function argument term    7(C) 2020 QBayLogicBSD2 (see the file LICENSE)%QBayLogic B.V. None &/02356789;<6 clash-libCalculates the number of function calls needed for an evaluation of IK/, given the length of the vector given to fold. clash-lib8Type signature of function we're generating netlist for:+fold :: (a -> a -> a) -> Vec (n + 1) a -> aThe implementation promises to create a (balanced) tree structure.  ,(C) 2012-2016, University of Twente, 2016-2017, Myrtle Software Ltd, 2017-2018, Google Inc.BSD2 (see the file LICENSE)-Christiaan Baaij None #$%&/02356789;<G  clash-libGenerate a list of Declarations for a let-binder where the RHS is a function application  clash-libGenerate a list of Declarations for a let-binder, return an empty list if the bound expression is represented by 0 bits  clash-libGenerate a list of concurrent Declarations for a let-binder, return an empty list if the bound expression is represented by 0 bits  clash-libGenerate a declaration that selects an alternative based on the value of the scrutinee  clash-libGenerate an expression that projects a field out of a data-constructor.6Works for both product types, as sum-of-product types.  clash-libGenerate an expression for a DataCon application occurring on the RHS of a let-binder  clash-libGenerate an expression for a term occurring on the RHS of a let-binder  clash-lib3Generate a component for a given function (caching) clash-libGenerate a hierarchical netlist out of a set of global binders with  topEntity at the top. clash-lib0Run a NetlistMonad action in a given environment clash-lib)Generate a component for a given function  clash-libLHS of the let-binder clash-libName of the applied function clash-libFunction arguments clash-libTick declarations  clash-lib$Concurrent of sequential declaration clash-libLHS of the let-binder clash-libRHS of the let-binder  clash-libLHS of the let-binder clash-libRHS of the let-binder  clash-lib)Projection must bind to a simple variable clash-lib HWType translator clash-libIntWordInteger bit-width  clash-libvalid identifiers  clash-libextend valid identifiers  clash-lib3Whether the backend supports ifThenElse expressions  clash-libThe current HDL backend  clash-libSeen components clash-libHDL dir clash-libComponent name prefix clash-lib Name of the  topEntity clash-libWhether this we're compiling a testbench (suppresses certain warnings) clash-libOptions Clash was called with clash-lib,Custom bit representations for certain types clash-libGlobal binders clash-libTopEntity annotations clash-libPrimitive Definitions clash-lib TyCon cache clash-lib"Hardcode Type -> HWType translator clash-libIntWordInteger bit-width  clash-libvalid identifiers  clash-libextend valid identifiers  clash-lib3Whether the backend supports ifThenElse expressions  clash-libThe current HDL backend  clash-libSeen components clash-libHDL dir clash-libComponent name prefix clash-lib Action to run clash-libName of the function clash-libCorresponding term     8(C) 2012-2016, University of Twente, 2016-2017, Myrtle Software Ltd, 2017 , QBayLogic, Google Inc.BSD2 (see the file LICENSE)-Christiaan Baaij None%&/02356789;<W clash-libWorker function of  clash-lib.Get modification data of current clash binary. clash-lib7Create a set of target HDL files for a set of functions clash-libInterpret a specific function from a specific module. This action tries two things: Interpret without explicitly loading the module. This will succeed if the module was already loaded through a package database (set using interpreterArgs).If (1) fails, it does try to load it explicitly. If this also fails, an error is returned. clash-libList of known BlackBoxFunctions used to prevent Hint from firing. This improves Clash startup times. clash-libList of known TemplateFunctions used to prevent Hint from firing. This improves Clash startup times. clash-lib:Compiles blackbox functions and parses blackbox templates. clash-lib(Pretty print Components to HDL Documents clash-libPrepares the directory for writing HDL files. This means creating the dir if it does not exist and removing all existing .hdl files from it. clash-lib(Writes a HDL file to the given directory clash-libCopy given files clash-lib/Get all the terms corresponding to a call graph clash-libNormalize a complete hierarchy clash-lib#topologically sort the top entities  clash-lib3Source location of top entity (for error reporting) clash-libTop entity body clash-libPort annotations for top entity clash-libNew top entity with split ports (or the old one if not applicable)  clash-libSet of functions clash-lib Primitive / BlackBox Definitions clash-lib TyCon cache clash-libTuple TyCon cache clash-lib Hardcoded  -> HWType translator clash-lib%Hardcoded evaluator (delta-reduction) clash-lib(All topentities and associated testbench  clash-libMain top entity to compile. If Nothing, all top entities in previous argument will be compiled.  clash-lib5Debug information level for the normalization process clash-lib(Extra search path (usually passed as -i) clash-libInterpreter args clash-libThe folder in which the GHC bootstrap libraries (base, containers, etc.) can be found clash-libModule function lives in clash-lib Function name clash-lib Type name (BlackBoxFunction or TemplateFunction) clash-libImport directories (-i flag) clash-libPackage databases clash-libThe folder in which the GHC bootstrap libraries (base, containers, etc.) can be found clash-libPrimitive to compile clash-libBackend clash-libModule hierarchy root clash-libComponent names clash-libList of components clash-lib Top component clash-libName of the manifest file + Either: * Left manifest: Only write/update the hashes of the manifest/ * Right manifest: Update all fields of the manifest clash-libThe pretty-printed HDL documents + The update manifest file + The data files that need to be copied clash-libRemove existing HDL files clash-lib File extension of the HDL files. clash-libDirectory to copy files to clash-lib(filename, content) clash-lib All bindings clash-libRoot of the call graph  clash-lib All bindings clash-libBlackBox HDL templates clash-lib TyCon cache clash-libTuple TyCon cache clash-lib Hardcoded  -> HWType translator clash-lib%Hardcoded evaluator (delta-reduction) clash-lib TopEntities clash-lib5Debug information level for the normalization process  clash-lib Unique supply  clash-libroot of the hierarchy9(C) 2015-2016, University of Twente, 2017-2018, Google Inc.BSD2 (see the file LICENSE)-Christiaan Baaij None &/02356789;<Y clash-libState for the  monad: clash-libRange slice, can be contiguous, or split into multiple sub-ranges clash-libSelect a sub-range from a range clash-libStarts and ends clash-libType of the projection clash-libRange selected so far  :(C) 2015-2016, University of Twente, 2017-2018, Google Inc.BSD2 (see the file LICENSE)-Christiaan Baaij None &/02356789;<[ clash-libState for the NO monad:;(C) 2019, Myrtle Software Ltd. 2020, QBayLogic B.V.BSD2 (see the file LICENSE)%QBayLogic B.V. None &/02356789;<p  clash-libA typed expression. clash-libThe state of a block. Contains a list of declarations and a the backend state. clash-libCreate a blackBoxHaskell primitive. To be used as part of an annotation: {- ANN myFunction (blackBoxHaskell [1,2,3] VHDL 'myFunction 'myBBF) -}  clash-lib8A literal that can be used for hdl attributes. It has a  and  instances for convenience. clash-libThe low literal bit. clash-libThe high literal bit. clash-libRun a block declaration. clash-libExtract the elements of a vector expression and return expressions to them. If given expression is not an identifier, an intermediate variable will be used to assign the given expression to which is subsequently indexed. clash-libExtract the elements of a tuple expression and return expressions to them. These new expressions are given unique names and get declared the block scope. clash-lib+Construct a fully defined BitVector literal clash-libConvert a bool to a bit. clash-libUse to create an output  from a  . The expression given must be the identifier of the bool you wish to get assigned. Returns a reference to a declared   that should get assigned by something (usually the output port of an entity). clash-libUsed to create an output  from a  + of given size. Works in a similar way to  above. clash-libUsed to create an output   from a  + of given size. Works in a similar way to  above.#TODO: Implement for (System)Verilog clash-libUsed to create an output  from a number of  $s, using conjunction. Similarly to , it returns a list of references to declared values (the inputs to the function) which should get assigned by something---usually output ports of an entity.#TODO: Implement for (System)Verilog clash-libCreate a vector of s clash-libCreate an n-tuple of  clash-lib5Try to get the literal string value of an expression. clash-lib3Try to get the literal bool value of an expression. clash-lib2Try to get the literal nat value of an expression. clash-libAssign an input bitvector to an expression. Declares a new bitvector if the expression is not already a bitvector. clash-libAssign an output bitvector to an expression. Declares a new bitvector if the expression is not already a bitvector. clash-lib0Instantiate a component/entity in a block state. clash-libWires the two given s together using a newly declared signal with (exactly) the given name sigNm. The new signal has an annotated type, using the given attributes. clash-lib(The TExp inputs from a blackbox context. clash-lib&The TExp result of a blackbox context. clash-libGet an identifier to an expression, creating a new assignment if necessary. clash-lib And together (&&)3 two expressions, assigning it to a new identifier. clash-libNegate (not)1 an expression, assigning it to a new identifier. clash-lib.Creates a BV that produces the following vhdl:  (0 to n => ARG) #TODO: Implement for (System)Verilog clash-lib.Creates a BV that produces the following vhdl: ' std_logic_vector(resize(ARG, Size)) #TODO: Implement for (System)Verilog clash-lib(Allows assignment of a port to be "open" clash-libIgnored arguments clash-libhdl the blackbox is for clash-lib blackbox name clash-libtemplate function name clash-lib block name clash-lib block builder clash-libpretty printed block clash-lib!Name hint for intermediate signal clash-libVector expression clash-libVector elements clash-libTuple expression clash-lib"Name hints for element assignments clash-libBitVector size clash-libLiteral clash-lib!Name hint for intermediate signal clash-lib!Name hint for intermediate signal clash-lib!Name hint for intermediate signal clash-lib!Name hint for intermediate signal clash-libElements of vector clash-libVector elements clash-libBitVector name clash-lib expression clash-libBitVector expression clash-libBitVector name clash-lib expression clash-lib bv expression clash-libType of instantiation clash-libcomponent/entity name clash-libinstantiation label clash-lib attributes clash-libin ports clash-lib out ports clash-libName given to signal clash-lib$expression the signal is assigned to clash-lib?expression (must be identifier) to which the signal is assigned clash-lib*the attributes to annotate the signal with clash-lib0desired new identifier name, will be made unique clash-libexpression to get identifier of clash-libidentifier to expression clash-lib name hint clash-liba clash-liba clash-liba && b clash-lib name hint clash-liba clash-libnot a clash-lib name hint clash-libSize (n) clash-libARG clash-lib(0 to n => ARG) clash-lib name hint clash-libSize (n) clash-libARG clash-lib#std_logic_vector(resize(ARG, Size))))<(C) 2015-2016, University of Twente, 2017-2018, Google Inc.BSD2 (see the file LICENSE)-Christiaan Baaij None &/02356789;<r clash-libState for the  monad:PQRPSTPSUPQVPQWPQXPYZP[\]^_]^`abcdefdghdgidgjdgkdgldgmdgndgnopqrstuvwxyz{|}~                                                                           F                                                                                                                                   `                                                                             {yL                                                      !!!!!!!!!!!!!!!!!!!!!!!!!!!!""""""""""" " " " " " " " " " " " " " " " " " " " " " " " " " " " "" " " " " " "                                  ~                                                            {                                           x                                                             H                        # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # $ $ $ $ $ $ $ $ $ $ % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %% % & & ' ' ' ' ' ' ' ' ( ( ( ( ( ( ) * + + , , , , , , , , , - - . / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 . . . . . . . . . . . . . . . . . . . . . .     3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 & & & & 6 6 66666666666++++++++++777777777,,,,,,,,888888888888888889999999999999::;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ;;;;;;;;;;;;;;;<<PPPPPPPPPPPPPP=====PPPPJPPPPPPPPPPPPPP>PP?PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP===========================================================================AAAAAA  JEEEEEEEEFFFFaPPPPPP29PP <clash-lib-1.2.5-inplace Clash.UtilClash.Core.NameData.Text.Prettyprint.Doc.Extra Clash.DebugClash.Netlist.IdClash.Netlist.TypesClash.Util.GraphClash.Util.Interpolate Clash.Pretty Clash.UniqueClash.Core.TyConClash.Core.TypeClash.Core.TermClash.Core.VarClash.Core.SubstClash.Primitives.UtilClash.Core.DataConClash.Core.TysPrimClash.Core.LiteralClash.Netlist.BlackBox.TypesClash.Primitives.TypesClash.Netlist.BlackBox.ParserClash.Core.PrettyClash.Core.VarEnvClash.Driver.TypesClash.Core.FreeVarsClash.Core.EqSolverClash.Core.UtilClash.Core.TermLiteral.THClash.Core.TermLiteralClash.Core.TermInfoClash.Core.Evaluator.TypesClash.Core.Evaluator Clash.BackendClash.Rewrite.TypesClash.Rewrite.CombinatorsClash.Normalize.TypesClash.Normalize.Strategy Clash.Primitives.Sized.ToIntegerClash.Primitives.GHC.LiteralClash.Primitives.GHC.WordClash.Primitives.GHC.IntClash.Netlist.BlackBox Clash.Netlist,Clash.Annotations.BitRepresentation.ClashLibClash.Netlist.BlackBox.UtilClash.Netlist.UtilClash.Rewrite.Util#Clash.Normalize.PrimitiveReductionsClash.Normalize.DECClash.Normalize.UtilClash.Primitives.Intel.ClockGenClash.Normalize.TransformationsClash.NormalizeClash.Primitives.Sized.Vector Clash.DriverClash.Backend.VerilogClash.Backend.VHDLClash.Primitives.DSLClash.Backend.SystemVerilogData.List.Extra Data.List mapAccumLData.Semigroup.Monad.ExtraData.Set.Ordered.ExtraData.Vector.Primitive.ExtraGHC.BasicTypes.ExtraGHC.SrcLoc.ExtraPaths_clash_libData.Aeson.Extra Clash.MagicsetNameClash.Sized.Vectormapfold opt_ultra!Clash.Annotations.TopEntity.ExtraClash.Netlist.VHDLVHDLMbase Control.Arrowfirst Control.Monad<=<>=>&&&***second Data.FunctiononGHC.Stack.Types HasCallStackghcSrcLoc noSrcSpanSrcSpanlens-4.19.2-fd7b0f64eb00d030f1b2d4e2248439da0660a46c4ea5e96d1882e81b5cb9cefcControl.Lens.TH makeLensesprettyprinter-1.7.0-d6fbc7c2d5d827292a82ce641b87a86b0b57cb227536289fd5ebea0c8e82614dPrettyprinter.Render.Text renderLazyPrettyprinter.Internal layoutCompact layoutPretty UnboundedAvailablePerLine PageWidthlayoutPageWidth LayoutOptions debugIsOntraceIf traceWith traceShowWithIdTypeBasicExtended mkBasicId'stripDollarPrefixes NetlistMonadBlackBoxExpr Component DeclarationHWType IdentifiertopSortreverseTopSorti $fShowLine $fShowNode ClashPretty clashPrettyunsafeLookupEnvWorddefaultPprWidthshowDocremoveAnnotations fromPrettyUniqSetUniqMap Uniquable getUnique setUniqueUnique emptyUniqMap unitUniqMap nullUniqMap extendUniqMapextendUniqMapWithextendListUniqMap lookupUniqMaplookupUniqMap' elemUniqMapelemUniqMapDirectlynotElemUniqMap filterUniqMap delUniqMapdelListUniqMap unionUniqMapunionUniqMapWithdifferenceUniqMap listToUniqMap toListUniqMap eltsUniqMap mapUniqMap keysUniqMapmapMaybeUniqMapfoldrWithUniquefoldlWithUnique' emptyUniqSet unitUniqSet extendUniqSet unionUniqSet elemUniqSetnotElemUniqSetelemUniqSetDirectly lookupUniqSetdelUniqSetDirectly eltsUniqSet mkUniqSetuniqMapToUniqSet subsetUniqSet$fUniquableInt $fShowUniqMap$fClashPrettyUniqMap$fClashPrettyUniqSet$fFoldableUniqSet$fSemigroupUniqSet$fMonoidUniqSet$fBinaryUniqSet$fFunctorUniqMap$fFoldableUniqMap$fTraversableUniqMap$fSemigroupUniqMap$fMonoidUniqMap$fNFDataUniqMap$fBinaryUniqMapDoc layoutOneLine renderOneLineintintegercharlbracerbracecolonsemiequalscommadotlparenrparenspacebracketsbracestupled<+>vcathcatnestindentparensemptyDoc punctuate encloseSeplineline'softline softline'prettystringSstringsquotesdquotesalignhsepvsepisEmptyfillcolumnnestingflatAltcommentsquote $fIsStringfNameSortUserSystemInternalOccNameNamenameSortnameOccnameUniqnameLoc mkUnsafeNamemkUnsafeSystemNamemkUnsafeInternalName appendToName$fUniquableName$fHashableName $fOrdName$fEqName $fShowName $fGenericName $fNFDataName $fBinaryName $fEqNameSort $fOrdNameSort$fShowNameSort$fGenericNameSort$fNFDataNameSort$fHashableNameSort$fBinaryNameSort TyConNameTyConKiNameTyNameKindType mkTyConTyTmNameTermTyVarIdIdScopeGlobalIdLocalIdVarvarNamevarUniqvarTypeidScopeAttr' BoolAttr' IntegerAttr' StringAttr'attrName modifyVarNamemkTyVarmkId mkLocalId mkGlobalId setVarUnique setVarType isGlobalId isLocalId setIdScope$fUniquableVar$fOrdVar$fEqVar $fShowVar $fGenericVar $fNFDataVar $fHashableVar $fBinaryVar $fShowIdScope$fGenericIdScope$fNFDataIdScope$fHashableIdScope$fBinaryIdScope $fEqIdScope $fOrdIdScope $fEqAttr' $fShowAttr' $fNFDataAttr'$fGenericAttr'$fHashableAttr' $fOrdAttr' $fBinaryAttr'aeqType substTyWith MonadUnique getUniqueMClashException assertPanicassertPprPanicpprPanic callStackDoc warnPprTracepprTrace pprTraceDebugpprDebugAndThencurLoc makeCached makeCachedUcombineM indexNote' indexNoteclashLibVersionflogBaseclogBasepkgIdFromTypeablereportTimeDifforElseorElseswantedLanguageExtensionsunwantedLanguageExtensions$fExceptionClashException$fShowClashException$fMonadUniqueStateT decodeOrErrDcNameConTagDataConMkDatadcNamedcUniqdcTagdcType dcUnivTyVars dcExtTyVarsdcArgTys dcFieldLabels$fUniquableDataCon $fOrdDataCon $fEqDataCon $fShowDataCon$fGenericDataCon$fNFDataDataCon$fHashableDataCon$fBinaryDataCon AlgTyConRhs DataTyConNewTyCondataConsdataCon ntEtadRhsTyConMapAlgTyConFunTyCon PrimTyConSuperKindTyCon tyConUniq tyConName tyConKind tyConArityalgTcRhs isClassTc tyConSubst mkKindTyConisTupleTyConLike tyConDataCons isNewTypeTc$fUniquableTyCon $fEqTyCon $fShowTyCon$fGenericTyCon $fNFDataTyCon $fBinaryTyCon$fShowAlgTyConRhs$fGenericAlgTyConRhs$fNFDataAlgTyConRhs$fBinaryAlgTyConRhsliftedTypeKind typeNatKindtypeSymbolKind intPrimTy integerPrimTy charPrimTy stringPrimTy voidPrimTy wordPrimTy int64PrimTy word64PrimTy floatPrimTy doublePrimTy naturalPrimTybyteArrayPrimTy tysPrimMapLiteralIntegerLiteral IntLiteral WordLiteral Int64Literal Word64Literal StringLiteral FloatLiteral DoubleLiteral CharLiteralNaturalLiteralByteArrayLiteral literalType $fEqLiteral $fOrdLiteral $fShowLiteral$fGenericLiteral$fNFDataLiteral$fHashableLiteral$fBinaryLiteral KindOrTypeLitTyNumTySymTyConstTyArrowTypeViewFunTyTyConApp OtherTypeVarTyForAllTyAppTyAnnTypevarAttrstyViewcoreView coreView1mkFunTy mkTyConAppsplitTyConAppMtypeKindisPolyTy splitFunTy splitFunTyssplitFunForallTy mkPolyFunTysplitCoreFunForallTy isPolyFunTyisPolyFunCoreTy typeAttrsisFunTy applyFunTy findFunSubstreduceTypeFamilyisTypeFamilyApplication undefinedTy isIntegerTy normalizeType isClassTy$fShowTypeView $fShowType $fGenericType $fNFDataType$fHashableType $fBinaryType $fEqLitTy $fOrdLitTy $fShowLitTy$fGenericLitTy $fNFDataLitTy$fHashableLitTy $fBinaryLitTy $fEqConstTy $fOrdConstTy $fShowConstTy$fGenericConstTy$fNFDataConstTy$fHashableConstTy$fBinaryConstTyContext CoreContextAppFunAppArgTyAppC LetBindingLetBodyLamBody TyLamBodyCaseAlt CaseScrutCastBodyTickCAltPatDataPatLitPat DefaultPatWorkInfo WorkConstant WorkNever WorkVariable WorkAlwaysPrimInfoprimNameprimType primWorkInfoNameMod PrefixName SuffixName SuffixNamePSetNameTickInfoDeDupNoDeDupDataPrimLamTyLamAppTyAppLetrecCaseCastTickpatIdspatVars mkAbstractionmkTyLamsmkLamsmkAppsmkTmAppsmkTyAppsmkTicksisLambdaBodyCtx isTickCtx stripTicks collectArgs collectTickscollectArgsTicks collectBndrsprimArgpartitionTickswalkTermcollectTermIdsidToVarvarToId$fEqCoreContext$fShowCoreContext$fGenericCoreContext$fNFDataCoreContext$fHashableCoreContext$fBinaryCoreContext $fShowTerm $fGenericTerm $fNFDataTerm$fHashableTerm $fBinaryTerm$fEqPat$fOrdPat $fShowPat $fGenericPat $fNFDataPat $fHashablePat $fBinaryPat$fShowPrimInfo$fGenericPrimInfo$fNFDataPrimInfo$fHashablePrimInfo$fBinaryPrimInfo$fShowWorkInfo$fGenericWorkInfo$fNFDataWorkInfo$fHashableWorkInfo$fBinaryWorkInfo $fEqTickInfo$fShowTickInfo$fGenericTickInfo$fNFDataTickInfo$fHashableTickInfo$fBinaryTickInfo $fEqNameMod $fShowNameMod$fGenericNameMod$fNFDataNameMod$fHashableNameMod$fBinaryNameModHdlSynVivadoQuartusOtherDeclElementTextResultArgArgGenConstLitToVarSymTypTypMErrTypElemCompName IncludeName IndexTypeSizeLengthDepthMaxIndexFilePathTemplateGenIFAndIW64CmpLEBVSelIsLitIsVar IsActiveHighTagPeriod ActiveEdgeIsSync IsInitDefinedIsActiveEnableStrCmp OutputWireRegVarsGenSymRepeatDevNullSigDCtxNameBlackBoxTemplateBlackBoxFunction BlackBoxMeta bbOutputRegbbKind bbLibrary bbImportsbbFunctionPlurality bbIncludes bbRenderVoid TemplateKindTDeclTExpr RenderVoid NoRenderVoidemptyBlackBoxMeta $fShowElement$fGenericElement$fNFDataElement$fBinaryElement$fHashableElement $fShowDecl $fGenericDecl $fNFDataDecl $fBinaryDecl$fHashableDecl $fEqHdlSyn $fShowHdlSyn $fReadHdlSyn$fGenericHdlSyn$fNFDataHdlSyn$fBinaryHdlSyn$fHashableHdlSyn$fShowTemplateKind$fEqTemplateKind$fGenericTemplateKind$fNFDataTemplateKind$fBinaryTemplateKind$fHashableTemplateKind$fShowRenderVoid$fGenericRenderVoid$fNFDataRenderVoid$fBinaryRenderVoid$fHashableRenderVoid$fFromJSONRenderVoid PrimitiveBlackBoxHaskellnameworkInfo renderVoidkindwarning outputReg librariesimportsfunctionPluralityincludes resultName resultInittemplate usedArguments functionNamefunctionprimSort UsedArgumentsIgnoredArgumentsTemplateFormat TTemplateTHaskellTemplateSourceTFileTInlineBlackBoxFunctionNamePrimMapCompiledPrimMapGuardedCompiledPrimitiveCompiledPrimitiveResolvedPrimMapGuardedResolvedPrimitiveResolvedPrimitiveUnresolvedPrimitive$fShowBlackBoxFunctionName$fFromJSONPrimitive$fShowPrimitive$fGenericPrimitive$fNFDataPrimitive$fBinaryPrimitive$fHashablePrimitive$fFunctorPrimitive$fShowUsedArguments$fGenericUsedArguments$fHashableUsedArguments$fNFDataUsedArguments$fBinaryUsedArguments$fShowTemplateFormat$fGenericTemplateFormat$fHashableTemplateFormat$fNFDataTemplateFormat$fShowTemplateSource$fEqTemplateSource$fGenericTemplateSource$fNFDataTemplateSource$fEqBlackBoxFunctionName$fGenericBlackBoxFunctionName$fNFDataBlackBoxFunctionName$fBinaryBlackBoxFunctionName$fHashableBlackBoxFunctionNamerunParse PrettyPrecpprPrecpprPrec'ClashDoc SyntaxElementKeywordLitS QualifierClashAnnotation AnnContext AnnSyntax PrettyOptionsdisplayUniques displayTypesdisplayQualifierspprppr'fromPprshowPprshowPpr' tracePprIdtracePpr$fClashPrettyVar$fClashPrettyTerm $fPrettyLitTy$fClashPrettyType$fClashPrettyName$fDefaultPrettyOptions$fPrettyPrecLiteral$fPrettyPrecDataCon$fPrettyPrecVar$fPrettyPrecSrcSpan$fPrettyPrecTickInfo$fPrettyPrecTerm$fPrettyPrecLitTy$fPrettyPrecTyCon$fPrettyPrecType$fPrettyPrecText$fPrettyPrec(,)$fPrettyPrec[]$fPrettyPrecName$fPrettyPrecPat $fEqTypePrec $fOrdTypePrec$fEqClashAnnotation$fEqSyntaxElement$fShowSyntaxElementRnEnv InScopeSetVarSetVarEnv emptyVarEnv unitVarEnv lookupVarEnvlookupVarEnvDirectly lookupVarEnv' delVarEnv delVarEnvList extendVarEnvextendVarEnvWithextendVarEnvList nullVarEnv unionVarEnvunionVarEnvWithmkVarEnv mapVarEnvmapMaybeVarEnvfoldlWithUniqueVarEnv' eltsVarEnv elemVarEnv notElemVarEnv emptyVarSet unitVarSet unionVarSet elemVarSet notElemVarSetdelVarSetByKeymkVarSet eltsVarSetextendInScopeSetextendInScopeSetList unionInScope varSetInScope lookupInScopeelemInScopeSetelemUniqInScopeSetnotElemInScopeSet mkInScopeSetemptyInScopeSetuniqAway uniqAway'mkRnEnvrnOccLTyrnOccRTyrnTyBndr rnTyBndrsrnOccLIdrnOccRIdrnTmBndr rnTmBndrs$fClashPrettyInScopeSet$fGenericInScopeSet$fBinaryInScopeSetManifest manifestHash successFlags portInNames portInTypes portOutNames portOutTypescomponentNames ClashOptsopt_inlineLimit opt_specLimitopt_inlineFunctionLimitopt_inlineConstantLimit opt_dbgLevelopt_dbgTransformationsopt_dbgTransformationsFromopt_dbgTransformationsLimit opt_cachehdl opt_cleanhdl opt_primWarn opt_color opt_intWidth opt_hdlDir opt_hdlSynopt_errorExtraopt_floatSupportopt_importPathsopt_componentPrefixopt_newInlineStratopt_escapedIdsopt_forceUndefined opt_checkIDiropt_aggressiveXOptopt_inlineWFCacheLimit DebugLevel DebugNone DebugSilent DebugFinal DebugNameDebugTry DebugAppliedDebugAll BindingMapBinding bindingId bindingLoc bindingSpec bindingTerm defClashOpts$fHashableClashOpts$fShowManifest$fReadManifest$fEqDebugLevel$fOrdDebugLevel$fReadDebugLevel$fEnumDebugLevel$fGenericDebugLevel$fHashableDebugLevel$fBinaryBinding$fGenericBinding$fNFDataBinding $fShowBinding typeFreeVars typeFreeVars'localIdDoesNotOccurInlocalIdsDoNotOccurInlocalVarsDoNotOccurInlocalIdOccursInglobalIdOccursIn freeLocalVarsfreeIds freeLocalIds globalIdshasLocalFreeVarstermFreeTyVars termFreeVars'noFreeVarsOfType tyFVsOfTypeslocalFVsOfTermscountFreeOccurancesTypeEqSolutionSolutionAbsurdSolution NoSolution catSolutionssolveNonAbsurdssolveEqsolveAdd normalizeAdd isAbsurdAlt isAbsurdEqaltEqstypeEq$fShowTypeEqSolution$fEqTypeEqSolutionSubst substInScope substTmEnv substTyEnv substGblEnvTvSubst TvSubstEnvmkSubst mkTvSubst extendIdSubstextendIdSubstListextendGblSubstList extendTvSubstextendTvSubstListextendInScopeIdextendInScopeIdListsubstTy substTyInVarsubstGlobalsInExistentialssubstInExistentialsListsubstInExistentials maybeSubstTmsubstTmsubstAltsubstId deShadowTerm deShadowAltdeshadowLetExpr freshenTmaeqTerm $fOrdTerm$fEqTerm $fOrdType$fEqType$fClashPrettyTvSubstmkVec appendToVec extractElems extractTElemsmkRTree isSignalTypeisEnableisClockOrReset tyNatSizemkUniqSystemTyVarmkUniqSystemIdmkUniqInternalIddataConInstArgTysEdataConInstArgTysprimCo undefinedTm substArgTys tyLitShow shouldSplit shouldSplit0splitShouldSplitstripIPinverseTopSortLetBindingssccLetBindingsderiveTermToData TermLiteral termToDatatermToDataErroruncheckedTermToData$fTermLiteralBool$fTermLiteralMaybe$fTermLiteral(,)$fTermLiteralNatural$fTermLiteralChar$fTermLiteralInteger$fTermLiteralInt$fTermLiteralText$fTermLiteral[]$fTermLiteralTermtermSizetermTypeapplyTypeToArgs piResultTypiResultTyMaybe piResultTysisFun isPolyFunisLamisLetisVar isLocalVarisConisPrimValueLambdaTyLambdaDCPrimValSuspend TickValue CastValue StackFrameUpdateApply Instantiate PrimApply ScrutiniseTickishStackPureHeapPrimHeapMachine mPrimStep mPrimUnwind mHeapPrim mHeapGlobal mHeapLocalmStackmSupply mScopeNamesmTerm PrimEvaluator PrimUnwindPrimStep valToTermcollectValueTicks forcePrims primCount primLookup primInsert primUpdate heapLookup heapContains heapInsert heapDelete stackPushstackPop stackClear stackNullgetTermsetTerm$fClashPrettyStackFrame $fShowMachine$fShowStackFrame $fShowValueStepisUndefinedPrimValwhnf'whnf unwindStackstepVarstepData stepLiteralstepPrimstepLam stepTyLamstepApp stepTyApp stepLetRecstepCasestepCaststepTickstep newBinder newLetBindingunwindupdateapply instantiate scrutinise substInAltallocateletSubstBackend initBackendhdlKindprimDirs extension extractTypesgenHDL mkTyPackagehdlTypehdlTypeErrValue hdlTypeMark hdlRecSelhdlSiggenStmtinstexpriwWidthtoBVfromBVhdlSyn mkIdentifierextendIdentifier setModName setSrcSpan getSrcSpan blockDeclunextend addIncludes addLibraries addImports addAndSetData getDataFilesaddMemoryDataFilegetMemoryDataFilesseenIdentifiersifThenElseExprUsageExternalModName primsRootclashVerescapeTemplatemkUniqueIdentifier preserveSeenDeclarationType Concurrent Sequential NetlistIdCoreIdMultiIdTemplateFunction BBTemplate BBFunctionBBHashBBNameBlackBoxContextbbNamebbResultbbInputs bbFunctions bbQsysIncNamebbLevel bbCompName bbCtxNameBitHLUZNumLitBitLit BitVecLitBoolLitVecLit StringLitDataTag BlackBoxEConvBV IfThenElseNoopModifierIndexed VecAppend RTreeAppendSlicedNested PortDirectionInOut WireOrRegWireRegEntityOrComponentEntityCompEmptySeq AlwaysClockedInitial AlwaysCombSeqDeclBranch AssignmentCondAssignmentInstDecl BlackBoxDNetDecl'TickDeclVoidStringIntegerBool BitVectorIndexSignedUnsignedVectorRTreeSumProductSPClockReset BiDirectionalCustomSP CustomSum CustomProduct Annotated KnownDomainFileTypeFilteredHWTypeIsVoid componentNameinputsoutputs declarationsComment SomeBackendComponentPrefixcomponentPrefixTopcomponentPrefixOther NetlistState _bindings _varCount _components _primitives_typeTranslator_tcCache _curCompNm _intWidth_mkIdentifierFn_extendIdentifierFn_seenIds _seenComps_seenPrimitives_componentNames_topEntityAnns_hdlDir _curBBlvl_componentPrefix _customReprs _clashOpts _isTestBench _backEndITE_backend _htyCache NetlistEnv _prefixName _suffixName_setNameHWMap runNetlist TopEntityTtopId topAnnotationassociatedTestbenchNetDecl hwTypeAttrstoBit netlistId netlistId1 netlistTypes netlistTypes1emptyBBContext$fNFDataWireOrReg$fBinaryTemplateFunction$fNFDataTemplateFunction$fShowBlackBox $fNFDataExpr$fNFDataDeclaration$fNFDataComponent$fShowNetlistId$fFunctorNetlistMonad$fMonadNetlistMonad$fApplicativeNetlistMonad#$fMonadReaderNetlistEnvNetlistMonad$$fMonadStateNetlistStateNetlistMonad$fMonadIONetlistMonad$fMonadFailNetlistMonad$fShowComponent$fShowBlackBoxContext$fGenericBlackBox$fNFDataBlackBox$fBinaryBlackBox $fShowExpr$fShowDeclaration $fShowSeq$fEqBit $fShowBit$fLiftLiftedRepBit$fShowModifier$fEqFilteredHWType$fShowFilteredHWType $fEqHWType $fOrdHWType $fShowHWType$fGenericHWType$fNFDataHWType$fHashableHWType$fEqPortDirection$fOrdPortDirection$fShowPortDirection$fGenericPortDirection$fNFDataPortDirection$fHashablePortDirection$fShowWireOrReg$fGenericWireOrReg$fShowEntityOrComponent$fShowComponentPrefix$fGenericTopEntityT prefixName suffixName backEndITEbackendbindings clashOptscomponentPrefix componentscurBBlvl curCompNm customReprsextendIdentifierFnhdlDirhtyCacheintWidth isTestBenchmkIdentifierFn primitives seenCompsseenIdsseenPrimitivestcCache topEntityAnnstypeTranslatorvarCount RewriteState_transformCounter _uniqSupply_curFun _nameCounter _globalHeap_workFreeBinders_extra RewriteStept_ctxt_namet_bndrSt_beforet_after$fShowRewriteStep$fGenericRewriteStep$fNFDataRewriteStep$fHashableRewriteStep$fBinaryRewriteStep RewriteEnv _dbgLevel_dbgTransformations_dbgTransformationsFrom_dbgTransformationsLimit_aggressiveXOpt _tupleTcCache _evaluator _topEntitiescurFunextra globalHeap nameCountertransformCounter uniqSupplyworkFreeBindersRewrite TransformTransformContext tfInScope tfContext RewriteMonadRunRaggressiveXOptdbgLeveldbgTransformationsdbgTransformationsFromdbgTransformationsLimit evaluator topEntities tupleTcCacherunRcensor$fMonadFixRewriteMonad#$fMonadReaderRewriteEnvRewriteMonad$fMonadWriterAnyRewriteMonad$fMonadUniqueRewriteMonad$$fMonadStateRewriteStateRewriteMonad$fMonadRewriteMonad$fApplicativeRewriteMonad$fFunctorRewriteMonad$fMonadFailRewriteMonadallR>->>-!->topdownR bottomupR!->>-!repeatRwhenR bottomupWhenRNormalizeState _normalized_specialisationCache_specialisationHistory_specialisationLimit_inlineHistory _inlineLimit_inlineFunctionLimit_inlineConstantLimit_primitiveArgs_recursiveComponents_newInlineStrategy_normalizeUltra_inlineWFCacheLimitTermClassification _function _primitive _selection NormRewriteNormalizeSessionNormalizeMonadinlineConstantLimitinlineFunctionLimit inlineHistory inlineLimitinlineWFCacheLimitnewInlineStrategynormalizeUltra normalized primitiveArgsrecursiveComponentsspecialisationCachespecialisationHistoryspecialisationLimit$fShowTermClassification primitive selectionconstantPropagation normalizationbvToIntegerVerilogbvToIntegerVHDLindexToIntegerVerilogindexToIntegerVHDLsignedToIntegerVerilogsignedToIntegerVHDLunsignedToIntegerVerilogunsignedToIntegerVHDLunsignedsignedassign signedLiteralunsignedLiteral literalTFwordTFintTFmkBlackBoxContextextractPrimWarnOrFailmkFunAppmkDeclarations'mkDeclarations mkNetDecl mkSelection mkProjectionmkDcApplicationmkExpr genComponent coreToType' bitsToBitsrenderTemplate stripFiltered stripVoidflattenFiltered isVoidMaybeisVoidisFilteredVoidsplitNormalizedunsafeCoreTypeToHWType'unsafeCoreTypeToHWTypeunsafeCoreTypeToHWTypeM'unsafeCoreTypeToHWTypeMcoreTypeToHWTypeM'coreTypeToHWTypeMunexpectedProjectionErrorMsgconvertToCustomReprmaybeConvertToCustomReprcoreTypeToHWType'coreTypeToHWTypeoriginalIndicesmkADThasUnconstrainedExistential isRecursiveTyrepresentableTypetypeSizeconSize typeLength termHWType termHWTypeM isBiSignalIncontainsBiSignalIncollectPortNames'collectPortNamesfilterVoidPortsmkUniqueNormalized setBinderNamemkUniqueArgumentsmkUniqueResult idToInPort idToOutPortidToPortid2type id2identifierrepNamemkUnique preserveStatepreserveVarEnv dcToLiteral extendPortsportName prefixParentappendIdentifieruniquePortNamemkInput mkVectorChain mkRTreeChaingenComponentNamegenTopComponentNamestripAttributesmkOutput mkOutput'mkTopUnWrapperargBVresBVdoConv mkTopInputthrowAnnotatedSplitError mkTopOutput mkTopOutput'concatPortDecls3nestMbindsExistentialsiteAlts withTicks affixName zoomExtrafindAccidentialShadows applyDebug runRewriterunRewriteSession setChangedchangedclosestLetBinder mkDerivedName mkTmBinderFor mkBinderFor mkInternalVar inlineBinders isJoinPointIn tailCalls isVoidWrappersubstituteBindersliftAndSubsituteBindersisWorkFreeBinder isWorkFree isFromInt isConstantisConstantNotClockResetisWorkFreeClockOrResetOrEnable isWorkFreeIshinlineOrLiftBinders liftBindinguniqAwayBinder mkFunction addGlobalBindcloneNameWithInScopeSetcloneNameWithBindingMapisUntranslatableisUntranslatableTypemkWildValBindermkSelectorCase specialise specialise'normalizeTermTypes normalizeIdspecArgBndrsAndVarswhnfRW bindPureHeapremoveUnusedBinders reduceReverse reduceZipWith reduceMap reduceImapreduceTraverse mkTravVec reduceFoldr reduceFold reduceDFold reduceHead reduceTail reduceLast reduceInit reduceAppendreduceUnconcatreduceTransposereduceReplicatereduceReplace_intreduceIndex_int reduceDTFold reduceTFoldreduceTReplicate buildSNat isDisjointcollectGlobalscollectGlobalsArgsmkDisjointGroup $fEqCaseTree$fShowCaseTree$fFunctorCaseTree$fFoldableCaseTree inputHoleverifyBlackBoxContextextractLiteralssetSym selectNewNamerenderFilePathrenderBlackBox renderElem parseFailidToExprlineToIdentifier lineToType renderTagelementsToText elementToText exprToStringprettyBlackBox prettyElem walkElement usedVariablesgetUsedArguments onBlackBoxhashCompiledPrimMapgeneratePrimMap constantArgsgetFunctionPluralityConstantSpecInfocsrNewBindings csrNewTermcsrFoundConstant isConstantArg shouldReducealreadyInlined addNewInlinespecializeNormisClosedisNonRecursiveGlobalVarisRecursiveBndrconstantSpecInfocollectCallGraphUniques callGraphclassifyFunctionisCheapFunctionnormalizeTopLvlBndr substWithTyEqtvSubstWithTyEq rewriteExpr removedTm mkInlineTick$fShowConstantSpecInfoaltpllTF altpllQsysTF alteraPllTFalteraPllQsysTFalteraPllTemplatealtpllTemplatealtpllQsysTemplatealteraPllQsysTemplateinlineOrLiftNonReptypeSpec nonRepSpeccaseLetcaseElemNonReachableelemExistentialscaseCase inlineNonRepcaseCon nonRepANFtopLetdeadCoderemoveUnusedExprbindConstantVarcaseCastletCast argCastSpec inlineCasteliminateCastCast splitCastWorkinlineWorkFree inlineSmall constantSpec appPropFastcaseFlatmakeANFetaExpansionTL etaExpandSyn recToLetRecinlineHO simpleCSE reduceConstreduceNonRepPrimdisjointExpressionConsolidation inlineCleanupinlineBndrsCleanup flattenLetseparateLambdaseparateArguments xOptimize topdownSucR topdownRR innerMost applyManyCallTreeCLeafCBranchrunNormalization normalize normalize'checkNonRecursive cleanupGraph mkCallTree stripArgs flattenNodeflattenCallTreecallTreeToListwarnprepareBlackBox isLiteral mkArgument mkPrimitive collectMealy collectBindIO collectAppIOunSimIO mkFunInputFCallfoldFunctionPluralityfoldBBFfoldTFfoldTF'indexIntVerilogindexIntVerilogTFindexIntVerilogTemplate genNetlistrunNetlistMonadgenNames genComponentTreorderDefault reorderCustompatPos toSimpleVar splitTopAnnsplitTopEntityTgetClashModificationDate generateHDLloadImportAndInterpretknownBlackBoxFunctionsknownTemplateFunctionscompilePrimitiveprocessHintError createHDL prepareDirwriteHDLwriteMemoryDataFiles copyDataFilescallGraphBindingsnormalizeEntitysortTop VerilogStateRange ContiguousSplitincludeuselibs noEmptyInitcontinueWithRangeexprLitbitsbit_char encodingNote$fBackendVerilogState VHDLState$fBackendVHDLState BlockState_bsDeclarations _bsBackendblackBoxHaskell $fShowTExprLitHDLBSILowHigh declarationunvecuntuplebvLit boolToBit boolFromBitboolFromBitVectorunsignedFromBitVector boolFromBitsvectuplegetStrgetBooltExprToInteger exprToIntegerclog2tySizeinstDeclviaAnnotatedSignaltInputstResult toIdentifierandExprnotExprpureToBVpureToBVResizedopen$fIsStringLitHDL $fNumLitHDL $fShowLitHDLSystemVerilogState$fBackendSystemVerilogStateghc-prim GHC.TypesTrue Debug.Tracetrace traceMarkerIO traceMarker traceEventIO traceEvent traceStack traceShowMtraceM traceShowId traceShowtraceId putTraceMsgtraceIO GHC.MaybeNothing mapAccumLM<:> indexMaybecountEqzipEqualGHC.Base++GHC.Listfilterzip Data.Foldableelemminimummaximumfoldr1productsumfoldl1foldl'nullfoldlfoldrlength Data.OldListdeleteisSubsequenceOfData.Traversable mapAccumRfindnotElem minimumBy maximumByallanyorand concatMapconcatunwordswordsunlineslinesunfoldrsortOnsortBysort permutations subsequencestailsinitsgroupBygroupdeleteFirstsByunzip7unzip6unzip5unzip4zipWith7zipWith6zipWith5zipWith4zip7zip6zip5zip4genericReplicate genericIndexgenericSplitAt genericDrop genericTake genericLengthinsertByinsert partition transpose intercalate intersperse intersectBy intersectunionByunion\\deleteBynubBynub isInfixOf isSuffixOf isPrefixOf findIndices findIndex elemIndices elemIndex stripPrefix dropWhileEndunzip3unzipzipWith3zipWithzip3!!lookupreversebreakspansplitAtdroptake dropWhile takeWhilecycle replicaterepeatiterate'iteratescanr1scanrscanl'scanl1scanlfoldl1'initlasttailunconsheadextra-1.7.8-1d60d96903105a451f8b364a9e4b6ee3d212cb81bca3a6945a13a501d1a73e13Control.Monad.ExtraorMallManyM partitionMzipWithLongestnubOrdBynubOrdOnnubOrd nubSortBy nubSortOnnubSortchunksOf stripInfixEnd stripInfix stripSuffix dropSuffix dropPrefix dropWhileEnd'splitsplitOn breakOnEndbreakOn mconcatMapdropEnd1drop1 firstJustlinesBywordsByspanEndbreakEndreplacemergeBymerge productOn'product'sumOn'sum' groupSortBy groupSortOn groupSort minimumOn maximumOnnubOngroupOn unescapeJSON escapeJSON unescapeHTML escapeHTMLline1word1upperlowertrimtrimEnd trimStart takeWhileEnd concatUnzip3 concatUnzip zipWithFromzipFrom splitAtEnddropEndtakeEnd enumeratesnocconsunsnoclistnotNulllastDefheadDefallSameanySame disjointOrdBy disjointOrddisjoint repeatedly splitAtList equalLengthreducers-3.12.3-89cbda44896a619b6dfded82acd91202b9e59dd7b13c9350cd7cb430a0990486Data.Semigroup.MonadAction getActionMongetMonORSetOLSettoSetLtoSetRtoListLtoListRvector-0.12.1.2-850bb7d3dde0f69b9a2db473bd4c391afc555bd08772741d3f1ccaf46adcb1bfData.Vector.Primitive//primitive-0.7.1.0-b328b5a3c0324cbc68eab9bee1caf80f6415e22dbf64d789642929af80223012Data.Primitive.Typescopy unsafeCopyfreezethaw unsafeThaw unsafeFreeze fromListNfromListtoListscanr1'scanr' postscanr' postscanr prescanr'prescanrscanl1' postscanl' postscanl prescanl'prescanlfold1M'_foldM'_fold1M_foldM_fold1M'foldM'fold1MfoldM minIndexByminIndex maxIndexBymaxIndexifoldr'ifoldrifoldl'ifoldlfoldr1'foldr' partitionWithunstablePartitionfilterM imapMaybemapMaybeuniqifilter zipWithM_zipWithM izipWith6 izipWith5 izipWith4 izipWith3izipWithforM_forMmapM_mapMimapmodifyunsafeBackpermute backpermuteunsafeAccumulate_ unsafeAccum accumulate_accum unsafeUpdate_ unsafeUpdupdate_forcecreateTcreate iterateNM generateM replicateMenumFromThenTo enumFromTo enumFromStepN enumFromN constructrN constructN unfoldrNMunfoldrMunfoldrNiterateNgenerate singletonempty unsafeDrop unsafeTake unsafeTail unsafeInit unsafeSliceslice unsafeLastM unsafeHeadM unsafeIndexMlastMheadMindexM unsafeLast unsafeHead unsafeIndex!?!Data.Vector.Primitive.MutableMVectorData.Vector.Genericconvertversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileNameLineMaptoSpecNewlines genLineErr genLineErr'IntControl.Lens.TypeFold zipTvSubstsubstTyVarBndr substTyVar Data.EitherLeftRightGHC.Err undefinedpure<*>fmapCaseTreehashable-1.3.0.0-7741232b84c1acf4485a243d3c1b0a7c0d2db955ab8e9c7046fa85c52106bc44Data.Hashable.ClasshashVerilogMGHC.NumNum Data.StringIsStringSystemVerilogM