hazel icon indicating copy to clipboard operation
hazel copied to clipboard

Certain strings fail to paste invisibly

Open disconcision opened this issue 4 months ago • 0 comments

The simplest example is ([)(; it will print a messages to the console "WARN: zipper_of_string: Invalid_argument("option is None")" but there is no other feedback. This is a minified version of the following, which arose naturalistically during LLM completion experiments:

fun (playList, action) ->
  case action
    | PlaySong(id) =>
      let (songs, _) = playList in (songs, Playing(id))
    | PauseCurrentSong =>
      let (songs, state) = playList in
      case state
        | Playing(id) => (songs, PausedOn(id))
        | _ => playList
      end
    | RemoveSong(id) =>
      let (songs, state) = playList in
      (List.remove(id, songs),
       case state
         | Playing(id') if id == id' => NoSongSelected
         | PausedOn(id') if id == id' => NoSongSelected
         | _ => state
       end)
    | AddSong(id) =>
      let (songs, state) = playList in (List.append(songs, [id]), state)
  end

(the problematic part is the 'if' that the llm is trying to use as a 'when' clause).

Likely a wontfix, pending the new syntax model, but I'm logging it.

disconcision avatar Mar 28 '24 20:03 disconcision