Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No blackbox found for: GHC.Integer.Type.gcdInteger #369

Open
bgamari opened this issue Oct 7, 2018 · 0 comments
Open

No blackbox found for: GHC.Integer.Type.gcdInteger #369

bgamari opened this issue Oct 7, 2018 · 0 comments

Comments

@bgamari
Copy link
Contributor

bgamari commented Oct 7, 2018

It is very easy to stumble into this with realToFrac:

{-# LANGUAGE ScopedTypeVariables #-}

module Hi where

import Clash.Prelude

{-# ANN test
    ((defSyn "test")
             { t_name = "test"
             , t_inputs = [PortName "x"]
             , t_output = PortName "out"
             })
 #-}
test :: Signal System (SFixed 16 16)
     -> Signal System (SFixed 18 18)
test = fmap realToFrac

Admittedly, realToFrac is defined in terms of toRational . fromRational so this may be something just Clash just can't reasonably be expected to implement. Afterall, I suspect that resizeF would be a better replacement for realToFrac in most cases.

@christiaanb christiaanb added this to the 1.1 milestone Dec 18, 2018
@christiaanb christiaanb modified the milestones: 1.1, 1.2 Jan 16, 2020
@martijnbastiaan martijnbastiaan removed this from the 1.4 milestone Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants