diff --git a/clash-ghc/src-ghc/Clash/GHC/Evaluator/Primitive.hs b/clash-ghc/src-ghc/Clash/GHC/Evaluator/Primitive.hs index 90a122e084..d9f84aa707 100644 --- a/clash-ghc/src-ghc/Clash/GHC/Evaluator/Primitive.hs +++ b/clash-ghc/src-ghc/Clash/GHC/Evaluator/Primitive.hs @@ -25,7 +25,7 @@ module Clash.GHC.Evaluator.Primitive , isUndefinedXPrimVal ) where -import qualified Control.Lens as Lens +--import qualified Control.Lens as Lens import Control.Concurrent.Supply (Supply,freshId) import Control.DeepSeq (force) import Control.Exception (ArithException(..), Exception, tryJust, evaluate) @@ -94,26 +94,26 @@ import TysWiredIn (tupleTyCon) import Clash.Class.BitPack (pack,unpack) import Clash.Core.DataCon (DataCon (..)) import Clash.Core.Evaluator.Types -import Clash.Core.FreeVars (typeFreeVars) +--import Clash.Core.FreeVars (typeFreeVars) import Clash.Core.HasType (piResultTys, applyTypeToArgs) import Clash.Core.Literal (Literal (..)) import Clash.Core.Name (Name (..), NameSort (..), mkUnsafeSystemName) import Clash.Core.Pretty (showPpr) -import Clash.Core.Subst (extendTvSubst, mkSubst, substTy) +--import Clash.Core.Subst (extendTvSubst, mkSubst, substTy) import Clash.Core.Term (IsMultiPrim (..), Pat (..), PrimInfo (..), Term (..), WorkInfo (..), mkApps, PrimUnfolding(..), collectArgs) import Clash.Core.Type (Type (..), ConstTy (..), LitTy (..), TypeView (..), mkFunTy, mkTyConApp, - normalizeType, splitFunForallTy, tyView) + {- normalizeType ,-} splitFunForallTy, tyView) import Clash.Core.TyCon (TyConMap, TyConName, tyConDataCons) import Clash.Core.TysPrim import Clash.Core.Util (mkRTree,mkVec,tyNatSize,dataConInstArgTys,primCo, mkSelectorCase,undefinedPrims, undefinedXPrims) -import Clash.Core.Var (mkLocalId, mkTyVar, varName) +import Clash.Core.Var (mkLocalId, mkTyVar, {- varName -}) import qualified Clash.Data.UniqMap as UniqMap import Clash.Debug import Clash.GHC.GHC2Core (modNameM) @@ -4365,11 +4365,11 @@ ghcPrimStep tcm isSubj pInfo tys args mach = case primName pInfo of -- - Specialised folds "Clash.Sized.Vector.dfold" | isSubj - , pTy : kTy : aTy : _ <- tys - , _ : p : f : z : xs : _ <- args - , DC _ vArgs <- xs - , Right k' <- runExcept (tyNatSize tcm kTy) - -> case k' of + , _pTy : kTy : _aTy : _ <- tys + , _ : _p : _f : _z : xs : _ <- args + , DC _ _vArgs <- xs + , Right _k' <- runExcept (tyNatSize tcm kTy) + -> error "DO WE EVER TEST THIS?" {-case k' of 0 -> reduce (valToTerm z) _ -> let (tyArgs,_) = splitFunForallTy ty (tyArgs',_) = splitFunForallTy (Either.rights tyArgs !! 2) @@ -4405,9 +4405,9 @@ ghcPrimStep tcm isSubj pInfo tys args mach = case primName pInfo of ,Left (valToTerm z) ,Left (Either.lefts vArgs !! 2) ]) - ] + ] -} where - is0 = mScopeNames mach + _is0 = mScopeNames mach "Clash.Sized.Vector.dtfold" | isSubj , pTy : kTy : aTy : _ <- tys