aboutsummaryrefslogtreecommitdiffstats
path: root/autotypes
diff options
context:
space:
mode:
Diffstat (limited to 'autotypes')
-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)