From 77e5f684aaeb0688407ae617922fb7af026b1183 Mon Sep 17 00:00:00 2001 From: justin Date: Mon, 23 Sep 2024 22:42:23 +0100 Subject: [PATCH] Add file --- src/NewInt.hs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/NewInt.hs diff --git a/src/NewInt.hs b/src/NewInt.hs new file mode 100644 index 000000000..756607f78 --- /dev/null +++ b/src/NewInt.hs @@ -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