
bob
By: a guest on Jun 5th, 2009 | syntax:
None | size: 1.19 KB | hits: 22 | expires: Never
$ ghci unlag.hs
GHCi, version 6.8.2: http://www.haskell.org/ghc/ :? for help
Loading package base ... linking ... done.
[1 of 1] Compiling Main ( unlag.hs, interpreted )
unlag.hs:7:43:
Couldn't match expected type `a' against inferred type `a1'
`a' is a rigid type variable bound by
the type signature for `max_unlagged' at unlag.hs:9:26
`a1' is a rigid type variable bound by
the type signature for `sv_fps' at unlag.hs:3:20
In the second argument of `(*)', namely `(1000 `div` fps)'
In the expression: max_unlagged_markers * (1000 `div` fps)
In the definition of `unlagged':
unlagged = max_unlagged_markers * (1000 `div` fps)
unlag.hs:10:0:
Inferred type is less polymorphic than expected
Quantified type variable `a' is mentioned in the environment:
max_unlagged_markers :: a (bound at unlag.hs:15:0)
When trying to generalise the type inferred for `max_unlagged'
Signature type: forall a. (Integral a) => a -> (a, String)
Type to generalise: a -> (a, String)
In the type signature for `max_unlagged'
When generalising the type(s) for `max_unlagged'
Failed, modules loaded: none.
Prelude> Leaving GH