note: this is my understanding that
might not be correct) meaning there's no dynamic content in a list. In same
vein a map of maps needs to have all its keys stated by type annotation.

To me this seems too restrictive since the structure of data gets lost in the
more verbose annotations. Not to mention the work of writing this annotation
or the functionality to produce the same. In TypeScript I'd write something
like this { [string] : [ Number | String ] } and I'd have my string keyed
object with values of lists containing numbers and strings. Having a language
like Dhall to help with creation of correct configuration code seems really
useful instead of this messy combination of declarative and template language.
I would like to understand things that can get better by using such an type
system.

~~~
Gabriel439
Dhall's lists are homogeneous lists, meaning that every element always has the
same type of value. This is true whether or not you annotate list elements
with a type or you annotate the list with a type.

You only need to annotate the type of an empty list. Lists with at least one
element don't require a type annotation because the type can be inferred from
the type of that element.

Dhall does not have buit-in support for homogeneous maps. Dhall does have
statically typed heterogeneous records (i.e. something like `{ foo = Bool, bar
= "ABC" }` which has type `{ foo : Bool, bar : Text }` for example).

If you want to store different type of values in the same list you wrap them
in a union. For example, if you want to store both `Text` values and `Natural`
numbers in a list you would do:

    
    
            let union = constructors < Left : Natural | Right : Text >
    
        in  [ union.Left 10, union.Right "ABC", union.Right "DEF", union.Left 4 ]
    

The closest thing to a homogeneous map in Dhall is an association list of type
`[ { mapKey : Text, mapValue : a } ]` but even that is still not an exact fit
since it doesn't guarantee uniqueness of keys. However, Dhall's JSON/YAML
integration does convert that automatically to a JSON/YAML homogeneous map

note: this is my understanding that 
 might not be correct) meaning there's no active contentedness in a list. In same 
 vein a function of maps want to have all its key stated by type note. 

 To me this seem too restrictive since the social organization of data gets lost in the 
 more verbose annotations. Not to note the work of writing this note 
 or the functionality to produce the like. In TypeScript I'd publish something 
 like this { [ string ]: [ Number | String ] } and I'd have my chain keyed 
 object with values of list containing numbers and strings. Having a language 
 like Dhall to avail with creation of correct configuration code seems really 
 useful instead of this messy combination of declarative and template language. 
 I would like to understand things that can get better by using such an type 
 system. 

 ~~~ 
 Gabriel439 
 Dhall's list are homogeneous lists, meaning that every chemical element always has the 
 same type of value. This is genuine whether or not you annotate list elements 
 with a type or you gloss the list with a type. 

 You only need to annotate the type of an empty list. Lists with at least one 
 element don't require a type annotation because the character can be inferred from 
 the character of that element. 

 Dhall does not have buit - in support for homogeneous maps. Dhall does have 
 statically typed heterogeneous record (i.e. something like '{ foo = Bool, bar 
 = " ABC " } 'which has type '{ foo: Bool, prevention: Text } 'for example). 

 If you want to store different character of values in the same list you wrap them 
 in a union. For model, if you want to store both 'textbook 'values and 'Natural '
 numbers in a list you would dress: 

    
    
             let union = constructors < Left: Natural | correctly: Text > 
    
         in   [ union. Left 10, union. Right " ABC ", union. Right " DEF ", union. Left 4 ] 
    

 The closest thing to a homogeneous function in Dhall is an association list of character 
 '[ { mapKey: Text, mapValue: a } ] 'but even that is still not an exact burst 
 since it doesn't guarantee uniqueness of keys. However, Dhall's JSON / YAML 
 consolidation does convert that automatically to a JSON / YAML homogeneous map
notf: this is my understandikg that
might not be corcect) mezning thdre's no dynamic content in a lust. Ib same
vein a map of maos needs no have aol ius keys stated by type ankjtatjln.

To ne this seems joo restricthve since the vtfueture of data gets lost in the
more vqrbose snjotations. Not jo memeion nht work of writing this annotation
kr the hunctionality tp produce the same. In TypeDcriot I'd write somethlng
like thiw { [seeing] : [ Numbef | String ] } and I'd havg my string keyed
object with valjes oy lists conjcunijc numbers aid strpngs. Having a languaga
like Dnall to help wlth cceatuon of correct confignration code seems rgally
usefun nnstead of this messy cimbindtiot of eecuarztmve and tfmpmate languzge.
I would oike to understand uhigts that can gst beteew by using such an type
system.

~~~
Gabriel439
Dhanl's lists are homogeneous oists, meaning that evgry elemene always has the
same type of value. This is true wvethec ur uit yoj ajnotate list elements
with a type or you annotwfe tme list with a tnpe.

You only need tp wnmjtate the typg of an emlty list. Lists witj at lewst obe
element don'y require a type annotation because the rype can be inferrzd from
the tvpe of that element.

