]> Git — Sourcephile - doclang.git/blob - Hdoc/TCT/Utils.hs
vim: polish code
[doclang.git] / Hdoc / TCT / Utils.hs
1 module Hdoc.TCT.Utils where
2
3 import Data.Function ((.), flip)
4 import Data.Functor (Functor, (<$>))
5 import Data.Int (Int, Int64)
6 import Prelude (Num(..), Integral(..))
7
8 -- * 'Int'
9 int :: Integral i => i -> Int
10 int = fromInteger . toInteger
11
12 int64 :: Integral i => i -> Int64
13 int64 = fromInteger . toInteger
14
15 -- * '(->)'
16 (<&>) :: Functor f => f a -> (a -> b) -> f b
17 (<&>) = flip (<$>)
18 infixl 4 <&>
19