code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# OPTIONS_GHC -XTemplateHaskell #-}
module Graphics.Rendering.Chart.Plot.PixelMap
( PixelMap(..), DefaultRange(..)
, defaultPixelMap
, plotPixelMap
, pixel_map_title
, pixel_map_palette
, pixel_map_values
, pixel_map_range
, greyscale
, make_range
) where
import qualified Graphics.Rendering.Ca... | chetant/rbm | Graphics/Rendering/Chart/Plot/PixelMap.hs | bsd-3-clause | 4,360 | 0 | 16 | 1,342 | 1,216 | 679 | 537 | -1 | -1 |
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE Typ... | daimatz/scotty-on-heroku | src/Model.hs | bsd-3-clause | 720 | 0 | 7 | 209 | 69 | 45 | 24 | 16 | 0 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DeriveGeneric #-}
module Api.Types where
import GHC.Generics
import Data.Aeson
import Data.Aeson.Types
import Data.Maybe
import qu... | lupuionut/homedmanager | src/Api/Types.hs | bsd-3-clause | 13,504 | 0 | 45 | 5,211 | 2,711 | 1,491 | 1,220 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
module HTagger where
import HTagger.Internal
import CorePrelude
import Control.Monad
import qualified Data.Foldable as F
import qualified Data.Map.Strict as M
import qualified Data.Sequence as ... | KevinCotrone/htag | src/HTagger.hs | bsd-3-clause | 3,604 | 0 | 17 | 784 | 1,107 | 566 | 541 | 84 | 2 |
-- |
-- Module : Language.Forvie.Lexing.Text
-- Copyright : Robert Atkey 2012
-- License : BSD3
--
-- Maintainer : bob.atkey@gmail.com
-- Stability : experimental
-- Portability : unknown
--
-- Functions for turning `Data.Text.Text` into a stream of lexemes,
-- according to some lexical ... | bobatkey/Forvie | src/Language/Forvie/Lexing/Text.hs | bsd-3-clause | 4,948 | 6 | 20 | 1,520 | 1,219 | 644 | 575 | 91 | 10 |
{-# LANGUAGE OverloadedStrings #-}
import Test.Hspec
import Test.QuickCheck
import Data.Monoid ((<>))
import Data.ByteString.Char8 (ByteString)
import Sequence.Alignment
import Sequence.Alignment.Matrix
chains :: [ByteString]
chains = [ "EVQLVESGGGLVQPGGSLRLSCAASGFNIKDTYIHWVRQAPGKGLEWVA" <>
... | zmactep/zero-aligner | test/Spec.hs | bsd-3-clause | 2,791 | 0 | 21 | 652 | 597 | 338 | 259 | 50 | 1 |
{-# LANGUAGE RecordWildCards #-}
module Network.HTTP.Download.VerifiedSpec where
import Crypto.Hash
import Control.Monad (unless)
import Control.Monad.Trans.Reader
import Data.Maybe
import Network.HTTP.Client.Conduit
import Network.HTTP.Download.Verified
import Path
import System.Directory
import System.IO.Temp
import... | hesselink/stack | src/test/Network/HTTP/Download/VerifiedSpec.hs | bsd-3-clause | 6,148 | 0 | 22 | 1,192 | 1,470 | 742 | 728 | 120 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import System.Random (randomRIO)
import Web.Twitter.Conduit
import Web.Twitter.Conduit.Stream
import Web.Twitter.Types.Lens
import Data.Conduit
import qualified Data.Conduit.List as CL
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Contro... | phasedchirp/chirpy-learning | app/Main.hs | bsd-3-clause | 2,600 | 0 | 13 | 509 | 722 | 400 | 322 | 49 | 2 |
{-# LANGUAGE BangPatterns, FlexibleContexts, OverloadedStrings #-}
{-# OPTIONS -fno-warn-orphans #-}
-- |
-- File : NagiosStatus
-- Copyright : (c) Mike Maul 2013
--
-- License : BSD3
-- Maintainer : mike.maul@gmail.com
-- Stability : experimental
-- Portability : GHC
-- Description : Ultimately will p... | mmaul/nagios-status | src/RRDWriter.hs | bsd-3-clause | 6,880 | 0 | 24 | 1,726 | 1,523 | 807 | 716 | 131 | 3 |
{-# LANGUAGE BangPatterns, Trustworthy #-}
-- | For day-to-day use, please see "Data.Patch"
module Data.Patch.Internal where
import Data.Monoid
import Data.Ord
import qualified Data.List as List
import qualified Data.Vector as Vector
import Data.Vector (Vector)
import Data.Vector.Distance
import Lens.Micro
import Contr... | phadej/patches-vector | Data/Patch/Internal.hs | bsd-3-clause | 10,465 | 0 | 20 | 2,999 | 3,058 | 1,608 | 1,450 | 115 | 7 |
{-# LANGUAGE OverloadedStrings #-}
module Templates.CoreForm where
import GHCCore
import Templates
import Text.Blaze ((!))
import qualified Text.Blaze.Html4.Strict as H
import qualified Text.Blaze.Html4.Strict.Attributes as A
coreForm :: H.Html
coreForm = H.p ! A.class_ "core-form" $ H.form ! A.action "/add" ! A.en... | alpmestan/core-online | src/Templates/CoreForm.hs | bsd-3-clause | 1,691 | 0 | 15 | 600 | 383 | 195 | 188 | 26 | 1 |
module Main where
import Cz.MartinDobias.ChristmasKoma.PadCracker
import System.Console.ArgParser
import Data.Char(digitToInt, chr, ord)
import Numeric(showHex)
import Text.Printf(printf)
data Input = Input String String Int Int
deriving (Show)
inputParser :: ParserSpec Input
inputParser = Input
... | martindobias/christmass-koma | src/Main.hs | bsd-3-clause | 2,007 | 0 | 18 | 485 | 699 | 363 | 336 | 48 | 3 |
{-# LANGUAGE MultiParamTypeClasses, TypeFamilies, OverloadedStrings, DataKinds, TypeOperators, TypeSynonymInstances, FlexibleInstances #-}
module WebApi.RouteSpec (spec) where
import WebApi hiding (get, put, post)
import Data.Text (Text)
import Test.Hspec
import Test.Hspec.Wai
import qualified Network.Wai as Wai
-- w... | byteally/webapi | webapi/tests/WebApi/RouteSpec.hs | bsd-3-clause | 6,397 | 0 | 16 | 1,365 | 1,379 | 706 | 673 | -1 | -1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.Groups
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : portable
--
-- All enumeration groups f... | haskell-opengl/OpenGLRaw | src/Graphics/GL/Groups.hs | bsd-3-clause | 211,064 | 0 | 3 | 14,509 | 4,488 | 4,485 | 3 | 1 | 0 |
-- Copyright : Daan Leijen (c) 1999, daan@cs.uu.nl
-- HWT Group (c) 2003, haskelldb-users@lists.sourceforge.net
-- License : BSD-style
module Opaleye.Internal.HaskellDB.Sql.Generate (SqlGenerator(..)) where
import Opaleye.Internal.HaskellDB.PrimQuery
import Opaleye.Internal.HaskellDB.Sql
data... | silkapp/haskell-opaleye | src/Opaleye/Internal/HaskellDB/Sql/Generate.hs | bsd-3-clause | 792 | 0 | 11 | 197 | 128 | 81 | 47 | 10 | 0 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE DeriveGeneric #-}
module Market.Types
where
import Control.Applicative
import Control.DeepSeq
import GHC.Generics (Generic)
import Data.Word
import Data.List
import Data.Hashable
-------------------
class (Show coin, RealFrac coin, NFData coin, Hashable coi... | dimitri-xyz/market-model | src/Market/Types.hs | bsd-3-clause | 8,048 | 0 | 11 | 2,099 | 1,876 | 1,054 | 822 | 130 | 1 |
{-|
Module: Numeric.Morpheus.Statistics
Description: Statistics Functions
Copyright: (c) Alexander Ignatyev, 2017
License: BSD-3
Stability: experimental
Portability: POSIX
-}
module Numeric.Morpheus.Statistics
(
mean
, stddev_m
, stddev
, columnMean
, rowMean
, columnStddev_m
, rowStddev_m
)
where
impo... | Alexander-Ignatyev/morpheus | hmatrix-morpheus/src/Numeric/Morpheus/Statistics.hs | bsd-3-clause | 4,310 | 0 | 15 | 1,038 | 1,199 | 585 | 614 | 85 | 1 |
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE QuasiQuotes #-}
-- |
-- Module : Data.Array.Accelerate.C.Acc
-- Copyright : [2009..2013] Manuel M T Chakravarty, Gabriele Keller, Trevor L. McDonell
-- License : BSD3
--
-- Maintainer : Manuel M T Chakr... | AccelerateHS/accelerate-c | Data/Array/Accelerate/C/Acc.hs | bsd-3-clause | 14,846 | 0 | 15 | 4,879 | 3,515 | 1,922 | 1,593 | 206 | 26 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Mistral.Parser.LexerCore where
import Mistral.Utils.Source
import Mistral.Utils.Panic ( panic )
import Mistral.Utils.PP
import Data.Bits (shiftR,(.&.))
import Data.Char (ord)
import Data.Word (Word8)
import qualified Data.Text.Lazy as L
-- Lexer Monad ------------... | GaloisInc/mistral | src/Mistral/Parser/LexerCore.hs | bsd-3-clause | 9,992 | 0 | 14 | 3,899 | 2,710 | 1,433 | 1,277 | 269 | 2 |
module Main(main) where
import Library1
main = exported `seq` print 1
| ndmitchell/weeder | test/foo/src/Main.hs | bsd-3-clause | 73 | 0 | 6 | 14 | 26 | 16 | 10 | 3 | 1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
Monadic type operations
This module contains monadic operations over types that contain
mutable type variables.
-}
{-# LANGUAGE CPP, TupleSections, MultiWayIf #-}
{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}
modu... | sdiehl/ghc | compiler/typecheck/TcMType.hs | bsd-3-clause | 99,058 | 37 | 21 | 26,080 | 14,883 | 7,827 | 7,056 | -1 | -1 |
-------------------------------------------------------------------------------
-- |
-- Module : Environments.Blackjack
-- Copyright : (c) Sam Stites 2017
-- License : BSD3
-- Maintainer: sam@stites.io
-- Stability : experimental
-- Portability: non-portable
--
-- Simple blackjack environment
--
-- Blackjack ... | stites/reinforce | reinforce-environments/src/Environments/Blackjack.hs | bsd-3-clause | 5,184 | 0 | 14 | 1,172 | 1,463 | 800 | 663 | -1 | -1 |
module Data.Hexagon.RangeSpec where
import SpecHelper
spec :: Spec
spec = do
describe "Data.Hexagon.Range" $ do
context "context" $ do
it "does something" $ do
True `shouldBe` True
main :: IO ()
main = hspec spec
| alios/hexagon | test/Data/Hexagon/RangeSpec.hs | bsd-3-clause | 246 | 0 | 16 | 68 | 77 | 39 | 38 | 10 | 1 |
module Sample2 where
-- start snippet animals
data Animal = Dog | Cat
isAfraidOf :: Animal -> Animal -> Bool
isAfraidOf Cat Dog = True
isAfraidOf _ _ = False
-- end snippet animals
result :: Bool
result = Dog `isAfraidOf` Cat
| owickstrom/owickstrom.github.io | blog/src/_posts/pandoc-beamer-examples/Sample2.hs | mit | 233 | 0 | 6 | 49 | 65 | 38 | 27 | 7 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE CPP #-}
-- | HTTP over TLS support for Warp via the TLS package.
--
-- If HTTP\/2 is negotiated by ALPN, HTTP\/2 over TL... | erikd/wai | warp-tls/Network/Wai/Handler/WarpTLS.hs | mit | 16,245 | 0 | 18 | 4,240 | 3,352 | 1,835 | 1,517 | 302 | 6 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeApplications #-}
module Main where
import Control.Ap... | input-output-hk/pos-haskell-prototype | networking/bench/Receiver/Main.hs | mit | 2,769 | 0 | 18 | 819 | 661 | 363 | 298 | 62 | 2 |
{-# LANGUAGE CPP, ConstraintKinds, DeriveDataTypeable, FlexibleContexts, MultiWayIf, NamedFieldPuns,
OverloadedStrings, PackageImports, RankNTypes, RecordWildCards, ScopedTypeVariables,
TemplateHaskell, TupleSections #-}
-- | Run commands in Docker containers
module Stack.Docker
(cleanup
... | narrative/stack | src/Stack/Docker.hs | bsd-3-clause | 48,535 | 0 | 45 | 15,541 | 10,275 | 5,262 | 5,013 | 953 | 22 |
module Main where
import Graphics.UI.Gtk
import Graphics.UI.Gtk.Glade
import Data.IORef
import qualified CalcModel as Calc
main = do
initGUI
-- load up the glade file
calcXmlM <- xmlNew "calc.glade"
let calcXml = case calcXmlM of
(Just calcXml) -> calcXml
Nothing -> erro... | mariefarrell/Hets | glade-0.12.5.0/demo/calc/Calc.hs | gpl-2.0 | 2,355 | 0 | 20 | 606 | 454 | 239 | 215 | 39 | 3 |
{-# LANGUAGE DeriveDataTypeable, MultiParamTypeClasses, PatternGuards, RankNTypes, TypeSynonymInstances #-}
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Layout.Navigation2D
-- Copyright : (c) 2011 Norbert Zeh <nzeh@cs.dal.ca>
-- License : BSD3-sty... | pjones/xmonad-test | vendor/xmonad-contrib/XMonad/Actions/Navigation2D.hs | bsd-2-clause | 44,392 | 0 | 20 | 14,556 | 6,149 | 3,418 | 2,731 | 340 | 2 |
-- This test exposes the bug in GHC 7.0.1 (and earlier)
-- which did the following rule rewrite:
--
-- f (let v = 2 in g v) (let v = 3 in g v)
-- ---> let v = 2 in let v = 3 in g v + g v
--
-- which is wrong because of the shadowing of v
module Main where
foo :: Int -> Int
{-# INLINE foo #-}
foo x = g (bar (x,x... | ghc-android/ghc | testsuite/tests/simplCore/should_run/T4814.hs | bsd-3-clause | 690 | 0 | 10 | 194 | 179 | 103 | 76 | 19 | 1 |
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS -fno-warn-name-shadowing #-}
import Options.Applicative
import Options.Applicative.Types
import Cabal.Simple
import Cabal.Haddock
import Control.Monad hiding (forM_)
import qualified Data.Set as Set
import Text.Printf
import System.Directory
import System.FilePath
import Dat... | Teino1978-Corp/Teino1978-Corp-standalone-haddock | src/Main.hs | mit | 3,831 | 0 | 16 | 810 | 905 | 475 | 430 | 87 | 2 |
module Feature.Auth.HTTP where
import ClassyPrelude
import Feature.Auth.Types
import Feature.Common.Util (orThrow)
import Feature.Common.HTTP
import Control.Monad.Except
import Web.Scotty.Trans
import Network.HTTP.Types.Status
class Monad m => Service m where
resolveToken :: Token -> m (Either TokenError CurrentUse... | eckyputrady/haskell-scotty-realworld-example-app | src/Feature/Auth/HTTP.hs | mit | 997 | 0 | 14 | 170 | 307 | 157 | 150 | 27 | 1 |
module ProjectEuler.Problem27
( problem
) where
import Math.NumberTheory.Primes.Testing (isPrime)
import Data.List
import Data.Ord
import Petbox
import ProjectEuler.Types
problem :: Problem
problem = pureProblem 27 Solved result
consePrimeLen :: Int -> Int -> Int
consePrimeLen a b =
length $ takeWhile (isPrim... | Javran/Project-Euler | src/ProjectEuler/Problem27.hs | mit | 655 | 0 | 11 | 169 | 283 | 157 | 126 | 23 | 1 |
module Haskrypto.ElGamal
where
import Haskrypto.Modular hiding (field)
import Haskrypto.EllipticCurve
import System.Random
data ElGamalKey = ElGamalKey{
curve :: EllipticCurve Integer,
p :: Point Integer,
password :: Integer,
public :: Point Integer
} deriving (Show)
constructKey :: (Ellip... | TachoMex/Haskrypto | src/Haskrypto/ElGamal.hs | mit | 1,211 | 0 | 10 | 263 | 380 | 199 | 181 | 26 | 1 |
{-# LANGUAGE QuasiQuotes, OverloadedStrings, ScopedTypeVariables,
RecordWildCards, TemplateHaskell, MultiParamTypeClasses,
FlexibleContexts#-}
import Prelude hiding (product)
import Data.Text.Lazy (pack)
import Control.Applicative ((<$>), (<*>))
import Control.Monad.IO.Class (liftIO)
import... | hnfmr/beginning_haskell | chapter12/src/Main.hs | mit | 10,029 | 0 | 25 | 3,867 | 2,410 | 1,182 | 1,228 | 211 | 5 |
{-# LANGUAGE OverloadedStrings #-}
module Yesod.Form.I18n.Chinese where
import Yesod.Form.Types (FormMessage (..))
import Data.Monoid (mappend)
import Data.Text (Text)
chineseFormMessage :: FormMessage -> Text
chineseFormMessage (MsgInvalidInteger t) = "无效的整数: " `Data.Monoid.mappend` t
chineseFormMessage (MsgInvalidN... | yesodweb/yesod | yesod-form/Yesod/Form/I18n/Chinese.hs | mit | 1,558 | 0 | 7 | 149 | 340 | 189 | 151 | 25 | 1 |
-- vim: set ts=2 sw=2 sts=0 ff=unix foldmethod=indent:
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Main where
import Options.Applicative
import qualified Data.List as L
import qualified Data.Map as M
import qualified Data.Text as T
import qualified Data.Text.IO as T
import qualified Te... | eji/mix-kenall-geocode | src/cli/Main.hs | mit | 16,640 | 0 | 20 | 3,320 | 5,063 | 2,701 | 2,362 | 398 | 8 |
{-# LANGUAGE FlexibleContexts #-}
module Rx.Logger.Core where
import Control.Concurrent (myThreadId)
import Data.Text.Format (Format, format)
import Data.Text.Format.Params (Params)
import Data.Time (getCurrentTime)
import Rx.Observable (onNext)
import Rx.Subject (newPublishSubject)
import R... | roman/Haskell-Reactive-Extensions | rx-logger/src/Rx/Logger/Core.hs | mit | 2,289 | 0 | 11 | 466 | 866 | 449 | 417 | 61 | 1 |
main = do
let a = 20
let b = 10
let c = 15
let d = 5
putStrLn $ show (a+b*c-a+b*d)
putStrLn $ show (a+(b*c)-a+(b*d))
let e = (a+b)*c/d
putStrLn $ "(a+b)*c/d = " ++ show e
let e = ((a+b)*c)/d
putStrLn $ "((a+b)*c)/d = " ++ show e
let e = (a+b... | folivetti/PI-UFABC | AULA_01/Haskell/operadores_precedencia.hs | mit | 443 | 0 | 14 | 177 | 272 | 131 | 141 | 15 | 1 |
{-# LANGUAGE OverloadedStrings , BangPatterns #-}
module Autorotate where
import Data.Maybe ( isNothing , isJust , catMaybes )
import Data.Ratio ( Ratio , (%) , numerator , denominator )
import Data.List ... | mikehat/autorotate-image | Autorotate.hs | mit | 12,843 | 2 | 19 | 3,545 | 3,756 | 1,883 | 1,873 | 225 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Monad.Catch
import Codec.Binary.UTF8.String (decode)
import Config
import Control.Applicative
import Control.Concurrent
import Control.Monad.Except
import Control.Monad.Reader
import... | cocreature/rss2diaspora-hs | Bot.hs | mit | 2,973 | 0 | 24 | 1,050 | 755 | 382 | 373 | 82 | 4 |
import GarbageHat.Analysis
import GarbageHat.Domain
import GarbageHat.Parser
import System.Environment (getArgs)
import Control.Monad (mapM_)
import Data.Decimal (roundTo)
import Data.List (intercalate)
import Data.Set (toList)
main :: IO ()
main = do
args <- getArgs
case args of
[] -> usageHelp
["-parse... | doctau/garbagehat | Main.hs | epl-1.0 | 2,400 | 0 | 18 | 528 | 753 | 361 | 392 | 56 | 5 |
{- |
Module : $Header$
Description : Helper functions for dealing with terms
(mainly for pretty printing which is
directly adapted from hollight)
Copyright : (c) Jonathan von Schroeder, DFKI GmbH 2010
License : GPLv2 or higher, see LICENSE.txt
Maintainer : jonathan.von... | nevrenato/HetsAlloy | HolLight/Helper.hs | gpl-2.0 | 18,130 | 218 | 27 | 8,294 | 6,428 | 3,371 | 3,057 | 418 | 18 |
main :: IO ()
main = readLn >>= print . solve
solve :: Integer -> Int
solve = sum . map (read . (\c -> [c])) . show . (2^)
| NorfairKing/project-euler | 016/haskell/solution.hs | gpl-2.0 | 124 | 1 | 13 | 31 | 84 | 42 | 42 | 4 | 1 |
{-# LANGUAGE MagicHash #-}
module Main where
import Control.Monad
import Data.Word (Word64)
import qualified Data.ByteString.Char8 as BS8
import Control.DeepSeq
import qualified Data.Text.Array as A
import GHC.Prim
import GHC.Base (Int(..))
import Control.Exception (evaluate)
type BA = A.Array
makeBAs n = replicate ... | sinelaw/bytestrings-gc-analysis | gc.hs | gpl-2.0 | 874 | 0 | 14 | 189 | 388 | 206 | 182 | 30 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Data.Glome.Triangle (Triangle(..), triangle, triangle_raw, triangles, trianglenorm, TriangleNorm(..), trianglesnorms, rayint_triangle, rayint_trianglenorm) where
import Data.Glome.Vec
import Data.Glome.Solid
import Data.List(foldl1')
--... | jimsnow/glome | GlomeTrace/Data/Glome/Triangle.hs | gpl-2.0 | 6,524 | 0 | 26 | 2,099 | 2,322 | 1,204 | 1,118 | 137 | 5 |
import System.Random
main = do
gen <- getStdGen
putStrLn $ take 20 (randomRs ('a', 'z') gen)
gen <- getStdGen
putStrLn $ take 20 (randomRs ('a', 'z') gen) -- Same result
putStrLn "----------------"
let randomChars = randomRs ('a', 'z') gen
(first20, rest) = splitAt 20 randomChars
... | lamontu/learning_haskell | random_string.hs | gpl-3.0 | 579 | 1 | 11 | 152 | 225 | 107 | 118 | 17 | 1 |
subsets :: [a] -> [[a]]
subsets [] = [[]]
subsets (x:xs) = let ys = subsets xs
in (map (x:) ys) ++ ys
| marcosfede/algorithms | backtrack/subsets.hs | gpl-3.0 | 117 | 2 | 10 | 38 | 81 | 43 | 38 | 4 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-logging/gen/Network/Google/Resource/Logging/Organizations/Sinks/List.hs | mpl-2.0 | 6,123 | 0 | 18 | 1,398 | 894 | 520 | 374 | 127 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/AuthorizedCertificates/List.hs | mpl-2.0 | 6,628 | 0 | 20 | 1,549 | 969 | 559 | 410 | 141 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/TargetTCPProxies/Delete.hs | mpl-2.0 | 4,526 | 0 | 16 | 971 | 477 | 287 | 190 | 77 | 1 |
{-# LANGUAGE OverloadedStrings, RankNTypes #-}
module View.Form
( FormHtml
, field
, inputText
, inputTextarea
, inputPassword
, inputCheckbox
, inputSelect
, inputEnum
, inputDate
, inputFile
, inputHidden
, csrfForm
, htmlForm
) where
import Control.Applicative ((<|>))
import Control.Mona... | databrary/databrary | src/View/Form.hs | agpl-3.0 | 4,628 | 0 | 20 | 939 | 1,840 | 955 | 885 | 141 | 4 |
{- |
Module : $Header$
Description : QuickCheck generators and mutators for authochan.
Copyright : (c) plaimi 2014
License : AGPL-3
Maintainer : tempuhs@plaimi.net
-} module Authochan.Tests.Gen where
import Control.Applicative
(
(<$>),
(<*>),
liftA,
)
import Control.Monad.CryptoRandom
(
... | plaimi/authochan | test/Authochan/Tests/Gen.hs | agpl-3.0 | 2,314 | 0 | 14 | 535 | 699 | 381 | 318 | 92 | 1 |
module Ch_09_Standard where
myOr :: [Bool] -> Bool
myOr [] = False
myOr (x:xs) = x || myOr xs
myAny :: (a -> Bool) -> [a] -> Bool
myAny _ [] = False
myAny f (x:xs) = f x || myAny f xs
myElem :: Eq a => a -> [a] -> Bool
myElem _ [] = False
myElem e (x:xs)
| e == x = True
| otherwise = myElem e... | m3mitsuppe/haskell | exercises/Programming Haskell Book Exercises.hsproj/Ch_09_Standard.hs | unlicense | 438 | 0 | 8 | 135 | 235 | 121 | 114 | 14 | 1 |
{-# LANGUAGE MagicHash #-}
module PopCount where
import CLaSH.Prelude
import GHC.Word
import Data.Bits
topEntity :: Word -> Int
topEntity = popCount
testInput :: Signal Word
testInput = stimuliGenerator $(v [1::Word,3,8,50,0])
expectedOutput :: Signal Int -> Signal Bool
expectedOutput = outputVerifier $(v ([1,2,1,3... | ggreif/clash-compiler | tests/shouldwork/Basic/PopCount.hs | bsd-2-clause | 333 | 0 | 10 | 46 | 129 | 74 | 55 | 11 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UnicodeSyntax #-}
import Control.Applicative
import System.Console.CmdTheLine
import LogicGrowsOnTrees.Parallel.Main
import LogicGrowsOnTrees.Parallel.Adapter.Processes
import LogicGrowsOnTrees.Utils.PerfectTree
import LogicGrowsOnTrees.Utils.WordSum
main =
mainFo... | gcross/LogicGrowsOnTrees-processes | examples/count-all-trivial-tree-leaves.hs | bsd-2-clause | 783 | 1 | 15 | 191 | 162 | 86 | 76 | 19 | 3 |
{-|
Module : Numeric.LinearAlgebra.Repa
License : BSD3
Maintainer : marcin.jan.mrotek@gmail.com
Stability : experimental
HMatrix linear algebra functions wrapped to accept Repa arrays.
* Unqualified functions use raw 'F' arrays.
* "-S" functions precompute 'D' arrays sequentially.
* "-SIO" functions preco... | marcinmrotek/repa-linear-algebra | src/Numeric/LinearAlgebra/Repa.hs | bsd-3-clause | 55,329 | 0 | 12 | 11,801 | 22,732 | 11,504 | 11,228 | 935 | 2 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Build.Macros
-- Copyright : Simon Marlow 2008
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
-- Generate cabal_macros.h - CPP macros for package version testing
--
-- W... | sopvop/cabal | Cabal/Distribution/Simple/Build/Macros.hs | bsd-3-clause | 4,760 | 0 | 13 | 862 | 1,008 | 544 | 464 | 79 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Language.Haskell.Exts.Annotated (Module,Decl(..),ModuleName(ModuleName))
import Language.Haskell.Exts (defaultParseMode,ParseMode(..),ParseResult(ParseOk,ParseFailed))
import Language.Haskell.Names (
Symbol,annotateModule,Scoped(Scoped),
NameInfo(Glob... | phischu/haskell-declarations | src/haskell-declarations.hs | bsd-3-clause | 8,796 | 0 | 23 | 1,616 | 2,361 | 1,259 | 1,102 | 189 | 2 |
{-# LANGUAGE TemplateHaskell #-}
module SourceSpan where
import Prelude hiding (length)
import GHC
import Data.Aeson.TH
import Data.Vector (Vector)
import qualified Data.Vector as V
import Data.Text (Text)
import qualified Data.Text as T
type Offset = Int
type Lengt... | monto-editor/services-haskell | src/SourceSpan.hs | bsd-3-clause | 1,285 | 0 | 15 | 295 | 365 | 201 | 164 | 30 | 1 |
-- | This module provides a unified \graph interface\.
module Tct.Common.Graph
(
-- * Unified Graph Interface
-- ** Datatypes
Graph
, NodeId
, empty
, mkGraph
-- | A node in the graph. Most operations work on @NodeId@s.
-- Use @lookupNodeLabel@ to get the label of the node
... | ComputationWithBoundedResources/tct-common | src/Tct/Common/Graph.hs | bsd-3-clause | 13,266 | 0 | 11 | 3,699 | 1,648 | 941 | 707 | 105 | 1 |
module PrintingTest where
import Data.List
import Debug.Trace
import Driving
import Eval
import Program.List
import Program.Num
import Prelude hiding (succ)
import Residualization
import Program.Sort
import Stream
i... | kajigor/uKanren_transformations | test/PrintingTest.hs | bsd-3-clause | 4,837 | 0 | 19 | 1,286 | 1,410 | 723 | 687 | 76 | 8 |
{-# LANGUAGE FlexibleInstances #-}
module Sodium.Haskell.Convert (convert) where
import Data.List (genericReplicate)
import Control.Monad
import Control.Applicative
import qualified Data.Map as M
-- S for Src, D for Dest
import qualified Sodium.Chloride.Program.Vector as S
import qualified Sodium.Haskell.Program as D
... | kirbyfan64/sodium | src/Sodium/Haskell/Convert.hs | bsd-3-clause | 8,130 | 83 | 22 | 1,653 | 3,262 | 1,613 | 1,649 | -1 | -1 |
import Book
main :: IO ()
main = interact $ maybe "" ((++ "\n") . show) . booklist
| YoshikuniJujo/funpaala | samples/25_nml/decodeBooks.hs | bsd-3-clause | 84 | 0 | 10 | 19 | 43 | 23 | 20 | 3 | 1 |
{-# LANGUAGE CPP, RecursiveDo, OverloadedStrings, ScopedTypeVariables #-}
module JavaScript.Dropzone.Reflex (
reflexDropzoneOptions,
-- * Functions
newDropzoneOn,
eventWhenReady,
-- * Events with different callback arities
dropzoneEventFor0,
dropzoneEventFor1,
dropzoneEventFor2,
-- * Events with di... | benmos/reflex-dropzone | src/JavaScript/Dropzone/Reflex.hs | bsd-3-clause | 10,217 | 0 | 14 | 1,690 | 2,430 | 1,307 | 1,123 | 121 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Server (session) where
import Control.Monad
import Control.Monad.Remote.JSON
import Control.Applicative
import Data.Monoid
import Data.Aeson
import Data.Maybe
import Data.Text (Text)
import qualified Data.Text.IO as IO
import System... | roboguy13/remote-json | example/Weak/Server.hs | bsd-3-clause | 1,164 | 0 | 11 | 389 | 377 | 204 | 173 | 32 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
module Juno.Consensus.Handle.HeartbeatTimeout
(handle)
where
import Control.Lens
import Control.Monad.Reader
import Control.Monad.State
import Control.Monad.Writer
import Juno.Consensus.Handle.Types
import Jun... | buckie/juno | src/Juno/Consensus/Handle/HeartbeatTimeout.hs | bsd-3-clause | 2,003 | 0 | 16 | 382 | 475 | 250 | 225 | 48 | 3 |
-- | Utility functions for parsing refs and loading things from them.
module Horse.Refs
( refToHash
, isBranchRef
, loadBranchFromRef
) where
import Control.Monad
import Control.Monad.IO.Class
import Control.Monad.Trans.Either
import Data.Char (isDigit)
import Data.List (find)
import qualified Data.ByteString as BS... | bgwines/horse-control | src/Horse/Refs.hs | bsd-3-clause | 3,636 | 0 | 17 | 972 | 837 | 431 | 406 | 67 | 4 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Test.Tasty
import Test.Tasty.QuickCheck
import Test.Tasty.HUnit
import Control.Applicative ((<$>))
import Control.Monad
import Archive.Nar.UTF8
newtype UtfTest = UtfTest String
deriving (Show,Eq)
instance Arbitrary UtfTest where
arbitrary = UtfTest... | nar-org/hs-nar | tests/Tests.hs | bsd-3-clause | 1,232 | 0 | 18 | 367 | 398 | 227 | 171 | 29 | 1 |
module Control.Monad.Syntax.Five where
(=====<<) :: Monad m =>
(a -> b -> c -> d -> e -> m f)
-> m a
-> b -> c -> d -> e -> m f
(=====<<) mf x b c d e = x >>= (\a -> mf a b c d e)
infixr 1 =====<<
(=.===<<) :: Monad m =>
(a -> b -> c -> d -> e -> m f)
-> m b
... | athanclark/composition-extra | src/Control/Monad/Syntax/Five.hs | bsd-3-clause | 995 | 0 | 13 | 436 | 588 | 305 | 283 | 31 | 1 |
{-# LANGUAGE TemplateHaskell, StandaloneDeriving, DeriveGeneric, TypeFamilies, FlexibleInstances #-}
module QueryArrow.Remote.Serialization where
import QueryArrow.Remote.Definitions
import QueryArrow.DB.NoTranslation
import Data.Scientific
import Data.MessagePack
import GHC.Generics
import QueryArrow.Serialization ()... | xu-hao/QueryArrow | QueryArrow-db-remote/src/QueryArrow/Remote/Serialization.hs | bsd-3-clause | 1,459 | 0 | 16 | 202 | 338 | 185 | 153 | 32 | 0 |
{-# LANGUAGE TemplateHaskell #-}
module Game.GameItemsGlobals where
import Control.Lens (makeLenses)
import Types
import Game.GItemArmorT
import qualified Constants
makeLenses ''GameItemsGlobals
initialGameItemsGlobals :: GameItemsGlobals
initialGameItemsGlobals =
GameItemsGlobals { _giJacketArmorInfo = GIte... | ksaveljev/hake-2 | src/Game/GameItemsGlobals.hs | bsd-3-clause | 948 | 0 | 8 | 298 | 157 | 88 | 69 | 18 | 1 |
import Test.Hspec
import Test.Lexer
main :: IO ()
main = do
Test.Lexer.test
| YLiLarry/parser241-lexer | test/Spec.hs | bsd-3-clause | 81 | 0 | 7 | 17 | 32 | 17 | 15 | 5 | 1 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Ordinal.HU.Rules
( rules ) where
im... | facebookincubator/duckling | Duckling/Ordinal/HU/Rules.hs | bsd-3-clause | 3,170 | 0 | 18 | 678 | 851 | 514 | 337 | 91 | 2 |
module Language.Hudson.PrettyPrinter where
import Text.PrettyPrint.HughesPJ
import Control.Monad (liftM2)
import Language.Hudson.AST
import Language.Hudson.Parser (parseFile, parseString', parseString)
import Control.Applicative ((<$>))
-- TODO
--
-- Allow withCode to use single line if-stmts, functions, etc.
--
-... | jschaf/hudson-dev | src/Language/Hudson/PrettyPrinter.hs | bsd-3-clause | 8,601 | 0 | 15 | 3,001 | 2,330 | 1,145 | 1,185 | 161 | 18 |
myFavoriteFruit = "banana"
| YoshikuniJujo/funpaala | samples/05_function/fruits1.hs | bsd-3-clause | 27 | 0 | 4 | 3 | 6 | 3 | 3 | 1 | 1 |
-- | Functions for working with CSV files.
module Analyze.Csv where
import Analyze.Conversions (projectRows)
import Analyze.RFrame (RFrame (..), RFrameUpdate (..), empty, fromUpdate)
import Control.Monad.Catch (Exception, MonadThrow (..))
import qualified Data.Bi... | ejconlon/analyze | src/Analyze/Csv.hs | bsd-3-clause | 2,533 | 0 | 17 | 614 | 673 | 359 | 314 | 49 | 3 |
{-# LINE 1 "Control.Monad.Fix.hs" #-}
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TypeOperators #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Monad.Fix
-- Copyright : (c) Andy Gill 2001,
-- (c) Oregon ... | phischu/fragnix | builtins/base/Control.Monad.Fix.hs | bsd-3-clause | 3,815 | 0 | 12 | 967 | 935 | 511 | 424 | 61 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell... | plow-technologies/persistent | persistent-test/src/LargeNumberTest.hs | mit | 1,464 | 0 | 17 | 376 | 384 | 188 | 196 | 32 | 1 |
string = "# ¬ 水 😴"
| evolutics/haskell-formatter | testsuite/resources/source/literals/does_not_escape_characters/Output.hs | gpl-3.0 | 25 | 0 | 4 | 6 | 6 | 3 | 3 | 1 | 1 |
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
import Data.Map (fromList)
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import ETL (transform)
main :: IO ()
main = hspecWith defaultConfig {configFastFail = True} specs
specs :: Spec
... | daewon/til | exercism/haskell/etl/test/Tests.hs | mpl-2.0 | 1,674 | 0 | 14 | 609 | 612 | 375 | 237 | 36 | 1 |
{-
Copyright 2016,2017 Markus Ongyerth
This file is part of Monky.
Monky is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any la... | monky-hs/monky | Monky/Examples/Wifi.hs | lgpl-3.0 | 1,065 | 0 | 5 | 223 | 34 | 24 | 10 | 6 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ViewPatterns #-}
module Language.K3.Interpreter.Context (
NetworkPeer,
VirtualizedMessageProcessor,
SingletonMessageProcessor,... | DaMSL/K3 | src/Language/K3/Interpreter/Context.hs | apache-2.0 | 21,332 | 0 | 19 | 5,012 | 5,720 | 2,876 | 2,844 | 321 | 17 |
{-|
This module exports the underlying Attoparsec row parser. This is helpful if
you want to do some ad-hoc CSV string parsing.
-}
module Data.CSV.Conduit.Parser.Text
( parseCSV
, parseRow
, row
, csv
) where
-------------------------------------------------------------------------------
imp... | mohsen3/csv-conduit | src/Data/CSV/Conduit/Parser/Text.hs | bsd-3-clause | 2,758 | 0 | 14 | 645 | 762 | 391 | 371 | 60 | 4 |
import System.Exit (exitFailure)
import Data.List
import Tuura.Concept.STG
import Tuura.Concept.STG.Translation
import Tuura.Plato.Translate.Translation
main :: IO ()
main = do
testDotGOutput
testHandshakeConcept
testOrGateConcept
testTwoAndGates
testTwoDifferentCElements
testBooleanFunction... | tuura/concepts | TransTest.hs | bsd-3-clause | 3,978 | 0 | 14 | 1,408 | 1,363 | 701 | 662 | 98 | 1 |
{-# OPTIONS_HADDOCK hide #-}
module Graphics.Vty.Inline.Unsafe where
import Graphics.Vty
import Data.IORef
import GHC.IO.Handle (hDuplicate)
import System.IO (stdin, stdout, hSetBuffering, BufferMode(NoBuffering))
import System.IO.Unsafe
import System.Posix.IO (handleToFd)
globalVty :: IORef (Maybe Vty)
{-# NOI... | jtdaugherty/vty | src/Graphics/Vty/Inline/Unsafe.hs | bsd-3-clause | 1,692 | 0 | 15 | 402 | 439 | 218 | 221 | 42 | 2 |
data Foo = Foo
{ foo :: Int
-- comment
, bar :: Int
}
| ruchee/vimrc | vimfiles/bundle/vim-haskell/tests/indent/test001/expected.hs | mit | 60 | 0 | 8 | 21 | 23 | 14 | 9 | 3 | 0 |
{-# LANGUAGE ScopedTypeVariables #-}
-- partain: the failure (crashing) was w/ -prof-auto compilation
module Main where
import Control.Exception (IOException, catch)
xreff :: Int -> [String] -> Table -> Int -> String -> String
xreff cc exs stab lineno [] = display (foldl delete stab exs)
xreff cc exs stab lineno ('\... | urbanslug/ghc | testsuite/tests/programs/jules_xref2/Main.hs | bsd-3-clause | 2,563 | 0 | 15 | 811 | 1,030 | 535 | 495 | 53 | 4 |
{-# LANGUAGE RecordWildCards #-}
module Game
( module Game
, module Game.Types
) where
import Control.Lens ((^.))
import Control.Monad (guard)
import Data.List (find)
import Game.Types
import qualified HttpApp.Model as Model
-- play now mode
findHumanPlayer :: [Pl... | rubenmoor/skull | skull-server/src/Game.hs | mit | 2,226 | 0 | 12 | 624 | 620 | 337 | 283 | 73 | 4 |
--------------------------------------------------------------------------
-- Copyright (c) 2007-2010, ETH Zurich.
-- All rights reserved.
--
-- This file is distributed under the terms in the attached LICENSE file.
-- If you do not find this file, copies can be found by writing to:
-- ETH Zurich D-INFK, Haldeneggsteig... | utsav2601/cmpe295A | hake/ArchDefaults.hs | mit | 11,997 | 0 | 21 | 3,973 | 3,294 | 1,740 | 1,554 | 236 | 2 |
-----------------------------------------------------------------------------
--
-- Module : Drool.Utils.FeatureExtraction
-- Copyright : Tobias Fuchs
-- License : AllRightsReserved
--
-- Maintainer : twh.fuchs@gmail.com
-- Stability : experimental
-- Portability : POSIX
--
-- |
--
-----------------... | fuchsto/drool | src/Drool/Utils/FeatureExtraction.hs | mit | 2,267 | 0 | 12 | 437 | 407 | 243 | 164 | 37 | 5 |
module Foundation where
-- Prelude.
import ClassyPrelude hiding (Handler, keys)
import Control.Lens hiding (scribe)
import Control.Monad.Except (ExceptT (..))
import Control.Monad.Trans.Maybe (MaybeT (MaybeT), runMaybeT)
import qualified Da... | jkachmar/servant-persistent-realworld | src/Foundation.hs | mit | 5,309 | 0 | 14 | 1,291 | 969 | 527 | 442 | -1 | -1 |
module U.Util.Monoid where
import Data.Foldable (toList)
import Data.List (intersperse)
import Control.Monad (foldM)
-- List.intercalate extended to any monoid
-- "The type that intercalate should have had to begin with."
intercalateMap :: (Foldable t, Monoid a) => a -> (b -> a) -> t b -> a
intercalateMap separator r... | unisonweb/platform | codebase2/util/U/Util/Monoid.hs | mit | 835 | 0 | 10 | 167 | 343 | 182 | 161 | 19 | 1 |
{-# LANGUAGE OverloadedStrings, CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Web.Twitter.Feed
-- License : MIT (see the file LICENSE)
-- Maintainer : Justin Leitgeb <justin@stackbuilders.com>
--
-- Functions for fetching (and linkifying) timelines of ... | stackbuilders/twitter-feed | src/Web/Twitter/Feed.hs | mit | 5,354 | 0 | 14 | 1,570 | 1,130 | 597 | 533 | 98 | 2 |
module TeX.Token
( Token(CharToken, ControlSequence)
, extractChar, extractControlSequence, charCode
)
where
import Data.Char (ord)
import TeX.Category
data Token = CharToken Char Category
| ControlSequence [Char]
deriving (Show, Eq)
extractChar :: Token -> Char
extractChar (CharToken c _) = c
extractC... | spicyj/tex-parser | src/TeX/Token.hs | mit | 793 | 0 | 10 | 148 | 276 | 145 | 131 | 22 | 1 |
module Main where
import Control.Applicative
import Control.Monad.Fix
data Term
= Number Int
| Boolean Bool
| Ident Int
| Abstr Term
| App Term Term
| AppPrim Prim [Term]
deriving (Eq)
data Prim
= If
| Equal
| Minus
| Multi
deriving (Show, Eq)
fromAbstr :: Term -> Term
fromAbstr (Abstr t) = ... | nicball/playground | NamelessLam.hs | mit | 3,625 | 0 | 19 | 1,221 | 1,699 | 852 | 847 | 121 | 13 |
{-# LANGUAGE OverloadedStrings #-}
-- | \"Low-level\" user administration.
module Imageboard.Moderation.Users
( -- * Creating users
createAdministrator
, createUser
, createAdministrator'
, createUser'
-- * Deactivating users
, deactivateUser
, reactivateUser
-- * Querying users
, findUserById
... | barrucadu/nagi | lib/Imageboard/Moderation/Users.hs | mit | 6,012 | 0 | 22 | 1,203 | 1,424 | 745 | 679 | 118 | 3 |
--------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings, TupleSections #-}
import Data.Monoid
import qualified Data.Set as S
import Hakyll
import Text.Pandoc.Options
import System.FilePath (takeBaseName, takeDirectory, joinP... | holdenlee/notebook | site.hs | mit | 7,418 | 0 | 22 | 1,957 | 1,405 | 693 | 712 | 147 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Codec.Soten.PostProcess.FlipUVsTest where
import Test.Hspec
import Control.Lens ((&), (^.), (%~), (.~))
import qualified Data.Vector as V
import Linear
import Codec.Soten.PostProcess.FlipUVs
import Codec.Soten.Scene
import Codec.Soten.Scene.Mesh
import Codec.Soten.Scene.Mate... | triplepointfive/soten | test/Codec/Soten/PostProcess/FlipUVsTest.hs | mit | 1,258 | 0 | 15 | 250 | 348 | 190 | 158 | 31 | 1 |
module NetHack.Control.ItemListing
(updateInventoryIfNecessary,
itemsOnScreen)
where
import Control.Monad
import Control.Monad.IO.Class(liftIO)
import Data.Maybe(fromJust)
import NetHack.Data.NetHackState
import NetHack.Monad.NHAction
import NetHack.Data.Item
import qualified Data.Map as M
import qualified Term... | Noeda/Megaman | src/NetHack/Control/ItemListing.hs | mit | 4,569 | 14 | 13 | 1,352 | 1,004 | 523 | 481 | 89 | 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.