clash-lib-1.9.0: Clash: a functional hardware description language - As a library
Copyright(C) 2024 Martijn Bastiaan
LicenseBSD2 (see the file LICENSE)
MaintainerQBayLogic B.V. <devops@qbaylogic.com>
Safe HaskellNone
LanguageHaskell2010

Clash.Driver.BrokenGhcs

Description

Utilities to detect and report GHC / operating system combinations that are known to be buggy.

Synopsis

Documentation

os :: OS Source #

Current OS. Currently only recognizes Linux, Windows, and macOS.

data BrokenOn Source #

What OS GHC is broken on (or all)

Constructors

All 
SomeOs OS 

data GhcRange Source #

Constructors

GhcRange 

Fields

ghcInRange :: GhcVersion -> GhcRange -> Bool Source #

Check if a GhcVersion is within a GhcRange

ghcMajor :: Int -> Int -> GhcRange Source #

Construct a range of all GHC versions matching a major version

data Why Source #

Constructors

Why 

Fields

ghcVersion :: GhcVersion Source #

Get current GHC version expressed as a triple. It probably does something non-sensible on unreleased GHCs.

whyPp :: Why -> String Source #

Pretty print Why into an error message

brokenGhcs :: [Why] Source #

Which GHCs are broken and why

matchOs :: BrokenOn -> Bool Source #

Given a BrokenOn, determine whether current OS matches

matchBroken :: (BrokenOn, GhcRange) -> Bool Source #

Given a BrokenOn and GhcVersion, determine whether it matches current OS and GHC

broken :: Maybe Why Source #

Get first reason for GHC/OS being broken, if any

assertWorking :: IO () Source #

Throw an error if current OS / GHC version is known to be buggy