clash-prelude-1.4.2: Clash: a functional hardware description language - Prelude library
Copyright(C) 2013-2016 University of Twente
LicenseBSD2 (see the file LICENSE)
MaintainerChristiaan Baaij <christiaan.baaij@gmail.com>
Safe HaskellTrustworthy
LanguageHaskell2010
Extensions
  • TemplateHaskell
  • TemplateHaskellQuotes
  • ScopedTypeVariables
  • BangPatterns
  • ViewPatterns
  • DataKinds
  • InstanceSigs
  • StandaloneDeriving
  • DeriveDataTypeable
  • DeriveFunctor
  • DeriveTraversable
  • DeriveFoldable
  • DeriveGeneric
  • DefaultSignatures
  • DeriveLift
  • DerivingStrategies
  • MagicHash
  • KindSignatures
  • TupleSections
  • TypeOperators
  • ExplicitNamespaces
  • ExplicitForAll
  • BinaryLiterals
  • TypeApplications

Clash.Promoted.Nat.TH

Description

 
Synopsis

Declare a single d<N> literal

decLiteralD :: Integer -> Q [Dec] Source #

Create an SNat literal

$(decLiteralD 1111)
>>> :t d1111
d1111 :: SNat 1111

Declare ranges of d<N> literals

decLiteralsD :: Integer -> Integer -> Q [Dec] Source #

Create a range of SNat literals

$(decLiteralsD 1200 1202)
>>> :t d1200
d1200 :: SNat 1200
>>> :t d1201
d1201 :: SNat 1201
>>> :t d1202
d1202 :: SNat 1202