{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE UndecidableInstances #-}
module Language.Fortran.Extras.JSON.Analysis() where
import Language.Fortran.Extras.JSON.Helpers
import Data.Aeson
import Language.Fortran.Common.Array
instance ToJSON a => ToJSON (Dim a) where
toJSON :: Dim a -> Value
toJSON = forall a.
(Generic a, GToJSON' Value Zero (Rep a)) =>
Options -> a -> Value
gtj forall a b. (a -> b) -> a -> b
$ String -> Options
jcProdDrop String
"dim"
instance (ToJSON a, ToJSON (t a), ToJSON (t (Dim a))) => ToJSON (Dims t a) where
toJSON :: Dims t a -> Value
toJSON = forall a.
(Generic a, GToJSON' Value Zero (Rep a)) =>
Options -> a -> Value
gtj forall a b. (a -> b) -> a -> b
$ String -> Options
jcSumDrop String
"Dims"