music-suite/lilypond

ghc 7.4.1 compile failure

Closed this issue · 1 comments

jgm commented
src/Music/Lilypond.hs:892:58:
    Ambiguous type variable `a0' in the constraints:
      (Floating a0)
        arising from a use of `logBaseR' at src/Music/Lilypond.hs:892:58-65
      (Fractional a0)
        arising from the literal `0.0' at src/Music/Lilypond.hs:892:28-30
      (RealFloat a0)
        arising from a use of `logBaseR' at src/Music/Lilypond.hs:892:58-65
      (RealFrac a0)
        arising from a use of `properFraction'
        at src/Music/Lilypond.hs:892:41-54
    Possible cause: the monomorphism restriction applied to the following:
      equalTo :: a0 -> a0 -> Bool (bound at src/Music/Lilypond.hs:894:1)
    Probable fix: give these definition(s) an explicit type signature
                  or use -XNoMonomorphismRestriction
    In the first argument of `(.)', namely `logBaseR (toRational n)'
    In the second argument of `(.)', namely
      `logBaseR (toRational n) . toRational'
    In the second argument of `(.)', namely
      `properFraction . logBaseR (toRational n) . toRational'

Fixed by adding type signature at line 894:

equalTo :: Eq a => a -> a -> Bool
equalTo  = (==)

Thanks, merged!