clash-prelude-0.99.1: CAES Language for Synchronous Hardware - 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

Clash.Promoted.Nat.TH

Contents

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