This commit is contained in:
2024-09-23 22:42:23 +01:00
parent 265da89791
commit 77e5f684aa
+24
View File
@@ -0,0 +1,24 @@
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE DerivingStrategies #-}
module NewInt where
--import qualified Data.IntSet as IS
import qualified Data.IntMap.Strict as IM
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
newtype NewInt a = NInt { _unNInt :: Int}
deriving newtype (Eq,Ord,Show,Num,Read)
newtype NewIntMap a b = NIntMap { _unNIntMap :: IM.IntMap b}
deriving (Eq,Ord,Show,Read)
makeLenses ''NewInt
makeLenses ''NewIntMap
deriveJSON defaultOptions ''NewInt
deriveJSON defaultOptions ''NewIntMap