<commit_before>{-# LANGUAGE TypeFamilies 
           , FlexibleContexts 
           , ScopedTypeVariables
           , ViewPatterns
  #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}

-----------------------------------------------------------------------------
-- |
-- Module      :  Diagrams.TwoD.Tilings
-- Copyright   :  (c) 2011 <NAME>
-- License     :  BSD-style (see LICENSE)
-- Maintainer  :  <EMAIL>
--
-- Tools for generating and drawing plane tilings made of regular
-- polygons.
--
-----------------------------------------------------------------------------
module Diagrams.TwoD.Tilings (
  
  -- * The ring Q[sqrt 2, sqrt 3]
  
    Q236, rt2, rt3, rt6
                  
  , toDouble
    
  , Q2, toR2, toP2
              
  -- * Regular polygons              
              
  , TilingPoly(..)              
  , polySides, polyFromSides
  , polyCos, polySin
  , polyRotation, polyExtRotation
                  
  -- * Tilings                
                  
  -- ** Types                  
  , Tiling(..)
  , Edge, mkEdge
          
  , Polygon(..)
              
  -- ** Generation
    
  , TilingState(..), initTilingState  
  , TilingM
    
  , generateTiling
    
  -- ** Pre-defined tilings  
    
  , t3, t4, t6
  , mk3Tiling, t4612, t488, t31212
                            
  , t3636
  , semiregular
  , rot
  , t3464, t33434, t33344, t33336L, t33336R
              
  -- * Diagrams  
    
  , drawEdge
  , drawPoly
  , polyColor
  , drawTiling
  , drawTilingStyled
    
  ) where
    
import Control.Monad.State
import Control.Monad.Writer hiding ((<>))

import Data.List   (mapAccumL, sort)
import Data.Function (on)
import Data.VectorSpace
import Control.Arrow

import qualified Data.Set as S
import qualified Data.Foldable as F<commit_msg>CPP'd import of Control.Monad.Writer to support GHC < 7.4<commit_after>{-# LANGUAGE TypeFamilies 
           , FlexibleContexts 
           , ScopedTypeVariables
           , ViewPatterns
           , CPP
  #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}

-----------------------------------------------------------------------------
-- |
-- Module      :  Diagrams.TwoD.Tilings
-- Copyright   :  (c) 2011 <NAME>
-- License     :  BSD-style (see LICENSE)
-- Maintainer  :  <EMAIL>
--
-- Tools for generating and drawing plane tilings made of regular
-- polygons.
--
-----------------------------------------------------------------------------
module Diagrams.TwoD.Tilings (
  
  -- * The ring Q[sqrt 2, sqrt 3]
  
    Q236, rt2, rt3, rt6
                  
  , toDouble
    
  , Q2, toR2, toP2
              
  -- * Regular polygons              
              
  , TilingPoly(..)              
  , polySides, polyFromSides
  , polyCos, polySin
  , polyRotation, polyExtRotation
                  
  -- * Tilings                
                  
  -- ** Types                  
  , Tiling(..)
  , Edge, mkEdge
          
  , Polygon(..)
              
  -- ** Generation
    
  , TilingState(..), initTilingState  
  , TilingM
    
  , generateTiling
    
  -- ** Pre-defined tilings  
    
  , t3, t4, t6
  , mk3Tiling, t4612, t488, t31212
                            
  , t3636
  , semiregular
  , rot
  , t3464, t33434, t33344, t33336L, t33336R
              
  -- * Diagrams  
    
  , drawEdge
  , drawPoly
  , polyColor
  , drawTiling
  , drawTilingStyled
    
  ) where
    
import Control.Monad.State
#if __GLASGOW_HASKELL__ >= 704
import Control.Monad.Writer hiding ((<>))
#else
import Control.Monad.Writer
#endif

import Data.List   (mapAccumL, sort)
import Data.Function (on)
import Data.VectorSpace
import Control.Arrow

import qualified Data.Set as S
import qualified Data.Foldable as F
{'fraction_non_alphanumeric': 0.17887285597604138, 'fraction_numerical': 0.03348761230601688, 'mean_word_length': 1.269302038295244, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, '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': '1527115', 'n_tokens_mistral': 1253, 'n_tokens_neox': 1157, 'n_words': 248}