add naive schema comparison
This commit is contained in:
@@ -4,7 +4,6 @@ module AutoTypes
|
||||
)
|
||||
where
|
||||
|
||||
import Debug.Trace
|
||||
import qualified AutoTypes.Unify as U
|
||||
import Data.Aeson (Value, decodeFileStrict', encode)
|
||||
import Data.Maybe (fromJust)
|
||||
@@ -17,7 +16,7 @@ autoTypes fp fps = autoTypes' <$> go fp <*> mapM go (fp : fps)
|
||||
|
||||
autoTypes' :: Value -> [Value] -> U.T
|
||||
autoTypes' t' ts' =
|
||||
let types = map U.fromJson (Debug.Trace.traceShowId (t' : ts'))
|
||||
let types = map U.fromJson (t' : ts')
|
||||
in head
|
||||
( foldr1
|
||||
(\ls rs -> (concat [U.unify1 l r | l <- ls, r <- rs]))
|
||||
|
||||
Reference in New Issue
Block a user