aboutsummaryrefslogtreecommitdiffstats
path: root/autotypes/src/AutoTypes/Unify.hs
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2024-12-20 17:24:03 +0100
committerLibravatar Alexander Foremny <aforemny@posteo.de>2025-02-19 18:44:45 +0100
commite54aea6ecd00786e673099667607f761bc0644b1 (patch)
tree6ddec4343185f500b9a716da77f1492a618dc8d5 /autotypes/src/AutoTypes/Unify.hs
parent9b0adc976101bc4f375b05cc475478187c595714 (diff)
autotypes: ScalarType -> Scalar
Diffstat (limited to 'autotypes/src/AutoTypes/Unify.hs')
-rw-r--r--autotypes/src/AutoTypes/Unify.hs7
1 files changed, 4 insertions, 3 deletions
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)