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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE CPP, RecordWildCards, GADTs, ScopedTypeVariables, RankNTypes #-}
module Main (main) where
import GHCi.Run
import GHCi.TH
import GHCi.Message
import GHCi.Signals
import GHCi.Utils
import Control.DeepSeq
import Control.Exception
import Control.Monad
import Data.Binary
import Data.IORef
import System.Enviro... | GaloisInc/halvm-ghc | iserv/src/Main.hs | bsd-3-clause | 3,420 | 0 | 19 | 934 | 1,034 | 498 | 536 | 89 | 8 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE RecordWildCards #-}
module Ivory.Tower.HAL.Bus.Sched (
Task, task, schedule
) where
import Control.Monad (forM)
import Ivory.Language
import Ivory.Stdlib
import Ivory.Tower
import Ivory.Tower.HAL.Bus.Interface
import Ivory.Tower.HAL.Bus.Sched.Internal
-- | Multiplex a reques... | GaloisInc/tower | tower-hal/src/Ivory/Tower/HAL/Bus/Sched.hs | bsd-3-clause | 3,430 | 0 | 26 | 932 | 884 | 426 | 458 | 66 | 1 |
--------------------------------------------------------- ------ Module : Network.LifeRaft.Raft
-... | DeathByTape/LifeRaft | test/HLint.hs | bsd-3-clause | 931 | 0 | 8 | 332 | 102 | 63 | 39 | 11 | 2 |
-- |
-- Copyright : (c) Sam Truzjan 2013
-- License : BSD3
-- Maintainer : pxqr.sta@gmail.com
-- Stability : stable
-- Portability : portable
--
-- Efficient encoding and decoding of base32 encoded bytestring
-- according to RFC 4648. <http://tools.ietf.org/html/rfc4648>
--
-- This module ... | pxqr/base32-bytestring | src/Data/ByteString/Base32.hs | bsd-3-clause | 1,868 | 0 | 8 | 425 | 357 | 201 | 156 | 35 | 1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[TcBinds]{TcBinds}
-}
{-# LANGUAGE CPP, RankNTypes, ScopedTypeVariables #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
module TcBinds ( tcLocalBinds, tcTopBinds, tcRecSelBinds,
... | ezyang/ghc | compiler/typecheck/TcBinds.hs | bsd-3-clause | 75,334 | 0 | 23 | 23,550 | 12,321 | 6,466 | 5,855 | 877 | 9 |
module Spring13.Week1.HanoiTower
(hanoi)
where
type Peg = String
type Move = (Peg, Peg)
hanoi :: Integer -> Peg -> Peg -> Peg -> [Move]
hanoi n a b c
| n > 0 = (hanoi (n-1) a c b) ++ [(a, b)] ++ (hanoi (n-1) c b a)
| otherwise = []
| bibaijin/cis194 | src/Spring13/Week1/HanoiTower.hs | bsd-3-clause | 242 | 0 | 11 | 62 | 144 | 79 | 65 | 8 | 1 |
-------------------------------------------------------------------------------
{- LANGUAGE CPP #-}
#define DO_TRACE 0
#define USE_POST_ORDER_IDS 0
#define SHOW_PAT_NODE_ATTRS 0
#define WARN_IGNORED_SUBPATTERNS 1
#define NEVER_IGNORE_SUBPATTERNS 0
-- Formerly DEBUG_WITH_DEEPSEQ_GENERICS.
-- Now also needed to... | phunehehe/deepseq-bounded | src/Control/DeepSeq/Bounded/Pattern.hs | bsd-3-clause | 40,005 | 44 | 23 | 8,987 | 3,517 | 2,192 | 1,325 | 172 | 8 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Monad (forM_)
import Data.List.Split (splitOn)
import System.Directory (getDirectoryContents)
import System.Environment (getArgs)
import Data.List (groupBy, sortBy, isSuffixOf)
type Pt = Int
type Pid = String
type Sid = String
data Result = Result {... | msakai/icfpc2015 | tools/highscores.hs | bsd-3-clause | 1,120 | 0 | 14 | 326 | 455 | 235 | 220 | 35 | 1 |
module EFA.Flow.Sequence where
import qualified EFA.Flow.Topology as FlowTopo
import qualified EFA.Flow.Storage as Storage
import qualified EFA.Flow.SequenceState.Index as Idx
import qualified EFA.Signal.Sequence as Sequ
import Data.Map (Map)
import Prelude hiding (sequence)
type
Storages node storageLabel bo... | energyflowanalysis/efa-2.1 | src/EFA/Flow/Sequence.hs | bsd-3-clause | 914 | 0 | 9 | 201 | 190 | 121 | 69 | 24 | 0 |
{-# LANGUAGE OverloadedStrings, NamedFieldPuns #-}
module Distribution.Server.Features.Search.PkgSearch (
PkgSearchEngine,
initialPkgSearchEngine,
defaultSearchRankParameters,
PkgDocField(..),
PkgDocFeatures,
) where
import Distribution.Server.Features.Search.SearchEngine
import Distribution.Ser... | edsko/hackage-server | Distribution/Server/Features/Search/PkgSearch.hs | bsd-3-clause | 6,198 | 0 | 12 | 1,536 | 935 | 550 | 385 | 94 | 5 |
-----------------------------------------------------------------------------
-- | Separate module for HTTP actions, using a proxy server if one exists
-----------------------------------------------------------------------------
module Distribution.Client.HttpUtils (
DownloadResult(..),
downloadURI,
getHTT... | typelead/epm | epm/Distribution/Client/HttpUtils.hs | bsd-3-clause | 5,840 | 0 | 20 | 1,639 | 1,471 | 786 | 685 | 126 | 11 |
{-# LANGUAGE OverloadedStrings #-}
module Network.Sock.Types.Server
( Server(..)
, ServerSettings(..)
, ServerState(..)
, ServerEnvironment(..)
) where
------------------------------------------------------------------------------
import Control.Monad.Trans.State.Strict (StateT)
import Control.Con... | Palmik/wai-sockjs | src/Network/Sock/Types/Server.hs | bsd-3-clause | 1,402 | 0 | 15 | 218 | 242 | 157 | 85 | 22 | 0 |
{-# LANGUAGE OverloadedStrings
, PatternGuards
, TypeOperators
, DataKinds
, GADTs
, KindSignatures
, FlexibleContexts
, RankNTypes
, CPP #-}
module Main where
import Language.Hakaru.Pretty.Concrete
import Lang... | zachsully/hakaru | commands/Disintegrate.hs | bsd-3-clause | 3,930 | 1 | 21 | 1,515 | 944 | 493 | 451 | 93 | 6 |
-----------------------------------------------------------------------------
-- |
-- Module : Network.HTTP.Headers
-- Copyright : (c) Warrick Gray 2002, Bjorn Bringert 2003-2005, 2007 Robin Bate Boerop, 2008- Sigbjorn Finne
-- License : BSD
--
-- Maintainer : Sigbjorn Finne <sigbjorn.finne@gmail.com>
... | astro/HTTPbis | Network/HTTP/Headers.hs | bsd-3-clause | 10,933 | 15 | 14 | 2,999 | 2,023 | 1,109 | 914 | 200 | 6 |
module GraphVizGenSpec where
import TestPrograms
import Test.Hspec
import Data.CFG (progToCfg, writeVizCfg)
import Data.Cmm.Parser (parse, program)
main :: IO ()
main = hspec spec
spec :: Spec
spec = it "generates graphviz file" $ generateGviz
generateGviz :: IO ()
generateGviz = mapM_ fun testPrograms where
fun... | adamschoenemann/asa-analysis | test/GraphVizGenSpec.hs | bsd-3-clause | 448 | 0 | 13 | 93 | 151 | 82 | 69 | 13 | 1 |
{- Data/Singletons/TH/Promote/Monad.hs
(c) Richard Eisenberg 2014
rae@cs.brynmawr.edu
This file defines the PrM monad and its operations, for use during promotion.
The PrM monad allows reading from a PrEnv environment and writing to a list
of DDec, and is wrapped around a Q.
-}
module Data.Singletons.TH.Promote.Mon... | goldfirere/singletons | singletons-th/src/Data/Singletons/TH/Promote/Monad.hs | bsd-3-clause | 6,561 | 0 | 16 | 1,586 | 1,255 | 687 | 568 | -1 | -1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
-}
{-# LANGUAGE CPP #-}
module TcValidity (
Rank, UserTypeCtxt(..), checkValidType, checkValidMonoType,
expectedKindInCtxt,
checkValidTheta, checkValidFamPats,
checkValidInstance, validDerivPred,
checkInstTermina... | elieux/ghc | compiler/typecheck/TcValidity.hs | bsd-3-clause | 58,004 | 4 | 16 | 16,419 | 8,751 | 4,478 | 4,273 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
module AI.Network.FeedForwardNetwork
( FeedForwardNetwork(..)
, emptyFeedForwardNetwork
, isEmptyFeedForwardNetwork
, addFeedForwardNetworks
, loadFeedForwardNetwork
, saveFeedForwardNetwork
, apply
) w... | jbarrow/LambdaNet | AI/Network/FeedForwardNetwork.hs | mit | 4,007 | 0 | 10 | 821 | 731 | 396 | 335 | 59 | 1 |
main :: [()]
main = [() | Nothing <- []]
| roberth/uu-helium | test/staticwarnings/Generator6.hs | gpl-3.0 | 42 | 0 | 8 | 11 | 31 | 17 | 14 | 2 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Ldap.Client.ModifySpec (spec) where
import Test.Hspec
import qualified Ldap.Asn1.Type as Ldap.Type
import Ldap.Client as Ldap
import SpecHelper (locally, charizard, pikachu, raichu)
spec :: Spec
spec = do
let go l f = Ldap.search l (Dn "o=loc... | VictorDenisov/ldap-client | test/Ldap/Client/ModifySpec.hs | bsd-2-clause | 3,231 | 0 | 28 | 1,132 | 1,067 | 545 | 522 | 66 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Stack.Init
( findCabalFiles
, initProject
, InitOpts (..)
, SnapPref (..)
, Method (..)
, makeConcreteResolver
) where
import ... | sinelaw/stack | src/Stack/Init.hs | bsd-3-clause | 10,510 | 0 | 20 | 3,523 | 2,457 | 1,241 | 1,216 | 207 | 8 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ExtendedDefaultRules #-}
module Main (main) where
import Database.MongoDB (Action, Document, Document, Value, access,
close, connect, delete, exclude, find,
host, insertMany, insert_, master, project, rest,
... | tagia0212/haskell-mongod-todo | src/Main.hs | bsd-3-clause | 2,220 | 0 | 10 | 660 | 732 | 388 | 344 | 54 | 2 |
{-# OPTIONS_GHC -fno-implicit-prelude -#include "HsBase.h" #-}
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.C.Error
-- Copyright : (c) The FFI task force 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : ffi@ha... | FranklinChen/hugs98-plus-Sep2006 | packages/base/Foreign/C/Error.hs | bsd-3-clause | 21,679 | 384 | 12 | 5,399 | 3,346 | 2,000 | 1,346 | 249 | 4 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE ScopedTypeVariables #-}
import qualified Network.Connection as N
import Options.Applicative
import qualified Rede.TLSConnect as SP
import Rede.Utils (strToInt)
import System.X509 (getSystemCertif... | alcidesv/ReH | hs-src/main.hs | bsd-3-clause | 1,683 | 0 | 15 | 467 | 423 | 222 | 201 | 47 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Data.Streaming.NetworkSpec where
import Control.Concurrent.Async (withAsync)
import Control.Exception (bracket)
import Control.Monad (forever, replicateM_)
import Data.Array.Unboxed (elems)
import qualified Data.B... | phadej/streaming-commons | test/Data/Streaming/NetworkSpec.hs | mit | 1,513 | 0 | 24 | 559 | 388 | 201 | 187 | 32 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import AndroidLintSummary.CLI (runCLI)
import Paths_android_lint_summary (version)
main :: IO ()
main = runCLI version
| VikingDen/android-lint-summary | Main.hs | apache-2.0 | 199 | 0 | 6 | 48 | 41 | 24 | 17 | 6 | 1 |
{- |
Module : $Header$
Copyright : (c) Till Mossakowski, Wiebke Herding, C. Maeder, Uni Bremen 2004
License : GPLv2 or higher, see LICENSE.txt
Maintainer : luecke@informatik.uni-bremen.de
Stability : provisional
Portability : portable
Parser for modal logic extension of CASL
-}
module Modal.Parse... | mariefarrell/Hets | Modal/Parse_AS.hs | gpl-2.0 | 2,863 | 0 | 14 | 693 | 884 | 438 | 446 | 73 | 1 |
import Common
import Communication.IVC
import Control.Concurrent
import Control.Exception
import Control.Monad
import Data.Binary.Put
import Hypervisor.Debug
import Hypervisor.ErrorCodes
import Hypervisor.XenStore
main = handle exceptionHandler $ do
writeDebugConsole "LEFT: Initializing XenStore.\n"
xs <- initXen... | ggkitsas/HaLVM | examples/IVC/ByteStringIVC/Peer1.hs | bsd-3-clause | 1,019 | 0 | 17 | 172 | 304 | 144 | 160 | 28 | 1 |
-- Tests created by Jan Stolarek <jan.stolarek@p.lodz.pl>
{-# LANGUAGE BangPatterns, MagicHash #-}
module Main where
import GHC.Exts
main :: IO ()
main = do
-- PrimOps for comparing Char#
putStrLn "=== testing gtChar# ==="
test "gtChar#" (a# `gtChar#` a# ) -- False
test "gtChar#" (b# `gtChar#` a# )... | urbanslug/ghc | testsuite/tests/primops/should_run/T6135.hs | bsd-3-clause | 21,657 | 200 | 11 | 6,743 | 6,956 | 3,741 | 3,215 | 399 | 1 |
module Main where
main :: IO ()
main = do putStrLn "Hello, World!"
| StanislavKhalash/cruel-world-hs | app/Main.hs | mit | 68 | 0 | 7 | 14 | 25 | 13 | 12 | 3 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
module ... | oisdk/semiring-num | test/Spec.hs | mit | 8,833 | 0 | 15 | 3,973 | 2,057 | 1,131 | 926 | 238 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import Control.Monad (void)
import Data.String (fromString)
import Data.Text (pack)
import Options.Applicative
import Bot
import Vindinium
data Cmd = Training Settings (Maybe Int) (Maybe Board)
| Arena Settings
cmdSettings :: Cmd -> Settings
cmdS... | osa1/vindinium | src/Main.hs | mit | 1,511 | 0 | 14 | 413 | 502 | 254 | 248 | 41 | 2 |
import Control.Applicative
import Control.Monad
import Data.List
import Text.Printf
import qualified Data.Set as Set
main :: IO ()
main = do
tests <- readLn
forM_ [1..tests] $ \caseNum -> do
n <- readLn
let ans = case n of
0 -> Nothing
_ -> Just solve
where
... | marknsikora/codejam | 6254486/A.hs | mit | 562 | 1 | 26 | 179 | 234 | 116 | 118 | 17 | 3 |
module Paths_harmlang (
version,
getBinDir, getLibDir, getDataDir, getLibexecDir,
getDataFileName, getSysconfDir
) where
import qualified Control.Exception as Exception
import Data.Version (Version(..))
import System.Environment (getEnv)
import Prelude
catchIO :: IO a -> (Exception.IOException -> IO a) ... | lrassaby/harmlang | dist/build/autogen/Paths_harmlang.hs | mit | 1,420 | 0 | 10 | 182 | 371 | 213 | 158 | 28 | 1 |
module Types where
import Data.Ord (comparing)
type Problem = ([Server], [VM])
data Server = Server
{ serverID :: Int
, ramCap :: Int -- RAM capacity
, cpuCap :: Int -- CPU capacity
} deriving (Eq)
instance Show Server where
show server = "S" ++ show (serverID server)
instance Ord Server where
comp... | rodamber/vmc-hs | lib/Types.hs | mit | 776 | 0 | 9 | 234 | 214 | 125 | 89 | 24 | 0 |
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE RankNTypes #-}
module SFold where
import Control.Arrow (second)
import Control.Category (Category(..))
import Data.Monoid (Monoid(..), (<>))
import Prelude hiding ((.), id)
import Data.Profunctor
import qualified Control.Foldl as L
import Data.Foldable (fold)
{... | tonyday567/sfold | sfold/src/SFold.hs | mit | 4,941 | 0 | 14 | 1,329 | 1,671 | 876 | 795 | 82 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Data.Generics.K.ToK
-- Copyright : (c) David Lazar, 2011
-- License : MIT
--
-- Maintainer : lazar6@illinois.edu
-- Stability : experimental
-- Portability : unknown
--
-- Convert 'Data' values to K terms.... | davidlazar/generic-k | src/Data/Generics/K/ToK.hs | mit | 1,688 | 0 | 10 | 315 | 440 | 249 | 191 | 34 | 1 |
{-# language PatternGuards #-}
{-# language TypeApplications #-}
{-# language OverloadedStrings #-}
module Unison.Test.MCode where
import EasyTest
import Control.Concurrent.STM
import qualified Data.Map.Strict as Map
import Data.Bits (bit)
import Data.Word (Word64)
import Unison.Util.EnumContainers as EC
import ... | unisonweb/platform | parser-typechecker/tests/Unison/Test/MCode.hs | mit | 3,217 | 0 | 15 | 804 | 900 | 476 | 424 | -1 | -1 |
-- Solves the Reverse Polish Notation problem.
--
-- RPN form of the following operation:
-- 10 - (4 + 3) * 2
-- is:
-- 10 4 3 + 2 * -
-- You traverse the list of symbols from left to right, whever you encounter a
-- number you push it into a stack, when you encounter an operator, pop two
-- numbers from the ... | topliceanu/learn | haskell/ReversePolish.hs | mit | 853 | 0 | 10 | 240 | 273 | 149 | 124 | 12 | 8 |
{-# LANGUAGE ScopedTypeVariables #-}
module LLVM.Emitter (emitLLVM) where
import Data.Word
import LLVM.AbcOps
import LLVM.Emitter.Bootstrap
import LLVM.Lang
import LLVM.Passes.AbcT
import LLVM.Passes.Branch
import LLVM.Passes.LLVMT
import ... | phylake/avm3 | llvm/emitter.hs | mit | 6,636 | 0 | 14 | 1,941 | 2,092 | 1,086 | 1,006 | 160 | 4 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
module Antigen
( antigen
, AntigenConfig(..)
, defaultConfig
, ZshPlugin(..)
, RepoStorage(..)
, SourcingStrategy
, defaultZshPlugin
, bundle
, local
, strictSourcingStrate... | Tarrasch/antigen-hs | Antigen.hs | mit | 9,342 | 0 | 15 | 2,135 | 1,826 | 990 | 836 | 177 | 4 |
-- Generated by protobuf-simple. DO NOT EDIT!
module Types.EnumMsg where
import Control.Applicative ((<$>))
import Prelude ()
import qualified Data.ProtoBufInt as PB
import qualified Types.Enum
newtype EnumMsg = EnumMsg
{ value :: Types.Enum.Enum
} deriving (PB.Show, PB.Eq, PB.Ord)
instance PB.Default EnumMsg wh... | sru-systems/protobuf-simple | test/Types/EnumMsg.hs | mit | 856 | 0 | 13 | 160 | 303 | 164 | 139 | 21 | 0 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE OverloadedStrings #-}
module Shexkell.Text.JSON.NodeConstraint where
import Data.Aeson
import Data.Aeson.Types
import Data.Foldable (asum)
import Control.Applicative
import Data.Scientific
import Data.String
import Data.Maybe (fromMaybe)
import Shexkell.Data.ShEx
import... | weso/shexkell | src/Shexkell/Text/JSON/NodeConstraint.hs | mit | 3,493 | 0 | 14 | 715 | 866 | 420 | 446 | 83 | 1 |
import Control.Arrow
import Control.Applicative
import qualified Data.Foldable as F
import Data.List
import Data.List.Split
(|>) :: a -> (a -> b) -> b
(|>) x y = y x
infixl 0 |>
main :: IO ()
main = do
_ <- getLine
((lines >>> map readBinary >>> solve >>> map show >>> intercalate "\n") <$>
getContents... | Dobiasd/HackerRank-solutions | Algorithms/Warmup/ACM_ICPC_Team/Main.hs | mit | 1,158 | 4 | 15 | 266 | 524 | 277 | 247 | 34 | 1 |
module Graphics where
import Control.Monad
import Control.Monad.State
import Control.Monad.Reader
import Graphics.UI.SDL as SDL
import Graphics.UI.SDL.Image as IMG
import Graphics.UI.SDL.Rotozoomer as Roto
import Constants
import Entities
import World
data Graphics = Graphics {
screen :: Surface
, background :: Su... | rdtaylor/CelestialBodies | Graphics.hs | mit | 2,293 | 0 | 17 | 448 | 761 | 394 | 367 | 61 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
module Hearthstone.Card (
Card(..)
, pretty
) where
import Data.Text (Text)
import qualified Data.Text.Lazy as LT
import Control.Lens.TH
import Hearthstone.CardType (CardType)
import Data.Text.Format (format)
import Control.Applicative
import C... | jb55/hearthstone-cards | src/Hearthstone/Card.hs | mit | 673 | 0 | 9 | 136 | 196 | 114 | 82 | -1 | -1 |
module LoanCapitalSplit
where
-- This module delivers solution of proportional capital split. Ie. when capital is split into limited number of amounts where each of
-- amounts is always in the same proportion to the capital.
-- Can be used in cases where are financed some number of different goods or services tha... | bartoszw/elca | LoanCapitalSplit.hs | gpl-2.0 | 1,505 | 0 | 12 | 323 | 271 | 149 | 122 | 11 | 1 |
module Heap
where
emptyHeap:: (Ord a) => Heap a
heapEmpty:: (Ord a) => Heap a -> Bool
findHeap :: (Ord a) => Heap a -> a
insHeap :: (Ord a) => a -> Heap a -> Heap a
delHeap :: (Ord a) => Heap a -> Heap a
-- IMPLEMENTATION with Leftist Heap
-- adapted from C. Okasaki Purely Functional Data Structures ... | collective/ECSpooler | backends/haskell/haskell_libs/Heap.hs | gpl-2.0 | 1,763 | 0 | 11 | 568 | 640 | 322 | 318 | 31 | 1 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, CPP,
OverloadedStrings, GeneralizedNewtypeDeriving #-}
{-
Copyright (C) 2009-2014 John MacFarlane <jgm@berkeley.edu>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Fr... | rgaiacs/pandoc | src/Text/Pandoc/Templates.hs | gpl-2.0 | 11,583 | 0 | 19 | 3,046 | 2,677 | 1,365 | 1,312 | 197 | 11 |
import Language.Dockerfile
main :: IO ()
main = writeFile "./examples/test-dockerfile.dockerfile" $ toDockerfileStr $ do
from (tagged "fpco/stack-build" "lts-6.9")
add "." "/app/language-dockerfile"
workdir "/app/language-dockerfile"
run "stack build --test --only-dependencies"
cmd "stack... | beijaflor-io/haskell-language-dockerfile | examples/test-dockerfile.hs | gpl-3.0 | 327 | 1 | 10 | 62 | 75 | 31 | 44 | 8 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-books/gen/Network/Google/Resource/Books/CloudLoading/UpdateBook.hs | mpl-2.0 | 4,884 | 0 | 18 | 1,135 | 711 | 414 | 297 | 107 | 1 |
-- -*-haskell-*-
-- GIMP Toolkit (GTK) Widget Separator
--
-- Author : Axel Simon
--
-- Created: 23 May 2001
--
-- Copyright (C) 1999-2005 Axel Simon
--
-- This library 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 Fr... | thiagoarrais/gtk2hs | gtk/Graphics/UI/Gtk/Abstract/Separator.hs | lgpl-2.1 | 1,740 | 0 | 5 | 349 | 89 | 75 | 14 | 7 | 0 |
module Main (main) where
import SimpleJSON2
main = print (JObject [("foo", JNumber 1), ("bar", JBool False)])
| caiorss/Functional-Programming | haskell/rwh/ch05/Main.hs | unlicense | 113 | 0 | 10 | 19 | 50 | 29 | 21 | 3 | 1 |
{-
Copyright 2020 The CodeWorld Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicab... | google/codeworld | codeworld-compiler/test/testcases/empty/source.hs | apache-2.0 | 610 | 0 | 2 | 115 | 3 | 2 | 1 | 1 | 0 |
module Main where
import Prelude hiding ((.))
import Control.Category
import Data.Lens.Common
import Data.Ord
import Lol.Build
import Lol.Champs
import Lol.Constraints
import Lol.FD
import Lol.Items
import Lol.Stats
import Lol.Stats.Types
improvesDPS :: Item -> Bool
improvesDPS i = let stats = itemStats i
in an... | MostAwesomeDude/lollerskates | Main.hs | bsd-2-clause | 1,049 | 0 | 12 | 251 | 340 | 176 | 164 | 33 | 1 |
import System.Environment (getArgs)
import System.Directory (getAppUserDataDirectory, createDirectoryIfMissing)
import Control.Applicative ((<$>))
import Data.Maybe (catMaybes)
import Data.Char (isSpace)
import Data.List (isPrefixOf, foldl', sort)
import Data.Ord (comparing)
import System.Exit (exitWith, ExitCode (Exit... | snoyberg/cabal-nirvana | cabal-nirvana.hs | bsd-2-clause | 5,789 | 16 | 16 | 1,782 | 1,794 | 903 | 891 | 153 | 8 |
module Calculus.All
-- ( module Calculus.Dipole24
( module Calculus.Dipole72
-- , module Calculus.Dipole80
, module Calculus.FlipFlop
, module Calculus.Opra
, module Calculus.Opra1
, module Calculus.Opra2
, module Calculus.Opra3
, module Calculus.Opra4
, module Calculus.Opra8
,... | spatial-reasoning/zeno | src/Calculus/All.hs | bsd-2-clause | 668 | 0 | 5 | 118 | 122 | 79 | 43 | 21 | 0 |
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
module Admin.Categories where
import Admin.Feedback
import Application
import Control.Applicative
import FormUtil
import Snap.Core
import Snap.Snaplet
import Snap.Snaplet.Heist
import qualified Data.Map as M
import qualified Data.Text.Encoding as DTE
import qual... | rjohnsondev/haskellshop | src/Admin/Categories.hs | bsd-2-clause | 2,531 | 0 | 15 | 747 | 573 | 279 | 294 | 56 | 4 |
{-# LANGUAGE PackageImports #-}
import "league-famous" Application (getApplicationDev)
import Network.Wai.Handler.Warp
(runSettings, defaultSettings, settingsPort)
import System.Directory (doesFileExist, removeFile)
import System.Exit (exitSuccess)
import Control.Concurrent (threadDelay, forkIO)
import System.Envir... | JerrySun/league-famous | devel.hs | bsd-2-clause | 859 | 2 | 13 | 192 | 240 | 124 | 116 | 27 | 2 |
module Bead.View.RequestParams where
import Control.Monad (join)
import Data.String (IsString(..))
import Bead.Domain.Entities (Username(..))
import Bead.Domain.Relationships
import Bead.View.Dictionary (Language, languageCata)
import Bead.View.Fay.HookIds
import Bead.View.TemplateAndComponentNames
-- Request Paramet... | andorp/bead | src/Bead/View/RequestParams.hs | bsd-3-clause | 3,896 | 0 | 8 | 544 | 938 | 487 | 451 | 73 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-- | This module provides a large suite of utilities that resemble Unix
-- utilities.
--
-- Many of these commands are just existing Haskell commands renamed to match
-- their Unix cou... | bitemyapp/Haskell-Turtle-Library | src/Turtle/Prelude.hs | bsd-3-clause | 32,133 | 0 | 26 | 8,415 | 7,609 | 3,980 | 3,629 | 578 | 4 |
{-# LANGUAGE TemplateHaskell, GeneralizedNewtypeDeriving, DeriveDataTypeable,
TypeFamilies, MultiParamTypeClasses
#-}
module Happstack.Auth.Internal.Data.User where
import Data.Data
import Data.SafeCopy
import Data.IxSet
import Happstack.Auth.Internal.Data.SaltedHash
import Happstack.Auth.... | mcmaniac/happstack-auth | src/Happstack/Auth/Internal/Data/User.hs | bsd-3-clause | 641 | 0 | 8 | 120 | 141 | 85 | 56 | 16 | 0 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.EXT.TextureCompressionRGTC
-- Copyright : (c) Sven Panne 2015
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : p... | phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/EXT/TextureCompressionRGTC.hs | bsd-3-clause | 817 | 0 | 4 | 87 | 46 | 37 | 9 | 6 | 0 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LambdaCas... | rrnewton/stack | src/Stack/Setup.hs | bsd-3-clause | 58,093 | 0 | 31 | 19,695 | 13,075 | 6,477 | 6,598 | 1,133 | 13 |
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Install
-- Copyright : (c) 2005 David Himmelstrup
-- 2007 Bjorn Bringert
-- 2007-2010 Duncan Coutts
-- License : BSD-like
--
-- Mai... | plumlife/cabal | cabal-install/Distribution/Client/Install.hs | bsd-3-clause | 65,435 | 0 | 31 | 18,427 | 12,327 | 6,403 | 5,924 | 1,139 | 12 |
-------------------------------------------------------------------------------
-- | This module lets you get API docs for free. It lets you generate
-- an 'API' from the type that represents your API using 'docs':
--
-- @docs :: 'HasDocs' api => 'Proxy' api -> 'API'@
--
-- Alternatively, if you wish to add one or more... | zerobuzz/servant | servant-docs/src/Servant/Docs.hs | bsd-3-clause | 1,890 | 0 | 5 | 328 | 273 | 195 | 78 | 26 | 0 |
-- C->Haskell Compiler: Marshalling library
--
-- Copyright (c) [1999...2005] Manuel M T Chakravarty
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- 1. Redistributions of source code must retain the above... | reinerp/CoreFoundation | C2HS.hs | bsd-3-clause | 8,868 | 0 | 10 | 1,698 | 1,218 | 700 | 518 | 74 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Trombone.Pipeline
( module Pipe
, Connection(..)
, Filter(..)
, Message(..)
, Pipeline(..)
, Predicate(..)
, Processor(..)
, ProcessorId(..)
, TransType(..)
, Transformer(..)
, broadcast
, buildJ... | johanneshilden/trombone | Trombone/Pipeline.hs | bsd-3-clause | 5,820 | 0 | 11 | 1,885 | 1,649 | 886 | 763 | 139 | 11 |
module Database.PostgreSQL.PQTypes.ToSQL (
ParamAllocator(..)
, ToSQL(..)
, putAsPtr
) where
import Data.ByteString.Unsafe
import Data.Int
import Data.Kind (Type)
import Data.Text.Encoding
import Data.Time
import Data.Word
import Foreign.C
import Foreign.Marshal.Alloc
import Foreign.Ptr
import Foreign.Storab... | scrive/hpqtypes | src/Database/PostgreSQL/PQTypes/ToSQL.hs | bsd-3-clause | 6,526 | 0 | 14 | 1,363 | 1,625 | 892 | 733 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TemplateHaskell #-}
module Test.Delorean.Duration where
import Delorean.Duration
import P
import System.IO
import Test.Delorean.Arbitrary ()
import Test.Delorean.ParserCheck
import Test.QuickCheck
prop_consi... | ambiata/delorean | test/Test/Delorean/Duration.hs | bsd-3-clause | 780 | 0 | 13 | 198 | 229 | 125 | 104 | 24 | 1 |
import Data.Monoid
import Control.Monad
import HVG
import HVG.Type
import HVG.Context2D
import HVG.ContextState
main = drawCanvas "canvas" (Size 1000 800) $ do
box 450 10 100 590 1 $ pure $ do
textTop "world"
text "aaa"
name "a"
ellipse 10 50 80 40 $ do
text "---"
link "a" "b" "red"
g... | CindyLinz/Haskell-HVG | demo.hs | bsd-3-clause | 6,116 | 1 | 21 | 1,870 | 2,741 | 1,318 | 1,423 | 186 | 4 |
module Main
( main -- :: IO ()
) where
import Prelude hiding (words)
import qualified Data.ByteString as S
import qualified Codec.Compression.Snappy as Snappy
import qualified Codec.Compression.QuickLZ as QuickLZ
import qualified Codec.Compression.LZ4 as LZ4
import Criterion.Main
import C... | mwotton/lz4hs | bench/Bench1.hs | bsd-3-clause | 878 | 0 | 13 | 211 | 241 | 131 | 110 | 22 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE KindSignatures #-}
#if __GLASGOW_HASKELL__ >= 706
{-# LANGUAGE PolyKinds #-}
#endif
#if __... | ddssff/lens | src/Control/Lens/Type.hs | bsd-3-clause | 23,271 | 0 | 10 | 4,175 | 2,684 | 1,753 | 931 | 100 | 0 |
main :: IO ()
main = interact $ const "Hello, world!\n"
| YoshikuniJujo/funpaala | samples/25_nml/helloI.hs | bsd-3-clause | 56 | 0 | 6 | 11 | 23 | 11 | 12 | 2 | 1 |
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeFamilies #-}
module AST.V0_16 (module AST.V0_16, module ElmFormat.AST.Shared) where
import Data.Bifunctor
import Data.Coa... | avh4/elm-format | elm-format-lib/src/AST/V0_16.hs | bsd-3-clause | 25,397 | 0 | 20 | 7,045 | 7,308 | 3,710 | 3,598 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RecordWildCards #-}
module Network.Sock.Handler
( sock
, sockWS
) where
------------------------------------------------------------------------------
import System.Random (randomRIO)
---------------------------------------... | Palmik/wai-sockjs | src/Network/Sock/Handler.hs | bsd-3-clause | 9,566 | 0 | 17 | 2,406 | 1,636 | 888 | 748 | 120 | 9 |
-- Copyright (c) 2014-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is distributed under the terms of a BSD license,
-- found in the LICENSE file.
{-# LANGUAGE CPP #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE RecordWildCards #-}
-- | Psuedo-parallel operations. Most users should import "Ha... | simonmar/Haxl | Haxl/Core/Parallel.hs | bsd-3-clause | 2,905 | 0 | 24 | 699 | 566 | 285 | 281 | 40 | 7 |
{-# LANGUAGE ViewPatterns #-}
module Transform.Extract.Glyph (
extractor
) where
import Hoops.Match
import Hoops.SyntaxToken
import Transform.Extract.Common
import Transform.Extract.Util
extractor :: BlockKind -> ExtractFunc
extractor kind = case kind of
"HC_Define_Glyph" -> extract
_ -> const $ return... | thomaseding/cgs | src/Transform/Extract/Glyph.hs | bsd-3-clause | 1,240 | 0 | 18 | 351 | 368 | 180 | 188 | 32 | 4 |
module Data.Blockchain.Crypto.Hash
( Hash
, ToHash(..)
, hashToHex
, fromByteString
, unsafeFromByteString
) where
import qualified Crypto.Hash as Crypto
import qualified Data.Aeson as Aeson
import qualified Data.ByteArray.Encoding as Byte
import qualified Data.By... | TGOlson/blockchain | lib/Data/Blockchain/Crypto/Hash.hs | bsd-3-clause | 2,438 | 0 | 11 | 491 | 616 | 342 | 274 | -1 | -1 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -Wno-unused-top-binds #-}
module GeneratedColumnTestSQL (specsWith) where
import Database.Persist.TH
import Init
share [mkPersist sqlSettings, mkMigrate "migrate1"] [persistLowerCase|
GenTest sql=gen_test
fieldOne Text Maybe
fi... | paul-rouse/persistent | persistent-test/src/GeneratedColumnTestSQL.hs | mit | 1,806 | 0 | 16 | 417 | 364 | 173 | 191 | -1 | -1 |
--
--
--
------------------
-- Exercise 11.22.
------------------
--
--
--
module E'11'22 where
-- mapFuns :: [a -> b] -> a -> [b]
-- mapFuns functions argument
--
-- = map (\function -> function argument) functions
-- My first step:
mapFuns'1 :: [a -> b] -> a -> [b]
mapFuns'1 functions
= \argument -> ( ($ ... | pascal-knodel/haskell-craft | _/links/E'11'22.hs | mit | 1,205 | 0 | 9 | 282 | 367 | 223 | 144 | 21 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
import Language.Haskell.TH (runIO)
import Control.Monad (forM_)
import Text.Printf (printf)
import System.Environment (getArgs)
import qua... | apunktbau/co4 | test/CO4/Example/Sudoku.hs | gpl-3.0 | 1,191 | 0 | 15 | 266 | 375 | 193 | 182 | 32 | 2 |
--------------------------------------------------------------------
-- |
-- Module : Flickr.Groups.Pools
-- Description : flickr.groups.pools - manage photo group pooling.
-- Copyright : (c) Sigbjorn Finne, 2008
-- License : BSD3
--
-- Maintainer : Sigbjorn Finne <sof@forkIO.com>
-- Stability : provision... | BeautifulDestinations/hs-flickr | Flickr/Groups/Pools.hs | bsd-3-clause | 2,023 | 12 | 11 | 464 | 391 | 217 | 174 | 34 | 1 |
-- |
-- Module : Foundation.System.Entropy.Unix
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : Good
--
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE ForeignFunctionInterface #-}
module Foundation.System.Entropy.Unix
( EntropyCt... | vincenthz/hs-foundation | foundation/Foundation/System/Entropy/Unix.hs | bsd-3-clause | 2,510 | 0 | 14 | 561 | 624 | 332 | 292 | 59 | 3 |
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE FlexibleInstances #-}
module Main where
import Prelude hiding (lookup)
import Char (ord)
import qualified Data.Map as Map
import C... | dreixel/instant-generics | examples/GMapAssoc.hs | bsd-3-clause | 3,277 | 0 | 12 | 1,012 | 1,399 | 705 | 694 | 68 | 1 |
--------------------------------------------------------------------
-- |
-- Module : Flickr.People
-- Description : flickr.people - access a user's attributes etc.
-- Copyright : (c) Sigbjorn Finne, 2008
-- License : BSD3
--
-- Maintainer : Sigbjorn Finne <sof@forkIO.com>
-- Stability : provisional
-- Po... | sof/flickr | Flickr/People.hs | bsd-3-clause | 2,495 | 4 | 14 | 508 | 527 | 282 | 245 | 45 | 2 |
{-# LANGUAGE PartialTypeSignatures #-}
module T10403 where
data I a = I a
instance Functor I where
fmap f (I a) = I (f a)
newtype B t a = B a
instance Functor (B t) where
fmap f (B a) = B (f a)
newtype H f = H (f ())
app :: H (B t)
app = h (H . I) (B ())
h :: _ => _
--h :: Functor m => (a -> b) -> m a -> H... | fmthoma/ghc | testsuite/tests/partial-sigs/should_compile/T10403.hs | bsd-3-clause | 364 | 0 | 11 | 109 | 203 | 107 | 96 | 13 | 1 |
{- |
Copyright : Copyright (C) 2006-2018 Bjorn Buckwalter
License : BSD3
Maintainer : bjorn@buckwalter.se
Stability : Stable
Defines convenience functions for inspecting and manipulating quantities with 'RealFloat'
floating-point representations.
The dimensionally-typed versions of functions fro... | bjornbm/dimensional-dk | src/Numeric/Units/Dimensional/Float.hs | bsd-3-clause | 6,285 | 0 | 8 | 1,117 | 1,081 | 590 | 491 | 62 | 1 |
{-# LANGUAGE BangPatterns #-}
module PermutationsCombinations where
-- I was reading http://home.pipeline.com/~hbaker1/ThermoGC.html at the time I wrote this and trying to convince myself
-- that negative temperature is a thing by demonstrating that (adiff 1e-4 (\x -> bCombineEnergies 4000 [x]) y) is
-- negative for ... | RichardBarrell/snippets | PermutationsCombinations.hs | isc | 2,701 | 0 | 11 | 544 | 692 | 354 | 338 | 34 | 3 |
{-
HAAP: Haskell Automated Assessment Platform
This module provides the @Rank@ plugin to generate rankings as HTML webpages.
-}
{-# LANGUAGE FlexibleContexts, OverloadedStrings, GeneralizedNewtypeDeriving #-}
module HAAP.Web.Test.Rank where
import HAAP.Core
import HAAP.Pretty
import HAAP.Test.Spec
import HAAP.Test.... | hpacheco/HAAP | src/HAAP/Web/Test/Rank.hs | mit | 3,587 | 0 | 25 | 928 | 1,103 | 562 | 541 | 60 | 7 |
------------------------------------------------------------
---- |
---- Module: School
---- Description: School records accounting
---- Copyright: (c) 2015 Alex Dzyoba <alex.dzyoba@gmail.com>
---- License: MIT
------------------------------------------------------------
module School (School, empty, add, grade, sorte... | dzeban/haskell-exercism | grade-school/School.hs | mit | 1,524 | 0 | 9 | 284 | 407 | 236 | 171 | 22 | 1 |
lend amount balance = let reserve = 100
newBalance = balance - amount
in if balance < reserve
then Nothing
else Just newBalance
lend2 amount balance if amount < reserve
then Just newbalance
... | akampjes/learning-realworldhaskell | ch03/Lending.hs | mit | 414 | 1 | 9 | 205 | 90 | 44 | 46 | -1 | -1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
-------------------------------------------
-- |
-- Module : Web.Stripe.Recipient
-- Copyright : (c) David Johnson, 2014
-- Maintainer : djohnson.m@gmail.co... | dmjio/stripe | stripe-core/src/Web/Stripe/Recipient.hs | mit | 7,542 | 0 | 9 | 2,278 | 1,241 | 774 | 467 | -1 | -1 |
{-# htermination delFromFM :: FiniteMap Int b -> Int -> FiniteMap Int b #-}
import FiniteMap
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/FiniteMap_delFromFM_5.hs | mit | 95 | 0 | 3 | 18 | 5 | 3 | 2 | 1 | 0 |
cuenta_signo:: [Int] -> (Int, Int)
cuenta_signo l
| l == [] = (0,0)
| otherwise = (length [x | x<-l, x>0], length [x | x<-l, x<0] )
| betoesquivel/haskell | act16.hs | mit | 136 | 0 | 10 | 31 | 104 | 54 | 50 | 4 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Metawave.Parsers.FLAC where
import Data.Bits
import qualified Data.Map.Strict as M
import qualified Data.ByteString.Char8 as C
import qualified Data.ByteString.Lazy.Char8 as CL
import Data.Attoparsec.Bytestring.Char8
import Metawave.Pars... | TravisWhitaker/Metawave | src/Metawave/Parsers/FLAC.hs | mit | 2,711 | 1 | 10 | 996 | 568 | 355 | 213 | -1 | -1 |
import Data.List
solve = foldl1' lcm [1..20]
| jwtouron/haskell-play | ProjectEuler/Problem5.hs | mit | 46 | 1 | 6 | 8 | 24 | 11 | 13 | 2 | 1 |
module Hsbin.Routine
( align
, cleanBin
, cleanHash
, cleanTmp
, doesBinExist
, compile
, execute
, msg
, msgLn
) where
import Control.Applicative ((<$>))
import Control.Exception (finally)
import Control.Monad (filterM, unless)
import System.Directory (copyFile, createDirectory... | iquiw/hsbin | src/Hsbin/Routine.hs | mit | 3,411 | 0 | 14 | 985 | 1,065 | 542 | 523 | 84 | 3 |
module FizzBuzz2 where
import Control.Monad
import Control.Monad.Trans.State
import qualified Data.DList as DL
fizzBuzz :: Integer -> String
fizzBuzz n
| n `mod` 15 == 0 = "FizzBuzz"
| n `mod` 5 == 0 = "Fizz"
| n `mod` 3 == 0 = "Buzz"
| otherwise = show n
... | NickAger/LearningHaskell | HaskellProgrammingFromFirstPrinciples/Chapter23.hsproj/FizzBuzz2.hs | mit | 766 | 0 | 11 | 216 | 265 | 137 | 128 | 22 | 1 |
module NgLint.Output.Pretty where
import Data.List
import NgLint.Messages
import NgLint.Output.Common
import System.Console.ANSI
import Text.Parsec.Pos
printMessage :: LintMessage -> IO ()
printMessage (LintMessage pos code) = do
setSGR [SetColor Foreground Vivid Yellow]
putStr $ replicate (sourceColumn pos -... | federicobond/nglint | src/NgLint/Output/Pretty.hs | mit | 1,010 | 0 | 12 | 209 | 357 | 173 | 184 | 27 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.