diff options
| author | Akshay Nair <phenax5@gmail.com> | 2024-12-15 18:13:03 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2024-12-15 18:13:03 +0530 |
| commit | 60b4a0fafebfc0351b3d0a6be13474d0f76e284a (patch) | |
| tree | 0829ca8bfd836c8f26b5301a41c70c1423c8ad66 /src/Chelleport/Utils.hs | |
| parent | 1d07e554284593cdca804404d1d9f68a473ee986 (diff) | |
| download | chelleport-60b4a0fafebfc0351b3d0a6be13474d0f76e284a.tar.gz chelleport-60b4a0fafebfc0351b3d0a6be13474d0f76e284a.zip | |
UI changes for grid
Diffstat (limited to 'src/Chelleport/Utils.hs')
| -rw-r--r-- | src/Chelleport/Utils.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Chelleport/Utils.hs b/src/Chelleport/Utils.hs index 5977039..0e7dabc 100644 --- a/src/Chelleport/Utils.hs +++ b/src/Chelleport/Utils.hs @@ -2,10 +2,12 @@ module Chelleport.Utils where import Data.List (nub) import Foreign.C (CInt) -import Unsafe.Coerce (unsafeCoerce) intToCInt :: Int -> CInt -intToCInt = unsafeCoerce +intToCInt = fromIntegral + +cIntToInt :: CInt -> Int +cIntToInt = fromIntegral findWithIndex :: (x -> Maybe r) -> Int -> [x] -> Maybe (Int, r) findWithIndex _predicate _index [] = Nothing |
