With the setup below I get a dhall error, which says that the empty list needs a type annotation.
Whats the best way to solve it?
Thanks.
test.dhall:
{
uno = 1
,dos = ["jaba", "daba"]
,tres = []
}
test.hs
:
{-# LANGUAGE DeriveGeneric #-}
import qualified Dhall
import GHC.Generics
data Test = Test {uno :: [Double], dos :: [T.Text], tres :: [Foo]}
deriving (Show, Eq, Generic)
data Foo = Foo {blub :: T.Text, bla :: T.Text} deriving (Show, Eq, Generic)
instance Dhall.FromDhall Test
instance Dhall.FromDhall Foo
test :: IO ()
test = do
x <- Dhall.input Dhall.auto "./test.dhall"
print (x :: Test)