Skip to content

Instantly share code, notes, and snippets.

View martijnbastiaan's full-sized avatar

Martijn Bastiaan martijnbastiaan

  • QBayLogic B.V.
  • Enschede, Netherlands
View GitHub Profile
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE AllowAmbiguousTypes #-}
module Lib where
data Person = Person
{ firstName :: !String
-- ^ First name
, lastName :: !String
-- ^ Last name
, age :: !Int
-- ^ Age
} deriving (Eq, Show)
[ { "BlackBox" :
{ "name" : "BlockRamHack.blockRam1#"
, "type" :
"blockRam#
:: HasCallStack -- ARG[0]
=> Clock dom gated -- clk, ARG[1]
-> Vec n a -- init hack ARG[2]
-> a -- init, ARG[3]
-> Signal dom Int -- rd, ARG[4]
-> Signal dom Bool -- wren, ARG[5]
src/Clash/Primitives/Intel/Fourteennm.hs:419:43: error:
• Expected kind ‘k1 -> *’, but ‘Reset clk’ has kind ‘*’
• In the second argument of ‘(:::)’, namely ‘Reset clk synchronous’
In the type signature:
fourteennm_mac# :: forall ax
ay_scan_in
az
bx
by
bz
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
module CPU where
import Clash.Prelude
import Data.Maybe (isJust)
import Control.DeepSeq (NFData)
import GHC.Generics (Generic)
module Pipeline where
import Clash.Prelude
(<@>)
:: ( HiddenClockResetEnable dom
, Undefined b
, Default b
)
=> (a -> b)
[..]
data CPUState waitCycles
= Idle
| Waiting (Index waitCycles)
deriving (Generic, NFData, Show)
[..]
cpu
[..]
data CPUState waitCycles
= Idle
| Waiting (Index waitCycles)
deriving (Generic, NFData, Show)
[..]
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -Wall -Wno-missing-methods #-}
module HasNat where
{-# LANGUAGE CPP #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
#if __GLASGOW_HASKELL__ < 806
{-# LANGUAGE TypeInType #-}
#endif