Skip to content

Instantly share code, notes, and snippets.

@donovancrichton
Created July 26, 2020 09:07
Show Gist options
  • Save donovancrichton/1f7f2e335774592cbf7f59a41d638c36 to your computer and use it in GitHub Desktop.
Save donovancrichton/1f7f2e335774592cbf7f59a41d638c36 to your computer and use it in GitHub Desktop.
Introducing implicits on the LHS works when an infix operator is matched in prefix form but fails to parse when introduced on a match in infix form.
data MyList : Type -> Type where
Nil : {a : Type} -> MyList a
(::) : {a : Type} -> a -> MyList a -> MyList a
f : MyList b -> ()
f [] = ()
f ((::) {a} x xs) = ?normal
g : MyList b -> ()
g [] = ()
g ({a} x :: xs) = ?broken
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment