-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Clash: a functional hardware description language - GHC frontend
--
-- Clash is a functional hardware description language that borrows both
-- its syntax and semantics from the functional programming language
-- Haskell. The Clash compiler transforms these high-level descriptions
-- to low-level synthesizable VHDL, Verilog, or SystemVerilog.
--
-- Features of Clash:
--
--
-- - Strongly typed, but with a very high degree of type inference,
-- enabling both safe and fast prototyping using concise
-- descriptions.
-- - Interactive REPL: load your designs in an interpreter and easily
-- test all your component without needing to setup a test bench.
-- - Higher-order functions, with type inference, result in designs
-- that are fully parametric by default.
-- - Synchronous sequential circuit design based on streams of values,
-- called Signals, lead to natural descriptions of feedback
-- loops.
-- - Support for multiple clock domains, with type safe clock domain
-- crossing.
--
--
-- This package provides:
--
--
-- - Clash Compiler binary using GHC/Haskell as a frontend
--
--
-- Prelude library:
-- https://hackage.haskell.org/package/clash-prelude
@package clash-ghc
@version 1.8.1
module Clash.GHC.NetlistTypes
ghcTypeToHWType :: Int -> CustomReprs -> TyConMap -> Type -> State HWMap (Maybe (Either String FilteredHWType))
-- | This module provides the "evaluation" part of the partial evaluator.
-- This is implemented in the classic "eval/apply" style, with a variant
-- of apply for performing type applications.
module Clash.GHC.PartialEval.Eval
-- | Evaluate a term to WHNF.
eval :: Term -> Eval Value
apply :: Value -> Value -> Eval Value
applyTy :: Value -> Type -> Eval Value
-- | Evaluation of primitive operations in the partial evaluator. This is
-- used by the Clash.GHC.PartialEval.Eval module to implement fully
-- applied primitives.
module Clash.GHC.PartialEval.Primitive
-- | Evaluate a primitive with the given arguments. See NOTE [Evaluating
-- primitives] for more information.
evalPrimitive :: (Term -> Eval Value) -> PrimInfo -> Args Value -> Eval Value
-- | This module provides the "quoting" part of the partial evaluator,
-- which traverses a WHNF value, recursively evaluating sub-terms to
-- remove redexes.
module Clash.GHC.PartialEval.Quote
quote :: Value -> Eval Normal
-- | The partial evalautor for the GHC front-end. This can be used to
-- evaluate terms in Clash core to WHNF or NF, using knowledge of GHC
-- primitives and types. For functions which can use this evaluator, see
-- Clash.Core.PartialEval.
module Clash.GHC.PartialEval
-- | The partial evaluator for the GHC front-end. For more details about
-- the implementation see Clash.GHC.PartialEval.Eval for evaluation to
-- WHNF and Clash.GHC.PartialEval.Quote for quoting to NF.
ghcEvaluator :: Evaluator
module Clash.GHCi.Common
checkImportDirs :: Foldable t => ClashOpts -> t FilePath -> IO ()
-- | Checks whether MonoLocalBinds and MonomorphismRestriction language
-- extensions are enabled when generating the HDL directly e.g. in GHCi.
-- modules.
checkMonoLocalBinds :: DynFlags -> IO ()
-- | Checks whether MonoLocalBinds and MonomorphismRestricton language
-- extensions are enabled or not in modules.
checkMonoLocalBindsMod :: ModSummary -> IO ()
getMainTopEntity :: HasCallStack => String -> ClashDesign -> String -> IO (TopEntityT, [TopEntityT])
module Clash.GHC.LoadModules
loadModules :: Ghc () -> OverridingBool -> HDL -> String -> Maybe DynFlags -> [FilePath] -> IO ([CoreBind], [(CoreBndr, Int)], [CoreBndr], FamInstEnvs, [(CoreBndr, Maybe TopEntity, Bool)], [Either UnresolvedPrimitive FilePath], [DataRepr'], [(Text, PrimitiveGuard ())], HashMap Text VDomainConfiguration)
ghcLibDir :: IO FilePath
setWantedLanguageExtensions :: DynFlags -> DynFlags
instance GHC.Exception.Type.Exception Clash.GHC.LoadModules.LoadModulesException
instance GHC.Show.Show Clash.GHC.LoadModules.LoadModulesException
module Clash.GHC.GenerateBindings
generateBindings :: ClashOpts -> Ghc () -> [FilePath] -> [FilePath] -> [FilePath] -> HDL -> String -> Maybe DynFlags -> IO (ClashEnv, ClashDesign)
module Clash.GHC.Evaluator.Primitive
ghcPrimStep :: PrimStep
-- | Evaluation of primitive operations.
ghcPrimUnwind :: PrimUnwind
isUndefinedPrimVal :: Value -> Bool
isUndefinedXPrimVal :: Value -> Bool
instance Control.Monad.State.Class.MonadState Control.Concurrent.Supply.Supply Clash.GHC.Evaluator.Primitive.PrimEvalMonad
instance GHC.Base.Monad Clash.GHC.Evaluator.Primitive.PrimEvalMonad
instance GHC.Base.Applicative Clash.GHC.Evaluator.Primitive.PrimEvalMonad
instance GHC.Base.Functor Clash.GHC.Evaluator.Primitive.PrimEvalMonad
instance Clash.Util.MonadUnique Clash.GHC.Evaluator.Primitive.PrimEvalMonad
-- | Call-by-need evaluator based on the evaluator described in:
--
-- Maximilian Bolingbroke, Simon Peyton Jones, "Supercompilation by
-- evaluation", Haskell '10, Baltimore, Maryland, USA.
module Clash.GHC.Evaluator
evaluator :: Evaluator
stepVar :: Id -> Step
stepData :: DataCon -> Step
stepLiteral :: Literal -> Step
stepPrim :: PrimInfo -> Step
stepLam :: Id -> Term -> Step
stepTyLam :: TyVar -> Term -> Step
stepApp :: Term -> Term -> Step
stepTyApp :: Term -> Type -> Step
stepLet :: Bind Term -> Term -> Step
stepCase :: Term -> Type -> [Alt] -> Step
stepCast :: Term -> Type -> Type -> Step
stepTick :: TickInfo -> Term -> Step
-- | Small-step operational semantics.
ghcStep :: Step
-- | Take a list of types or type variables and create a lambda / type
-- lambda for each one around the given term.
newBinder :: [Either TyVar Type] -> Term -> Step
newLetBinding :: TyConMap -> Machine -> Term -> (Machine, Id)
-- | Unwind the stack by 1
ghcUnwind :: Unwind
-- | Update the Heap with the evaluated term
update :: IdScope -> Id -> Value -> Machine -> Machine
-- | Apply a value to a function
apply :: TyConMap -> Value -> Id -> Machine -> Machine
-- | Instantiate a type-abstraction
instantiate :: TyConMap -> Value -> Type -> Machine -> Machine
-- | Evaluate a case-expression
scrutinise :: Value -> Type -> [Alt] -> Machine -> Machine
substInAlt :: DataCon -> [TyVar] -> [Id] -> [Either Term Type] -> Term -> Term
-- | Allocate let-bindings on the heap
allocate :: [LetBinding] -> Term -> Machine -> Machine
-- | Create a unique name and substitution for a let-binder
letSubst :: PureHeap -> Supply -> Id -> (Supply, (Id, (Id, Term)))
module Clash.Main
defaultMain :: [String] -> IO ()
defaultMainWithAction :: Ghc () -> [String] -> IO ()