<commit_before>{-# LANGUAGE CPP #-}
{-# LANGUAGE ExplicitForAll, ConstraintKinds, FlexibleContexts #-}  -- For :< experiment

{-# OPTIONS_GHC -Wall #-}
{-# OPTIONS_GHC -fcontext-stack=38 #-}
{-# OPTIONS_GHC -fno-warn-type-defaults #-}

{-# OPTIONS_GHC -fno-warn-unused-imports #-} -- TEMP
-- {-# OPTIONS_GHC -fno-warn-unused-binds   #-} -- TEMP

----------------------------------------------------------------------
-- |
-- Module      :  Hang
-- Copyright   :  (c) 2014 Tabula, Inc.
-- 
-- Maintainer  :  <EMAIL>
-- Stability   :  experimental
-- 
-- Tests with length-typed treetors. To run:
-- 
--   hermit Hang.hs -v0 -opt=LambdaCCC.NormalizeCore DoHang.hss
--   
----------------------------------------------------------------------

module Hang where

import Prelude hiding (foldr,sum)

import Control.Applicative (liftA2)

-- transformers
import Data.Functor.Identity
import Circat.Pair (Pair(..))
import TypeUnary.Vec (Vec(..))
import Circat.RTree (Tree(..))
import TypeUnary.TyNat

import LambdaCCC.Encode (Encodable(..))

-- Good
#if 0
hang1 :: (Identity Bool, Identity ()) -> Identity (Bool,())
hang1 = uncurry (liftA2 (,))

hang :: Encode ((Identity Bool, Identity ()) -> Identity (Bool,()))
hang = encode hang1
#endif

-- Good
#if 0
hang1 :: (Pair Bool, Pair ()) -> Pair (Bool,())
hang1 = uncurry (liftA2 (,))

hang :: Encode ((Pair Bool, Pair ()) -> Pair (Bool,()))
hang = encode hang1
#endif

-- Good
#if 0
hang1 :: (Tree N1 Bool, Tree N1 ()) -> Tree N1 (Bool,())
hang1 = uncurry (liftA2 (,))

hang :: Encode ((Tree N1 Bool, Tree N1 ()) -> Tree N1 (Bool,()))
hang = encode hang1
#endif

-- Good
#if 1
hang1 :: (Vec N1 Bool, Vec N1 ()) -> Vec N1 (Bool,())
hang1 = uncurry (liftA2 (,))

hang :: Encode ((Vec N1 Bool, Vec N1 ()) -> Vec N1 (Bool,()))
hang = encode hang1<commit_msg>Identity hang<commit_after>{-# LANGUAGE CPP #-}
{-# LANGUAGE ExplicitForAll, ConstraintKinds, FlexibleContexts #-}  -- For :< experiment

{-# OPTIONS_GHC -Wall #-}
{-# OPTIONS_GHC -fcontext-stack=38 #-}
{-# OPTIONS_GHC -fno-warn-type-defaults #-}

{-# OPTIONS_GHC -fno-warn-unused-imports #-} -- TEMP
-- {-# OPTIONS_GHC -fno-warn-unused-binds   #-} -- TEMP

----------------------------------------------------------------------
-- |
-- Module      :  Hang
-- Copyright   :  (c) 2014 Tabula, Inc.
-- 
-- Maintainer  :  <EMAIL>
-- Stability   :  experimental
-- 
-- Tests with length-typed treetors. To run:
-- 
--   hermit Hang.hs -v0 -opt=LambdaCCC.NormalizeCore DoHang.hss
--   
----------------------------------------------------------------------

module Hang where

import Prelude hiding (foldr,sum)

import Control.Applicative (liftA2)

-- transformers
import Data.Functor.Identity
import Circat.Pair (Pair(..))
import TypeUnary.Vec (Vec(..))
import Circat.RTree (Tree(..))
import TypeUnary.TyNat

import LambdaCCC.Encode (Encodable(..))

-- Good
#if 1
hang1 :: (Identity Bool, Identity ()) -> Identity (Bool,())
hang1 = uncurry (liftA2 (,))

hang :: Encode ((Identity Bool, Identity ()) -> Identity (Bool,()))
hang = encode hang1
#endif

-- Good
#if 0
hang1 :: (Pair Bool, Pair ()) -> Pair (Bool,())
hang1 = uncurry (liftA2 (,))

hang :: Encode ((Pair Bool, Pair ()) -> Pair (Bool,()))
hang = encode hang1
#endif

-- Good
#if 0
hang1 :: (Tree N1 Bool, Tree N1 ()) -> Tree N1 (Bool,())
hang1 = uncurry (liftA2 (,))

hang :: Encode ((Tree N1 Bool, Tree N1 ()) -> Tree N1 (Bool,()))
hang = encode hang1
#endif

-- Good
#if 0
hang1 :: (Vec N1 Bool, Vec N1 ()) -> Vec N1 (Bool,())
hang1 = uncurry (liftA2 (,))

hang :: Encode ((Vec N1 Bool, Vec N1 ()) -> Vec N1 (Bool,()))
hang = encode hang1
{'fraction_non_alphanumeric': 0.2545961002785515, 'fraction_numerical': 0.022284122562674095, 'mean_word_length': 2.375, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 21, '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': '7338691', 'n_tokens_mistral': 1372, 'n_tokens_neox': 1287, 'n_words': 346}