idris-vimscript icon indicating copy to clipboard operation
idris-vimscript copied to clipboard

"No such variable a"

Open mrkgnao opened this issue 8 years ago • 0 comments

This has to be raised upstream, but since I don't have the time to find a minimal example right away, I'll put it here.

module Vimscript.Examples 

import Vimscript.Builtins
import Vimscript.FFI
import Vimscript.List

data Line = First | Last | LineNum Int

goTo : Line -> VIM_IO ()
goTo l = goTo' l *> pure ()
  where
    goTo' Last = line "$"
    goTo' First = line "0"
    goTo' (LineNum n) = line (show n)

Without a type annotation on goTo', we get a "No such variable a" error, even though we haven't introduced any binding with that name. This looks like an elaborator error, but I might be wrong.

mrkgnao avatar Dec 01 '17 12:12 mrkgnao