From e54aea6ecd00786e673099667607f761bc0644b1 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Fri, 20 Dec 2024 17:24:03 +0100 Subject: autotypes: ScalarType -> Scalar --- autotypes/src/AutoTypes/Unify.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'autotypes') diff --git a/autotypes/src/AutoTypes/Unify.hs b/autotypes/src/AutoTypes/Unify.hs index 29d7ed2..1d6263d 100644 --- a/autotypes/src/AutoTypes/Unify.hs +++ b/autotypes/src/AutoTypes/Unify.hs @@ -4,6 +4,7 @@ module AutoTypes.Unify ( T (..), + Scalar (..), toString, fromJson, unify1, @@ -32,14 +33,14 @@ import Debug.Trace import System.FilePath (takeDirectory) import Prelude hiding (null) -data ScalarType +data Scalar = String | Number | DateTime | Bool deriving (Eq, Ord, Show) -scalarTypeString :: ScalarType -> String +scalarTypeString :: Scalar -> String scalarTypeString String = "string" scalarTypeString Number = "number" scalarTypeString DateTime = "datetime" @@ -49,7 +50,7 @@ data T = List (Maybe T) | Object (Map String T) | Option (Maybe T) - | Scalar ScalarType + | Scalar Scalar | Union (S.Set T) | Reference String deriving (Eq, Ord, Show) -- cgit v1.2.3