Closed jneira closed 6 years ago
It seems the code expects App ( V0 "v" ) ( TextLit ( Chunks [] text ) )
instead the actual App (Var (V "_" 0)) (TextLit (Chunks [] "1.0.0"))
Hm, it seems that the variable name is lost here. I think we probably aren't saturating a lamba to get the variable names. Thanks, I'll take a look.
Can you try the extract-lam
branch? It won't fix it everywhere, but it might get further than crashing on v
.
Jumm, i've rebased the branch but it throwed some errors compiling with stack.
I get to build it adding import qualified Dhall.Core (normalize)
and changing
go =
\case
Expr.App ( V0 "v" ) ( Expr.TextLit ( Expr.Chunks [] text ) ) ->
return ( parse text )
e ->
error (show e)
for
go =
\case
Expr.App ( V0 "v" ) ( Expr.TextLit ( Expr.Chunks [] text ) ) ->
return ( parse text )
e ->
error "Error parsing version"
cause it could not infer the Show instance for s0, being e :: Expr.Expr s0 Dhall.TypeCheck.X
Anyway after those changes it throwed the "Error parsing version"
Oh sorry, I should have actually compiled my code! Interesting, seems that didn't quite get it. I'll look more at this when I get a chance.
Not sure cause not cached version works but maybe it is related with https://github.com/dhall-lang/dhall-lang/pull/203?
Hi, i've setup a fork to use the near next versión of dhall, 1.17 with cached imports with hashes (fork diff) It includes a test case using a local import hashed and after caching the prelude and types it fails:
Not sure if it is a only dhall-to-cabal issue, but compiling the file with dhall itself works, with and without cache files.