<commit_before>{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude #-}

module Control.Monad.LMonad (
    LMonad,
    (>>=), (>>),
    return, fail
) where

import Control.Applicative (Applicative(), pure)
import Data.Linear (const)
import GHC.Base (String())

infixl 1 >>, >>=

class LMonad m where
    (>>=) :: m a ⊸ (a ⊸ m b) ⊸ m b
    
    (>>) :: m () ⊸ m b ⊸ m b
    m >> k = m >>= \() -> k
    {-# INLINE (>>) #-}

    return :: a ⊸ m a

    fail :: String -> m a<commit_msg>Fix indentation and import cleanup of LMonad<commit_after>{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude #-}

module Control.Monad.LMonad (
  LMonad,
  (>>=), (>>),
  return, fail
) where

import Data.Functor.LFunctor (LFunctor())
import GHC.Base (String())

infixl 1 >>, >>=

class LFunctor m => LMonad m where
  (>>=) :: m a ⊸ (a ⊸ m b) ⊸ m b
    
  (>>) :: m () ⊸ m b ⊸ m b
  m >> k = m >>= \() -> k
  {-# INLINE (>>) #-}

  return :: a ⊸ m a

  fail :: String -> m a
{'fraction_non_alphanumeric': 0.20863309352517986, 'fraction_numerical': 0.0020554984583761563, 'mean_word_length': 2.5547445255474455, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 44, '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': '1332977', 'n_tokens_mistral': 444, 'n_tokens_neox': 423, 'n_words': 119}