Skip to content

Instantly share code, notes, and snippets.

@vlad-shatskyi
Created December 4, 2014 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vlad-shatskyi/0c2f7e825bb71e4274d2 to your computer and use it in GitHub Desktop.
Save vlad-shatskyi/0c2f7e825bb71e4274d2 to your computer and use it in GitHub Desktop.
calculatePadding :: Int -> Int
calculatePadding = ceiling . log . fromIntegral
Defaulting the following constraint(s) to type ‘Double’
(RealFrac b0)
arising from a use of ‘ceiling’ at src/Cat/Decorators.hs:21:22-28
(Num b0)
arising from a use of ‘fromIntegral’
at src/Cat/Decorators.hs:21:38-49
(Floating b0)
arising from a use of ‘log’ at src/Cat/Decorators.hs:21:32-34
In the first argument of ‘(.)’, namely ‘ceiling’
In the expression: ceiling . log . fromIntegral
In the expression: ceiling . log . fromIntegral $ a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment