<commit_before>#include "config.hats"
#include "{$TOP}/avr_prelude/kernel_staload.hats"

staload "{$TOP}/SATS/arduino.sats"

#define BUTTON 7

fun revstate (s:natLt(2)): natLt(2) =
  case+ s of
  | INPUT => OUTPUT
  | OUTPUT => INPUT

implement main () = {
  fun loop () = {
    val b = digitalRead (BUTTON)
    val () = digitalWrite (LED_BUILTIN, revstate (b))
    val () = loop ()
  }
  val () = pinMode (LED_BUILTIN, OUTPUT)
  val () = pinMode (BUTTON, INPUT)
  val () = loop ()
}<commit_msg>Fix miss state<commit_after>#include "config.hats"
#include "{$TOP}/avr_prelude/kernel_staload.hats"

staload "{$TOP}/SATS/arduino.sats"

#define BUTTON 7

implement main () = {
  fun loop () = {
    val b = digitalRead (BUTTON)
    val () = digitalWrite (LED_BUILTIN, b)
    val () = loop ()
  }
  val () = pinMode (LED_BUILTIN, OUTPUT)
  val () = pinMode (BUTTON, INPUT)
  val () = loop ()
}
{'fraction_non_alphanumeric': 0.16891891891891891, 'fraction_numerical': 0.0045045045045045045, 'mean_word_length': 3.512690355329949, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '231541', 'n_tokens_mistral': 361, 'n_tokens_neox': 365, 'n_words': 80}