Skip to content

Commit

Permalink
changed autoSize to fromToInteger $ fromEnum
Browse files Browse the repository at this point in the history
  • Loading branch information
AirMover committed Jan 10, 2012
1 parent 8a01896 commit 60a9740
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/AI/CV/OpenCV/HighGui.hsc
Expand Up @@ -82,11 +82,9 @@ type AutoSize = Bool
titledWindow :: String -> AutoSize -> IO Int
titledWindow s a
= do cs <- newCString s
i <- cvNamedWindow cs (autoSize a)
i <- cvNamedWindow cs (fromToInteger $ fromEnum a)
return $ fromToInteger i

where autoSize b = if b then 1 else 0

fromToInteger :: (Integral a, Num b) => a -> b
fromToInteger = fromInteger . toInteger

Expand Down

0 comments on commit 60a9740

Please sign in to comment.