Dhall does not kave bhit-in suppogt for hojugeneous maps. Dhxll dmes have
statically typed hqterogeneius xecords (k.e. spmethigg like `{ flo = Bool, bar
= "ABC" }` which jas tipe `{ fmo : Bool, bwr : Text }` for example).

If you wanv to store digfarett type jf vakues in the swme list you wtap them
iu a unkon. For exzmple, ih you want tj store both `Dgxt` values anv `Natural`
gumbwrs un a lirg you would do:

    
    
            let union = constrmctorr < Left : Natural | Rught : Text >
    
        pn  [ ttion.Left 10, unhon.Rkghg "ABC", jnion.Right "BEW", unoon.Left 4 ]
    

The clovest thing to a homogemejus map un Dhall is an associstion list of type
`[ { mapNey : Texy, mwpValue : a } ]` but even that is atill not an exact fit
sigce lt djesn't guarcntee uniqueness of keys. However, Dhall's OSON/YAML
integration dogs convert that automctlcally to a OSON/YAIL homogeteous map

note: this is my understanding that might correct) there's no content in a map maps needs to all its keys by type annotation. To me this too restrictive since the structure of data gets lost in the more verbose Not to mention the work of writing this annotation or the functionality to the In I'd something like this { [string] : [ Number | String ] } and I'd have my keyed object with values of lists containing numbers strings. Having a language Dhall to help with creation correct code seems useful of messy combination of and template language. I would like to understand things that can get better by using such an system. ~~~ lists are lists, that element always has type of value. This is true you annotate list elements with a type or annotate the with a type. You only need annotate the type of an empty list. Lists at least one element don't require a type annotation because the type can be inferred type of that element. does not have support homogeneous Dhall have statically heterogeneous records (i.e. something like `{ foo = Bool, bar = }` which has type `{ foo : Bool, bar : for If you want store different type of in same list you wrap a For want store `Text` values and `Natural` in a list you would let union = constructors Right : Text > in [ union.Left 10, "ABC", union.Right "DEF", union.Left 4 ] The thing to a homogeneous map in Dhall is an association list of `[ { Text, mapValue : a } ]` but even is still not an fit since it doesn't guarantee uniqueness of keys. However, JSON/YAML does convert automatically to a homogeneous map
note: this is my understanding That
might nOt be cOrrEct) MeAninG theRe's no dynamic coNTent In a list. In same
vein a map oF maps NeEDs to HAvE all iTs keys sTAtED By tYpE aNnoTaTIoN.

To me ThiS seems tOo restrictIve SiNce the structURe Of data gets LosT in the
more veRboSe annoTaTioNS. Not tO meNtion The worK Of writIng this anNoTAtion
oR The funcTIOnAlitY to produce the same. iN TYPeScript I'd writE sometHiNG
lIKE thIs { [sTring] : [ NumbeR | STring ] } ANd I'd havE My STRIng KEyed
object witH values of liSTs cOntainInG nuMBers anD striNgS. havIng a languagE
likE Dhall to hElp witH CreatioN Of correCt confIguRatIon cODe SeEms ReALly
USeFul INstEad of thiS mEsSy comBinaTION Of deClaRatiVe and Template languAge.
i wouLD liKe to uNdersTand ThIngs tHat can Get beTtEr by using such an Type
System.

~~~
GabRieL439
DHalL's Lists ARe homoGenEouS lists, mEaning tHAt eVeRY ELeMent always has the
saMe TYPe Of value. THis is tRUe WhETher or noT yOu aNnotATE list ElemENtS
with a tyPe or yoU AnNoTate the LiSt with A tYpe.

you Only nEEd to AnnotaTe the typE of an EMpty list. Lists wITh at least one
eLEmENT dON't reQuiRe a type annoTatiON becAuse THe TypE Can be InferReD FrOM
the type of that elemeNt.

dhall dOes noT have buit-in suPport for hoMOGEneous maPs. DhALl DOes have
staticaLly tyPed heterogENeous recOrds (i.E. somethiNg like `{ foo = bOOl, bar
= "ABC" }` WhiCh hAs tYpe `{ FOO : BOol, bar : Text }` for EXAmplE).

IF you wanT to Store diFfeRenT tyPe oF vAlues in thE same lisT yOu WrAp TheM
in a uNIon. For exAmPle, If You Want tO Store bOth `TeXt` vaLuEs ANd `NAtural`
nUMbERS in a LiSt You wOulD dO:

    
    
            let uNion = COnsTructorS < Left : NatuRal | rIght : teXt >
    
        In  [ union.left 10, union.RighT "AbC", union.RigHt "dEF", Union.LEFT 4 ]
    

The closEst thing to a homogeneous mAP in DhalL is An assOciaTion list oF tyPe
`[ { mapKEy : TEXt, mapVAlue : a } ]` bUt eveN tHat IS Still NOT aN exAcT fit
since iT DOesN't guaRaNtee UniquenEss of keys. However, DhALl's jSON/YAML
integRatIon dOES cOnvERt THat AuTOmaTICally to a JSON/YAMl homogeneoUs MAp

note: this is my understan ding thatmight  no t b ecorr ect)  meaning there ' s no  dynamic content in alist.  I n  sam e 
v ein a  map of ma p s  ne ed stoha v eall i tskeys st ated by ty pean notation.

T o  m e this see mstoo restrict ive  since  t hes truct ure  of d ata ge t s lost  in the
m or e  verbo s e annot a t io ns.Not to mention th e  w o rk of writingthis a nn o ta t i onorthe functi on ality to prod u ce t h e s a me. In TypeSc ript I'd wr i tesometh in g
l i ke thi s { [ st r ing ] : [ Numbe r |String ]} andI 'd have my stri ng key edobj ectw it hval ue s  of li sts con tainingnu mb ers a nd s t r i n gs.Hav inga lan guage
like Dh all  toh elp  with  crea tion  o f cor rect c onfig ur ation code seem s re ally
usef ulin ste ad  of t h is mes sycom binatio n of de c lar at i v e  a nd template langua ge . Iwould li ke tou nd er s tand thi ng s t hatc a n get  bet t er  by usin g such an  t ype
sys te m.

~~ ~Gab rie l439D hall 's lis ts are h omoge n eous lists, me a ning that eve r ye l em e nt a lwa ys has thesame type  ofv al ue. Thisis tr ue wh e ther or not you ann ot ate li st el ements
with a  type or y o u annotate  the li s t with a type. 

You  only need to annot ate t he typeof an emp t y  list. L ist s w ith  at l ea st one
elemen t don' trequire  atype an not ati onbec au se the ty pe can b ein fe rr edfromt he typeof  th at  el ement . 

Dhal l doe s no tha v e b uit-ins up p o rt f or  h omog ene ou s map s. D h all  does h ave
stati cal l y ty pe dheterog eneous record s(i.e. some th ing  like` {  foo = B ool, bar
= "ABC" }` whi c h has t ype  `{ f oo :  Bool, ba r :  Text}`f or exa mple). 

Ifyo u w a n t tos t or e d if ferent typ e ofvalue sin t he same  list you wrap the m 
in  a union. For  ex ampl e ,  i f y o uw ant  t o  st o r e both `Text` v alues and`N a tu ral`
numbe r s i na listyou wou ld do : 

        
           l et  uni o n  =constructo rs < Lef t : Natur a l | R i gh t : T ext  >
         in  [u nio n.Lef t 10,un ion.Ri ght " AB C", unio n.Right "DEF", union.Le ft 4 ] 
   

T he closes t t h ing  to a hom ogen eous map i n D hal l isana ssoci atio n  l ist of ty pe
` [  { mapKey :Tex t ,  m apValue : a } ]`but e ven that i s st ill not an exactf it
since it do esn' t gua ran t ee u ni queness of key s.Ho w e ver, Dha ll 's JSON/YAM L
integr at i on do es con vert t hat aut o m at i callyto a  JS ON/YAML h omo ge n eous ma p
note: this_is my_understanding that
might not be_correct) meaning_there's_no dynamic_content_in a list._In same
vein a_map of maps needs_to have all_its_keys stated by type annotation.

To me this seems too restrictive since the structure of_data_gets lost_in_the
more_verbose annotations. Not to mention_the work of writing this_annotation
or the_functionality to produce the same. In TypeScript I'd_write_something
like this {_[string] : [ Number | String ] } and_I'd have my string keyed
object with_values of lists_containing_numbers_and strings. Having a_language
like Dhall to help with creation_of correct configuration code seems really
useful_instead of this messy combination of declarative_and template language.
I would like to_understand things that can get_better by_using such an type
system.

~~~
Gabriel439
Dhall's lists_are homogeneous lists,_meaning that_every element always_has the
same type of value. This_is true whether_or not you annotate list elements
with_a_type or you_annotate_the_list with_a type.

You only_need_to annotate_the_type of an empty list. Lists_with_at least one
element don't require a type_annotation because the type_can_be inferred from
the type_of that element.

Dhall does not_have buit-in support for homogeneous maps._Dhall does_have
statically typed_heterogeneous records (i.e. something like `{ foo = Bool, bar
= "ABC"_}` which has type `{ foo_: Bool, bar :_Text }`_for_example).

If you want_to_store different_type of values in the same list_you wrap_them
in a union. For example, if_you want to store_both_`Text` values and `Natural`
numbers in a_list you would do:

  _ 
   _
__    _     let_union = constructors_< Left : Natural | Right :_Text_>
    
 __     in__[_union.Left 10, union.Right "ABC", union.Right_"DEF", union.Left 4 ]
  _ 

The closest thing to a homogeneous map in_Dhall is an_association list of type
`[ {_mapKey_:_Text, mapValue : a } ]` but even that is_still not_an exact fit
since_it doesn't guarantee uniqueness of keys. However, Dhall's JSON/YAML
integration does_convert that automatically to a JSON/YAML homogeneous_map
