Skip to content

Instantly share code, notes, and snippets.

View christiaanb's full-sized avatar

Christiaan Baaij christiaanb

  • QBayLogic
  • Enschede, The Netherlands
View GitHub Profile
module UART where
import CLaSH.Prelude
import qualified Data.List as L
type Byte = Unsigned 8
data TxState
= TxIdle
| TxStart (Unsigned 8)
{-# LANGUAGE FlexibleInstances #-}
module HKDClash where
import Clash.Prelude
import Data.Functor.Identity
type family HKD f a where
HKD Identity a = a
HKD f a = f a
@christiaanb
christiaanb / gist:7d59800fb49170102a0453513fac4126
Created July 5, 2018 12:19
plugins + TH + GHC 8.6rc1 = fail
WARNING in hptSomeThingsBelowUs
missing module GHC.TypeLits.KnownNat.Solver
Probable cause: out-of-date interface files
[34 of 67] Compiling Clash.Signal.Bundle ( src/Clash/Signal/Bundle.hs, /home/christiaan/devel/clash-prelude/dist-newstyle/build/x86_64-linux/ghc-8.6.0.20180627/clash-prelude-0.99/build/Clash/Signal/Bundle.o )
src/Clash/Signal/Bundle.hs:1:1: fatal:
cannot find object file for module ‘GHC.TypeLits.KnownNat.Solver’
while linking an interpreted expression
{-# LANGUAGE ImplicitParams, RankNTypes, DataKinds,
TypeApplications, ScopedTypeVariables, KindSignatures,
ConstraintKinds, AllowAmbiguousTypes #-}
module NewHidden where
import qualified GHC.Classes
import GHC.TypeLits
import Unsafe.Coerce
type Hidden (x :: Symbol) a = GHC.Classes.IP x a
module LiftIOPlugin where
import GHC.Builtin.Names (ioTyConName)
import GHC.Core.Coercion (mkUnivCo)
import GHC.Core.Coercion.Axiom (Role (Nominal))
import GHC.Core.Predicate (EqRel (NomEq), Pred (EqPred), classifyPredType)
import GHC.Core.TyCo.Rep (UnivCoProvenance (PluginProv))
import GHC.Core.TyCon (tyConName)
import GHC.Core.Type (isTyVarTy, splitTyConApp_maybe)
import GHC.Driver.Plugins (Plugin (..), defaultPlugin, purePlugin)
$date 2022-07-20T11:42:42 $end
$version Generated by Clash 1.7.0 $end
$comment No comment $end
$timescale 5000000ps $end
$scope module logic $end
$var wire 64 ! clockSignal500 $end
$var wire 64 " clockSignal0 $end
$upscope $end
$enddefinitions $end
#0