Skip to content

Instantly share code, notes, and snippets.

@ErnWong
Created December 10, 2022 10:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ErnWong/f2874cd9350aa970137929d9de936395 to your computer and use it in GitHub Desktop.
Save ErnWong/f2874cd9350aa970137929d9de936395 to your computer and use it in GitHub Desktop.
namespace thisWorks
testMyErased : Exists {type = (Nat, String)} (\y => (String, (Nat, Nat)))
0 testMyUse : String
testMyUse = Builtin.fst $ snd $ testMyErased
0 testMyUse2 : (Nat, Nat)
testMyUse2 = Builtin.snd $ snd testMyErased
namespace thisFails
testMyErased : Exists {type = (Nat, String)} (\(y, z) => (String, (Nat, Nat)))
0 testMyUse : String
testMyUse = Builtin.fst $ snd $ testMyErased
{-
While processing right hand side of testMyUse.
Can't solve constraint between:
let (y, z) = fst testMyErased in (String, (Nat, Nat)) and (String, ?b)
-}
0 testMyUse2 : (Nat, Nat)
testMyUse2 = Builtin.snd $ snd testMyErased
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment