File: IntMapAndMapOfInt.hs

package info (click to toggle)
haskell-isomorphism-class 0.3.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 264 kB
  • sloc: haskell: 794; makefile: 3
file content (14 lines) | stat: -rw-r--r-- 450 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{-# OPTIONS_GHC -Wno-orphans #-}

module IsomorphismClass.Relations.IntMapAndMapOfInt where

import qualified Data.IntMap.Strict
import qualified Data.Map.Strict
import IsomorphismClass.Classes
import IsomorphismClass.Prelude

instance IsomorphicTo (Map Int v) (IntMap v) where
  to = Data.Map.Strict.fromList . Data.IntMap.Strict.toList

instance IsomorphicTo (IntMap v) (Map Int v) where
  to = Data.IntMap.Strict.fromList . Data.Map.Strict.toList