<commit_before>{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}

module Ivory.Tower.HAL.RingBuffer
  ( RingBuffer(..)
  , ringBuffer
  , monitorRingBuffer
  ) where

import GHC.TypeLits
import Ivory.Language
import Ivory.Stdlib
import Ivory.Tower

data RingBuffer (n :: Nat) a =
  RingBuffer
    { ringbuffer_push   :: forall s eff . ConstRef s a -> Ivory eff IBool
    , ringbuffer_pop    :: forall s eff .      Ref s a -> Ivory eff IBool<commit_msg>tower-hal: adjust imports.<commit_after>{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}

module Ivory.Tower.HAL.RingBuffer
  ( RingBuffer(..)
  , ringBuffer
  , monitorRingBuffer
  ) where

import GHC.TypeLits
import Ivory.Language
import Ivory.Stdlib
import Ivory.Tower
import Ivory.Tower.Types.Unique

data RingBuffer (n :: Nat) a =
  RingBuffer
    { ringbuffer_push   :: forall s eff . ConstRef s a -> Ivory eff IBool
    , ringbuffer_pop    :: forall s eff .      Ref s a -> Ivory eff IBool
{'fraction_non_alphanumeric': 0.1214109926168991, 'fraction_numerical': 0.0, 'mean_word_length': 3.420289855072464, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '6603468', 'n_tokens_mistral': 454, 'n_tokens_neox': 449, 'n_words': 109}