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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
-- File created: 2009-07-21 13:19:42
module Main (main, runOne) where
import Prelude hiding (catch)
import Control.Exception (catch)
import Data.IORef (newIORef, readIORef)
import System.Environment (getArgs)
import Haschoo.Running (runRepl, runFile, run, RunError)
import Haschoo.Stdlib (toplevelContext)
... | Deewiant/haschoo | Haschoo/Main.hs | bsd-3-clause | 821 | 0 | 18 | 238 | 256 | 139 | 117 | 23 | 2 |
{-
(c) The University of Glasgow 2006
(c) The University of Glasgow, 1997-2006
Buffers for scanning string input stored in external arrays.
-}
{-# LANGUAGE BangPatterns, CPP, MagicHash, UnboxedTuples #-}
{-# OPTIONS_GHC -O2 #-}
-- We always optimise this, otherwise performance of a non-optimised
-- compiler is sever... | ezyang/ghc | compiler/utils/StringBuffer.hs | bsd-3-clause | 12,130 | 0 | 21 | 3,116 | 2,596 | 1,348 | 1,248 | 193 | 4 |
module Network.EasyBitcoin.Internal.CurveConstants
where
-- SECP256k1 curve parameters
pairG :: (Integer, Integer)
pairG = ( 0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798
, 0X483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8
)
curveP :: Integer
cur... | vwwv/easy-bitcoin | Network/EasyBitcoin/Internal/CurveConstants.hs | bsd-3-clause | 573 | 0 | 5 | 98 | 71 | 45 | 26 | 12 | 1 |
{-# LANGUAGE EmptyDataDecls #-}
module TypeLevel.Number.Nat.Types ( I
, O
, Z
) where
-- | One bit.
data I n
-- | Zero bit.
data O n
-- | Bit stream terminator.
data Z
| Shimuuar/type-level-numbers | TypeLevel/Number/Nat/Types.hs | bsd-3-clause | 271 | 0 | 4 | 138 | 34 | 25 | 9 | -1 | -1 |
factors :: Int -> [Int]
factors n = [x | x <- [1..n], mod n x == 0]
prime :: Int -> Bool
prime x = factors x == [1, x]
main :: IO ()
main = print . sum $ take 1000 [x | x <- 2 : [3, 5..], prime x]
| nikai3d/ce-challenges | easy/sum_prime.hs | bsd-3-clause | 201 | 0 | 11 | 57 | 136 | 71 | 65 | 6 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Hakyll.Web.Urls.Relativize.Tests
( tests
) where
import Test.Framework
import Test.HUnit hiding (Test)
import Hakyll.Web.Urls.Relativize
import TestSuite.Util
tests :: [Test]
tests = fromAssertions "relativizeUrls"
[ "<a href=\"../foo\">bar</a>" @=?
relat... | sol/hakyll | tests/Hakyll/Web/Urls/Relativize/Tests.hs | bsd-3-clause | 935 | 0 | 8 | 156 | 121 | 69 | 52 | 20 | 1 |
{-# LANGUAGE GADTs, DataKinds, KindSignatures #-}
import Data.Map.Strict (Map)
data Protocol = Protocol
{ pEndpoints :: [Endpoint]
, pVersion :: String
}
data Endpoint = Endpoint
{ eUrl :: String
, eTransmissions :: Map Method Transmission
}
data Method = GET | POST | OPTIONS | HE... | MaximilianAlgehed/Haspec | src/Lang/Lang.hs | bsd-3-clause | 2,310 | 0 | 9 | 663 | 379 | 226 | 153 | 48 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
#ifdef TRUSTWORTHY
{-# LANGUAGE Trustworthy #-}
#endif
-------------------------------------------------------------------------------
-- |
-- Module : Data.Vector.Lens
-- Copyright : (C) 2... | np/lens | src/Data/Vector/Lens.hs | bsd-3-clause | 4,796 | 0 | 14 | 940 | 953 | 544 | 409 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Block
( blockSpecs
) where
import Test.Hspec
import Data.Text (Text)
import Data.Conduit
import qualified Data.Conduit.List as CL
import Text.Markdown (def, MarkdownSettings(..))
import Text.Markdown.Block
import Data.Functor.Identity (runIdentity)
checkWith :: Markdow... | thefalconfeat/markdown | test/Block.hs | bsd-3-clause | 3,651 | 0 | 18 | 1,420 | 868 | 415 | 453 | 87 | 1 |
module Control.Monad.Trans.Except.Extended
( module Control.Monad.Trans.Except
, justToLeft
, MatcherT, runMatcherT
) where
import Control.Monad ((<=<))
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Except
import Control.Monad.Trans.Maybe (MaybeT(..))
import Data.Foldable (traverse... | lamdu/lamdu | src/Control/Monad/Trans/Except/Extended.hs | gpl-3.0 | 689 | 0 | 8 | 120 | 210 | 121 | 89 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-codedeploy/gen/Network/AWS/CodeDeploy/ListOnPremisesInstances.hs | mpl-2.0 | 5,953 | 0 | 12 | 1,143 | 687 | 415 | 272 | 76 | 1 |
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Main(main) where
import DB.Admin (resetDatabase)
import DB.Authentication (changePasswordForUser, createUser,
removeUser)
import Do... | virtualsaleslab/simplestore | src/Main.hs | unlicense | 1,916 | 0 | 14 | 625 | 440 | 226 | 214 | 41 | 3 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-missing-fields #-}
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-------------------... | chjp2046/fbthrift | thrift/compiler/test/fixtures/service-fuzzer/gen-hs/TestService_Iface.hs | apache-2.0 | 1,942 | 0 | 19 | 370 | 438 | 291 | 147 | 38 | 0 |
{-# Language RankNTypes #-}
{-# Language TypeOperators #-}
{-# Language BangPatterns #-}
module IO where
-- import Data.Array
import Prelude hiding (traverse)
import Data.Vector.Unboxed hiding (force)
import qualified Data.Vector.Unboxed as V
import Data.Array.Repa
import Types
import System.CPUTime
import Data.Array... | robstewart57/small-image-processing-dsl-implementations | haskell/small-image-processing-dsl/src/IO.hs | bsd-3-clause | 4,421 | 0 | 26 | 998 | 1,516 | 767 | 749 | 109 | 2 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
-- | Clean a project.
module Stack.Clean
(clean
,CleanOpts(..)
,StackCleanException(..)
) where
import Control.Exception (Exception)
import Control.Monad.Catch (throwM)
import ... | mrkkrp/stack | src/Stack/Clean.hs | bsd-3-clause | 2,851 | 0 | 18 | 736 | 600 | 330 | 270 | 61 | 4 |
{-
(c) Rahul Muttineni 2016-2017
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
Loading interface files
-}
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module ETA.Iface.LoadIface (
-- Importing one thing
tcLookupImported_maybe, importDecl,
... | pparkkin/eta | compiler/ETA/Iface/LoadIface.hs | bsd-3-clause | 47,743 | 377 | 20 | 15,133 | 7,307 | 3,915 | 3,392 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
import Text.XML.Expat.Tree
import Control.Monad
import Data.Text (Text)
import qualified Data.Text as T
import Data.ByteString (ByteString)
import qualified Data.ByteString.Lazy as L
import Data.Maybe
main :: IO ()
main = do
bs <- L.readFile "ROADS.xml"
let Element _ _ chs =... | sol/hexpat | test/test2.hs | bsd-3-clause | 570 | 1 | 19 | 140 | 191 | 98 | 93 | 17 | 2 |
module Faktor.Prim where
-- $Id$
smallish :: [ Integer ]
smallish = primes 10
mediumish :: [ Integer ]
mediumish = primes 100
-- | list of prime numbers up to q*q
primes :: Integral b
=> b -> [ b ]
primes q = 2 : sieve [ 3, 5 .. q * q - 1 ] where
sieve (x : ys) =
x : if x > q
then ys
... | florianpilz/autotool | src/Faktor/Prim.hs | gpl-2.0 | 991 | 10 | 13 | 330 | 458 | 246 | 212 | 34 | 3 |
{-# LANGUAGE NoRebindableSyntax #-}
-- | This file contains the template haskell code for deriving SubHask class instances from Base instances.
-- All of the standard instances are created in "SubHask.Compatibility.Base".
-- This module is exported so that you can easily make instances for your own types without any e... | abailly/subhask | src/SubHask/TemplateHaskell/Base.hs | bsd-3-clause | 8,576 | 0 | 26 | 2,910 | 2,233 | 1,149 | 1,084 | -1 | -1 |
{-# LANGUAGE BangPatterns, CPP, RecordWildCards, GADTs #-}
module CmmLayoutStack (
cmmLayoutStack, setInfoTableStackMap
) where
import GhcPrelude hiding ((<*>))
import StgCmmUtils ( callerSaveVolatileRegs ) -- XXX layering violation
import StgCmmForeign ( saveThreadState, loadThreadState ) -- XXX lay... | ezyang/ghc | compiler/cmm/CmmLayoutStack.hs | bsd-3-clause | 47,277 | 1 | 25 | 13,763 | 7,858 | 4,190 | 3,668 | 562 | 6 |
-- |
-- Module : Network.TLS.X509
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : unknown
--
-- X509 helpers
--
module Network.TLS.X509
( CertificateChain(..)
, Certificate(..)
, SignedCertificate
, getCertificate
, ... | beni55/hs-tls | core/Network/TLS/X509.hs | bsd-3-clause | 1,995 | 0 | 9 | 396 | 336 | 195 | 141 | 41 | 1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Ord
-- Copyright : (c) The University of Glasgow 2005
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libr... | frantisekfarka/ghc-dsi | libraries/base/Data/Ord.hs | bsd-3-clause | 1,568 | 0 | 8 | 293 | 215 | 135 | 80 | 15 | 1 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="sl-SI">
<title>Passive Scan Rules | ZAP Extension</title>
<maps>
<homeID>top</homeID>
... | ccgreen13/zap-extensions | src/org/zaproxy/zap/extension/pscanrules/resources/help_sl_SI/helpset_sl_SI.hs | apache-2.0 | 980 | 80 | 66 | 161 | 417 | 211 | 206 | -1 | -1 |
{-# LANGUAGE RankNTypes, TypeInType #-}
module T11640 where
import Data.Kind
data HEq :: forall k1. k1 -> forall k2. k2 -> Type where
| ezyang/ghc | testsuite/tests/polykinds/T11640.hs | bsd-3-clause | 137 | 0 | 8 | 26 | 35 | 22 | 13 | -1 | -1 |
{-
(c) The AQUA Project, Glasgow University, 1993-1998
\section[SimplMonad]{The simplifier Monad}
-}
{-# LANGUAGE CPP #-}
module SimplEnv (
InId, InBind, InExpr, InAlt, InArg, InType, InBndr, InVar,
OutId, OutTyVar, OutBind, OutExpr, OutAlt, OutArg, OutType, OutBndr, OutVar,
InCoercion, OutCo... | urbanslug/ghc | compiler/simplCore/SimplEnv.hs | bsd-3-clause | 27,858 | 0 | 15 | 7,517 | 4,421 | 2,447 | 1,974 | 303 | 4 |
{-# LANGUAGE DeriveDataTypeable #-}
module UnitTests.Options ( OptionShowSolverLog(..)
, OptionMtimeChangeDelay(..)
, extraOptions )
where
import Data.Proxy
import Data.Typeable
import Test.Tasty.Options
{------------------------------------------------------... | mydaum/cabal | cabal-install/tests/UnitTests/Options.hs | bsd-3-clause | 1,399 | 0 | 8 | 267 | 217 | 122 | 95 | 27 | 1 |
{-# LANGUAGE TypeFamilies, LiberalTypeSynonyms #-}
-- ^ crucial for exercising the code paths to be
-- tested here
module ShouldCompile where
type family Element c :: *
f :: x -> Element x
f x = undefined
| forked-upstream-packages-for-ghcjs/ghc | testsuite/tests/indexed-types/should_compile/Simple19.hs | bsd-3-clause | 264 | 0 | 6 | 96 | 36 | 22 | 14 | 5 | 1 |
module Annfail12 where
-- Testing errors hidden in annotations
{-# ANN f (error "You were meant to see this error!" :: Int) #-}
f x = x | wxwxwwxxx/ghc | testsuite/tests/annotations/should_fail/annfail12.hs | bsd-3-clause | 137 | 0 | 5 | 28 | 14 | 9 | 5 | 3 | 1 |
{-# LANGUAGE FlexibleInstances #-}
module Text.Pin ( Pin(..), tag, empty, simple, isSelf, fromName ) where
import Control.Applicative hiding ( many, (<|>), empty, optional )
import Control.Name
import Data.Either
import Data.List hiding ( find )
import Data.Set ( Set, fromList )
import Data.String.Utils ( strip )
impor... | Soares/tagwiki | src/Text/Pin.hs | mit | 2,306 | 0 | 13 | 650 | 656 | 358 | 298 | 53 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE BangPatterns #-}
module Data.Frame.Types (
Val(..),
Type(..),
subsumes,
subsume,
like,
typeVal,
lub
) where
import Data.Data
-- import Data.DateTime
import Data.Text (Text, pack)
import Data.Frame.Internal (Default(..))
import Control.DeepSeq (NFData(..)... | houshuang/frame | src/Data/Frame/Types.hs | mit | 3,994 | 0 | 14 | 1,102 | 1,729 | 876 | 853 | 112 | 12 |
module TypeClient where
-- Can't refer to modules named Type
-- Should rename the module
import Type
g :: Int
g = Type.id 3
| antalsz/hs-to-coq | examples/base-tests/TypeClient.hs | mit | 126 | 0 | 6 | 26 | 24 | 15 | 9 | 4 | 1 |
{-# LANGUAGE DeriveGeneric #-}
module SimpleDecree (
IntegerOperation(..)
)
where
-- local imports
import Control.Consensus.Paxos
-- external imports
import qualified Data.Serialize as C
import GHC.Generics
--------------------------------------------------------------------------------
---------------------... | hargettp/paxos | tests/SimpleDecree.hs | mit | 654 | 0 | 6 | 85 | 102 | 62 | 40 | 16 | 0 |
module Type(
Type(..)
)where
import Definition
data Type = Polymorphism | TypeAlias Identifier Identifier | TypeArray Type Int | Type Identifier Int deriving (Eq)
instance Show Type where
show Polymorphism = "?Type?"
show (Type n i) = n ++ replicate i '*'
| sqd/haskell-C89-interpreter | Type.hs | mit | 267 | 0 | 8 | 53 | 92 | 51 | 41 | 7 | 0 |
-----------------------------------------------------------
-- |
-- module: MXNet.Core.Base.Internal.TH.Symbol
-- copyright: (c) 2016 Tao He
-- license: MIT
-- maintainer: sighingnow@gmail.com
--
-- Functions about Symbol that generated by temp... | sighingnow/mxnet-haskell | mxnet/src/MXNet/Core/Base/Internal/TH/Symbol.hs | mit | 1,228 | 0 | 6 | 224 | 149 | 107 | 42 | 21 | 0 |
module Y2017.M02.D20.Solution where
import Control.Arrow ((&&&))
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Monoid
import Data.Ratio
-- below imports available via 1HaskellADay git repository
import Control.Logic.Frege (adjoin)
import qualified Data.Bag as Bag
import Data.Percentage
import R... | geophf/1HaskellADay | exercises/HAD/Y2017/M02/D20/Solution.hs | mit | 2,231 | 0 | 12 | 367 | 190 | 114 | 76 | 17 | 1 |
{-# LANGUAGE FlexibleContexts #-}
module Rx.Notification where
import Rx.Observable.Types
getValue :: Notification v -> Maybe v
getValue (OnNext v) = Just v
getValue _ = Nothing
hasThrowable :: Notification v -> Bool
hasThrowable (OnError _) = True
hasThrowable _ = False
accept :: Notification v -> Observer v -> IO... | roman/Haskell-Reactive-Extensions | rx-core/src/Rx/Notification.hs | mit | 394 | 0 | 8 | 64 | 130 | 65 | 65 | 12 | 1 |
{-# LANGUAGE RecordWildCards #-}
import Data.Foldable (for_)
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import Base (Error(..), rebase)
main :: IO ()
main = hspecWith defaultConfig {configFastFail = True} specs
specs :: Spec
specs ... | exercism/xhaskell | exercises/practice/all-your-base/test/Tests.hs | mit | 5,933 | 0 | 12 | 2,800 | 1,295 | 811 | 484 | 123 | 1 |
import Test.HUnit
import Q33
test1 = TestCase (assertEqual "tryCoPrime 0 15 should be Right Zero is not supported." (Right "Zero is not supported") (tryCoPrime 0 15))
test2 = TestCase (assertEqual "tryCoPrime 15 0 should be Right Zero is not supported." (Right "Zero is not supported") (tryCoPrime 15 0 ))
test3 = Te... | cshung/MiscLab | Haskell99/q33.test.hs | mit | 644 | 0 | 9 | 165 | 161 | 83 | 78 | 7 | 1 |
module Ch15.MadLibs where
import Data.Monoid
type Verb = String
type Adjective = String
type Adverb = String
type Noun = String
type Exclamation = String
madlib :: Exclamation -> Adverb -> Noun -> Adjective -> String
madlib e adv noun adj =
e <> "! he said " <>
adv <> " as he jumped into his car " <>
noun <> "... | andrewMacmurray/haskell-book-solutions | src/ch15/MadLibs.hs | mit | 606 | 0 | 11 | 157 | 166 | 94 | 72 | 20 | 1 |
module Slack where
import ClassyPrelude
import Control.Monad (mfilter)
import Control.Monad.Except (ExceptT(ExceptT))
import Control.Lens (Getter, Prism', prism', view, to)
import Control.Lens.TH (makeLenses, makePrisms)
import Data.Aeson ((.=), Value(Number,... | Dridus/alexandria | server/Slack.hs | mit | 37,892 | 0 | 39 | 8,899 | 10,221 | 5,211 | 5,010 | -1 | -1 |
{-# LANGUAGE TypeApplications, ScopedTypeVariables, LambdaCase,
ViewPatterns, RecordWildCards,
AllowAmbiguousTypes, GADTs, TypeFamilies, KindSignatures, DataKinds,
TemplateHaskell #-}
module PrintModGuts (
-- *Pieces of 'ModGuts' for printing
ModGutsInfo(..), fullInfo, summar... | antalsz/hs-to-coq | structural-isomorphism-plugin/src/PrintModGuts.hs | mit | 15,062 | 0 | 17 | 4,305 | 3,336 | 1,786 | 1,550 | 338 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Batch.Parser
(
parse
, command
, Script
, Command (..)
, Expression (..)
) where
import Batch.Definitions
import Batch.Lexer
import Control.Applicative
import Con... | danstiner/transpiler | src/Batch/Parser.hs | mit | 4,947 | 0 | 13 | 1,299 | 1,693 | 868 | 825 | 130 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appstream-imagebuilder-domainjoininfo.html
module Stratosphere.ResourceProperties.AppStreamImageBuilderDomain... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/AppStreamImageBuilderDomainJoinInfo.hs | mit | 2,522 | 0 | 12 | 205 | 264 | 151 | 113 | 27 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisanalyticsv2-applicationreferencedatasource-jsonmappingparameters.html
module Stratosphere.ResourceProp... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/KinesisAnalyticsV2ApplicationReferenceDataSourceJSONMappingParameters.hs | mit | 2,477 | 0 | 13 | 168 | 178 | 104 | 74 | 23 | 1 |
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-}
-- | Interface für externe Korrektoren
module Inter.Action where
import Control.Types
import Autolib.ToDoc
import Autolib.Reader
import Data.Typeable
import Network.XmlRpc.THDeriveXmlRpcType
import Network.XmlRpc.Internals
-- | die Nummer dessen, der sich ein... | Erdwolf/autotool-bonn | src/Inter/Action.hs | gpl-2.0 | 1,965 | 24 | 12 | 515 | 557 | 321 | 236 | 51 | 0 |
import System.Environment (getArgs)
import Control.Exception (SomeException, catch)
handler :: SomeException -> IO ()
handler e = do
putStrLn $ "Cannot locate file " ++ show e
handleFile :: String -> IO ()
handleFile path = do
text <- readFile path
putStrLn text
handledFile path = catch (handleFile path) handler... | nkartashov/haskell | hw07/cat.hs | gpl-2.0 | 427 | 0 | 10 | 85 | 168 | 81 | 87 | 16 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Parse where
import Text.Parsec
import Text.Parsec.Text
import qualified Data.Text as T
import Types
encode :: T.Text -> [Chunk]
encode txt =
case (parse entire "" txt) of
Left err -> []
Right result -> result
entire :: Parser Program
entire = manyTill chunk eof... | tcrs/lit | src/Parse.hs | gpl-2.0 | 2,019 | 0 | 12 | 485 | 828 | 409 | 419 | 65 | 2 |
module Match.DrawPitch(drawPitch)
where
import Graphics.Rendering.OpenGL as OpenGL
import Drawing
import FVector
drawRect :: Rectangle -> Float -> IO ()
drawRect r d' = preservingMatrix $ do
let ((a, b), (c, d)) = rectToNum r
e = realToFrac d'
loadIdentity
translate $ Vector3 a b e
rende... | anttisalonen/freekick2 | src/Match/DrawPitch.hs | gpl-3.0 | 3,076 | 0 | 15 | 753 | 1,485 | 795 | 690 | 61 | 2 |
{-# OPTIONS -fallow-overlapping-instances -fglasgow-exts -fallow-undecidable-instances -fallow-incoherent-instances -fno-monomorphism-restriction #-}
module Set
where
-- $Id: Set.hs,v 1.25 2006-10-22 22:04:22 joe Exp $
import qualified Data.Set
type Set = Data.Set.Set
isEmptySet = Data.Set.null
emptySet = Dat... | jwaldmann/rx | src/Set.hs | gpl-3.0 | 1,284 | 0 | 10 | 225 | 458 | 252 | 206 | 31 | 1 |
-- This file is part of KSQuant2.
-- Copyright (c) 2010 - 2011, Kilian Sprotte. All rights reserved.
-- 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 Free Software Foundation, either version 3 of the License, or
-- (... | kisp/ksquant2 | DurCalc.hs | gpl-3.0 | 3,214 | 0 | 10 | 963 | 631 | 331 | 300 | 41 | 2 |
module Clock (toString, fromHourMin) where
data Clock =
Clock { hour :: Integer
, minute :: Integer
} deriving Eq
instance Show Clock where
show c = zeropad (hour c) ++ ":" ++ zeropad (minute c)
instance Num Clock where
(+) (Clock h1 m1) (Clock h2 m2) =
Clock { hour = (h1 + h2 +... | ciderpunx/exercismo | src/Clock.hs | gpl-3.0 | 1,303 | 0 | 15 | 436 | 472 | 261 | 211 | 29 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-oauth2/gen/Network/Google/Resource/OAuth2/UserInfo/Get.hs | mpl-2.0 | 2,137 | 0 | 11 | 481 | 221 | 137 | 84 | 41 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.SQLAdmin.Ty... | rueshyna/gogol | gogol-sqladmin/gen/Network/Google/SQLAdmin/Types/Product.hs | mpl-2.0 | 130,397 | 0 | 34 | 33,569 | 24,672 | 14,191 | 10,481 | 2,741 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-sqladmin/gen/Network/Google/Resource/SQL/Projects/Instances/StartExternalSync.hs | mpl-2.0 | 6,814 | 0 | 21 | 1,609 | 945 | 547 | 398 | 147 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/List.hs | mpl-2.0 | 5,130 | 0 | 17 | 1,225 | 809 | 470 | 339 | 112 | 1 |
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE PatternSynonyms #-}
module Dyno.DirectCollocation.Integrate
( withIntegrator
... | ghorn/dynobud | dynobud/src/Dyno/DirectCollocation/Integrate.hs | lgpl-3.0 | 11,814 | 0 | 23 | 3,434 | 4,831 | 2,504 | 2,327 | 237 | 3 |
-- CIS 194 Homework 2
module HW02_Log where
import Control.Applicative
data MessageType = Info
| Warning
| Error Int
deriving (Show, Eq)
type TimeStamp = Int
data LogMessage = LogMessage MessageType TimeStamp String
| Unknown String
deriving (Show, Eq... | haroldcarr/learn-haskell-coq-ml-etc | haskell/course/2014-06-upenn/cis194/src/HW02_Log.hs | unlicense | 1,088 | 0 | 9 | 334 | 231 | 129 | 102 | 24 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Custom.Codegen where
import Data.Word
import Data.String
import Data.List
import Data.Function
import qualified Data.Map as Map
import Control.Monad.State
import Control.Applicative
import LLVM.General.AST
import LLVM.General.AST.... | eigengo/hwsexp | core/main/Custom/Codegen.hs | apache-2.0 | 8,731 | 0 | 13 | 1,777 | 2,529 | 1,346 | 1,183 | 177 | 2 |
module Synthax.Lexer
( names
, opNames
, symbol
, identifier
, reserved
, reservedOp
, parens
, integer
, float
, semiSep1
) where
import Prelude
import Text.Parsec
import qualified Text.Parsec.Token as Token
import Text.Parsec.Language
import Text.Parsec.String
names :: [String]
names = words "Source Code Module Gai... | burz/sonada | Synthax/Lexer.hs | apache-2.0 | 1,211 | 0 | 9 | 222 | 361 | 200 | 161 | 45 | 1 |
v = [1, 5, 10, 50, 100, 500 ]
acm [] [] = 0
acm (a:as) (b:bs) = (a*b) + acm as bs
ans i v =
let a = acm i v
in
if a >= 1000
then 1
else 0
main = do
l <- getLine
let i = map read $ words l :: [Int]
o = ans i v
print o
| a143753/AOJ | 0296.hs | apache-2.0 | 255 | 0 | 11 | 103 | 169 | 87 | 82 | 13 | 2 |
{-# LANGUAGE FlexibleContexts, ScopedTypeVariables, CPP #-}
{-| Utility functions. -}
{-
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redi... | ganeti/ganeti | src/Ganeti/Utils.hs | bsd-2-clause | 30,303 | 0 | 24 | 7,566 | 6,986 | 3,677 | 3,309 | 497 | 5 |
module Shader where
import Graphics.GL
import Control.Monad
import Control.Monad.Trans
import Foreign
import Foreign.C.String
import qualified Data.ByteString as BS
import qualified Data.Text.Encoding as Text
import qualified Data.Text.IO as Text
import Linear
import Data.Foldable
newtype GLProgram = GLPr... | lukexi/halive | demo/Shader.hs | bsd-2-clause | 4,741 | 0 | 24 | 1,608 | 1,100 | 536 | 564 | 94 | 9 |
module Blockchain.Data.Wire (
Message(..),
Capability(..),
obj2WireMessage,
wireMessage2Obj
) where
import Data.Functor
import Data.List
import Data.Word
import Network.Haskoin.Crypto
import Numeric
import Text.PrettyPrint.ANSI.Leijen hiding ((<$>))
import qualified Blockchain.Colors as CL
import Blockchai... | kejace/ethereum-client-haskell | src/Blockchain/Data/Wire.hs | bsd-3-clause | 9,629 | 0 | 22 | 1,709 | 2,877 | 1,510 | 1,367 | 210 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
-- | Provides common combinators for concurrency in Javascript.
--
-- The emulated threading Javascript threading model provided by
-- Sunroof is based on cooperative multithreading
-- (since Javascript is not multithreaded).
module Language.Sunroof.Concurrent
( loop
, fo... | ku-fpg/sunroof-compiler | Language/Sunroof/Concurrent.hs | bsd-3-clause | 1,754 | 0 | 15 | 364 | 345 | 189 | 156 | 28 | 1 |
module Graph where
import qualified Data.Map as Map
import qualified Data.Set as Set
-- | The type of graph whose vertices are of type n.
type Graph n = Map.Map n (Set.Set n)
empty :: Graph n
empty = Map.empty
union :: (Eq n, Ord n) => Graph n -> Graph n -> Graph n
union i1 i2 = Map.unionWith Set.union i1 i2
cliq... | koba-e964/hayashii-mcc | Graph.hs | bsd-3-clause | 1,043 | 0 | 10 | 225 | 470 | 245 | 225 | 20 | 1 |
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
{-# LANGUAGE ScopedTypeVariables, ExistentialQuantification, RankNTypes, OverloadedStrings #-}
-----------------------------------------------------------------------------
-- |
-- Module : System.Taffybar.Widget.Workspaces
-- Copyright : (c) Ivan A. Malison
-- License... | teleshoes/taffybar | src/System/Taffybar/Widget/Workspaces.hs | bsd-3-clause | 32,155 | 0 | 28 | 7,020 | 7,976 | 4,004 | 3,972 | -1 | -1 |
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances,
BangPatterns, ConstraintKinds #-}
module Numeric.DSDE.SDESolver where
import Numeric.DSDE.SDE.GeometricBrownian
import Numeric.DSDE.RNG
import Numeric.DSDE.SDE
import qualified System.Random.MWC as M
-- | The Euler-Maruyama sol... | davnils/sde-solver | src/Numeric/DSDE/SDESolver.hs | bsd-3-clause | 1,664 | 0 | 16 | 497 | 398 | 203 | 195 | 31 | 0 |
{-# LANGUAGE TypeSynonymInstances #-}
module Kwil.Lexer where
import Data.Char
import Data.List
import Data.Maybe (listToMaybe)
import Control.Monad.Trans.State.Lazy
import Control.Monad
data Token = LowerCaseID String
| UpperCaseID String
| Equals
| LBracket
... | rtpg/kwil | Kwil/Lexer.hs | bsd-3-clause | 5,667 | 0 | 16 | 1,637 | 1,611 | 866 | 745 | 147 | 5 |
{-# LANGUAGE
FlexibleInstances
, TypeSynonymInstances
#-}
module Data.String.ToString (ToString (..)) where
import Data.CaseInsensitive (CI, foldedCase)
import qualified Data.ByteString.Lazy.UTF8 as LBU
import qualified Data.ByteString.UTF8 as SBU
import qualified Data.Text as ST
import qu... | silkapp/tostring | src/Data/String/ToString.hs | bsd-3-clause | 783 | 0 | 7 | 154 | 195 | 115 | 80 | 23 | 0 |
-- 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 OverloadedStrings #-}
module Duckling.Duration.UK.Corpus
( corpus
, negativeCorpus
) where
i... | facebookincubator/duckling | Duckling/Duration/UK/Corpus.hs | bsd-3-clause | 2,019 | 0 | 9 | 636 | 381 | 220 | 161 | 49 | 1 |
-- JavaScript Contract Compiler
module Main where
import System.Console.GetOpt
import System.Environment
import System.Directory
import System.FilePath
import System.Exit
import Control.Monad
import BrownPLT.JavaScript.Contracts
import Paths_JsContracts -- created by Cabal
import BrownPLT.JavaScript.Parser (parseJavaS... | brownplt/javascript-contracts | src/Jscc.hs | bsd-3-clause | 3,294 | 0 | 16 | 721 | 996 | 499 | 497 | 95 | 3 |
{-|
Module : Numeric.ER.ShowHTML
Description : Misc facilities for HTML rendering.
Copyright : (c) Michal Konecny
License : BSD3
Maintainer : mikkonecny@gmail.com
Stability : experimental
Portability : portable
-}
module Numeric.ER.ShowHTML where
import qual... | michalkonecny/polypaver | src/Numeric/ER/ShowHTML.hs | bsd-3-clause | 1,285 | 0 | 12 | 349 | 336 | 179 | 157 | 25 | 1 |
module BuildParseTests (test) where
import Blaze.ByteString.Builder (Builder, toByteString)
import Data.ByteString (ByteString)
import Data.Attoparsec.ByteString (Parser, parseOnly, endOfInput)
import Test.Framework (Test, testGroup)
import Test.Framework.Providers.QuickCheck2 (testProperty)
import Network.SPDY.Frame... | kcharter/spdy-base | test/BuildParseTests.hs | bsd-3-clause | 4,180 | 0 | 10 | 522 | 770 | 410 | 360 | 73 | 1 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE PartialTypeSignatures #-}
module Language.CodeGen.LLVM where
import Prelude hiding (init)
import ... | svenkeidel/hsynth | src/Language/CodeGen/LLVM.hs | bsd-3-clause | 7,098 | 0 | 22 | 1,770 | 2,768 | 1,391 | 1,377 | 163 | 15 |
{-# OPTIONS_GHC -w #-}
module Parser where
import AST
import Lexer
-- parser produced by Happy Version 1.18.10
data HappyAbsSyn t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18
= HappyTerminal (Token)
| HappyErrorToken Int
| HappyAbsSyn4 t4
| HappyAbsSyn5 t5
| HappyAbsSyn6 t6
| HappyAbsSyn7 t7
| HappyAbs... | davnils/minijava-compiler | src/Parser.hs | bsd-3-clause | 52,493 | 699 | 25 | 8,121 | 17,811 | 9,162 | 8,649 | 1,391 | 43 |
{-# LANGUAGE OverloadedStrings #-}
module MateVMRuntime.Utilities where
import Data.Word
import qualified Data.Map as M
import qualified Data.ByteString.Lazy as B
import Data.List
import JVM.ClassFile
import Data.IORef
import System.IO.Unsafe
import MateVMRuntime.Types
import MateVMRuntime.NativeSizes
import Syste... | LouisJenkinsCS/Minimal-JVM | MateVMRuntime/Utilities.hs | bsd-3-clause | 2,414 | 0 | 16 | 441 | 808 | 410 | 398 | 60 | 3 |
{-# LANGUAGE LambdaCase #-}
module ShaderRick where
import Graphics.GL.Pal
import Data.IORef
import Control.Monad.Trans
shaderRecompiler :: MonadIO m => FilePath -> FilePath -> (Program -> IO r) -> m (IO (r, String))
shaderRecompiler vertShaderPath fragShaderPath makeResult = liftIO $ do
(shader, anyError) <- crea... | lukexi/tinyrick | src/ShaderRick.hs | bsd-3-clause | 888 | 0 | 20 | 194 | 249 | 124 | 125 | 21 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
import Control.DeepSeq
import Criterion.Main
import Data.Binary
import Data.ByteString.Lazy (ByteString)
import Data.Group
import Data.Maybe
import MCL.Curves.Fp254BNb
main :: IO ()
main = defaultMain
[ bgroup "Fp"
[ benc... | arybczak/haskell-mcl | benchmark/Main.hs | bsd-3-clause | 5,452 | 0 | 12 | 1,515 | 1,960 | 1,014 | 946 | 131 | 1 |
{-# LANGUAGE NoMonomorphismRestriction #-}
-------------------------------------------------------------------------------------
-- |
-- Copyright : (c) Hans Hoglund 2012
--
-- License : BSD-style
--
-- Maintainer : hans@hanshoglund.se
-- Stability : experimental
-- Portability : portable
--
-- Provides over... | music-suite/music-pitch | src/Music/Pitch/Literal/Pitch.hs | bsd-3-clause | 12,962 | 0 | 12 | 3,764 | 5,483 | 3,194 | 2,289 | 246 | 1 |
module Main where
import Control.Monad (when)
import Data.Maybe (fromMaybe)
import System.Environment (getArgs)
import Text.Printf (printf)
import qualified System.Console.GetOpt as GetOpt
import Parser
import Tokenizer
-- Options parsing
data Options = Options {
optInput :: Maybe FilePath,
optVerbose :: B... | christianlavoie/origami-computational-model | src/Main.hs | bsd-3-clause | 2,056 | 0 | 15 | 513 | 697 | 355 | 342 | 55 | 5 |
-- |
module VK.App (app
, module Exp) where
import React.Flux
import System.IO.Unsafe (unsafePerformIO)
import VK.App.Actions
import VK.App.Store
import VK.App.Types as Exp
import VK.App.Views
import VK.DOM.Router as Exp
app... | eryx67/vk-api-example | src/VK/App.hs | bsd-3-clause | 635 | 0 | 11 | 220 | 154 | 92 | 62 | 19 | 1 |
{-# LANGUAGE TypeFamilies, BangPatterns, TypeOperators, FlexibleContexts, FlexibleInstances, ScopedTypeVariables #-}
module Main where
import Data.NeuralNetwork hiding (cost')
import Data.NeuralNetwork.Backend.BLASHS
import qualified Data.Vector as V
import qualified Data.Vector.Storable as SV
import Data.List(... | pierric/neural-network | Backend-blashs/Example/MNIST/Main.hs | bsd-3-clause | 5,095 | 0 | 19 | 1,681 | 1,929 | 939 | 990 | 121 | 2 |
module Opaleye.Internal.Tag where
-- | Tag is for use as a source of unique IDs in QueryArr
newtype Tag = UnsafeTag Int deriving (Read, Show)
start :: Tag
start = UnsafeTag 1
next :: Tag -> Tag
next = UnsafeTag . (+1) . unsafeUnTag
unsafeUnTag :: Tag -> Int
unsafeUnTag (UnsafeTag i) = i
tagWith :: Tag -> String ->... | WraithM/haskell-opaleye | src/Opaleye/Internal/Tag.hs | bsd-3-clause | 375 | 0 | 8 | 77 | 129 | 71 | 58 | 10 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
module Mars.Command.Load (Load (..)) where
import Data.Aeson as Aeson
import Data.String.Conv
import Data.Text (Text)
import Data.Typeable
import GHC.Generics
import Mars.Command
import System.IO (hPutStrLn, stder... | lorcanmcdonald/mars | src/Mars/Command/Load.hs | bsd-3-clause | 1,281 | 0 | 12 | 253 | 402 | 217 | 185 | 37 | 1 |
{-# LANGUAGE NoMonomorphismRestriction, ExtendedDefaultRules#-}
module DocTest.Flat.Endian where
import qualified DocTest
import Test.Tasty(TestTree,testGroup)
import Flat.Endian
import Numeric (showHex)
tests :: IO TestTree
tests = testGroup "Flat.Endian" <$> sequence [ DocTest.test "src/Data/Flat/Endian.hs:36" ["T... | tittoassini/flat | test/DocTest/Data/Flat/Endian.hs | bsd-3-clause | 712 | 0 | 13 | 75 | 184 | 102 | 82 | 8 | 4 |
module Air.Data.Default where
import qualified Data.ByteString.Char8 as B
import qualified Data.ByteString.Lazy.Char8 as L
-- BEGIN
-- copy from data.default
import Data.Ratio
import qualified Data.Set as S
import qualified Data.Map as M
import Data.Int (Int8, Int16, Int32, Int64)
import Data.Word (Word8, Word16, W... | nfjinjing/air | src/Air/Data/Default.hs | bsd-3-clause | 2,370 | 0 | 8 | 458 | 879 | 501 | 378 | 58 | 0 |
{-# LANGUAGE ForeignFunctionInterface, OverloadedStrings, CPP #-}
module IOSMain where
import Graphics.UI.SDL as SDL
import HXSDL
foreign export ccall "haskell_main" main :: IO ()
main =
withInit [InitVideo] $
withWindow "Hello World!" (Position 100 100) (Size 640 480) [WindowShown] $ \win ->
withRenderer win (... | EDeijl/HXSDL | src/iOSMain.hs | mit | 387 | 0 | 12 | 61 | 124 | 68 | 56 | 9 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-deprecations #-}
module Network.Wai.Handler.Warp.Request (
recvRequest
, headerLines
) where
import Control.Applicative
import qualified Control.Concurrent as Conc (yield)
import Control.Exception (... | beni55/wai | warp/Network/Wai/Handler/Warp/Request.hs | mit | 8,515 | 0 | 19 | 2,578 | 1,890 | 1,006 | 884 | 170 | 7 |
module Network.Haskoin.Node.Units (tests) where
-- import Test.HUnit (Assertion, assertBool)
import Test.Framework (Test, testGroup)
-- import Test.Framework.Providers.HUnit (testCase)
-- TODO: Make sure that evalNewChain for a partially overlapping best chain
-- properly evaluates to BestChain.
tests :: [Test]
test... | plaprade/haskoin-node | tests/Network/Haskoin/Node/Units.hs | unlicense | 381 | 0 | 7 | 75 | 53 | 34 | 19 | 6 | 1 |
{-# OPTIONS_GHC -fglasgow-exts #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Morphism.Futu
-- Copyright : (C) 2008 Edward Kmett
-- License : BSD-style (see the file LICENSE)
--
-- Maintainer : Edward Kmett <ekmett@gmail.com>
-- Stability : ... | urska19/MFP---Samodejno-racunanje-dvosmernih-preslikav | Control/Morphism/Futu.hs | apache-2.0 | 1,865 | 4 | 10 | 319 | 398 | 217 | 181 | -1 | -1 |
{-# LANGUAGE ForeignFunctionInterface #-}
module Main (module Main, module Arc4) where
import Control.Concurrent
import Control.Monad.Reader
-- import Data.Char
-- import Data.List
import Data.Word
import Network.Socket
import System.Console.GetOpt
import System.Environment
import System.Exit
import System.IO
import ... | TC1211/TCP | src/3a/tester-src/Examples/reliable/tester.hs | apache-2.0 | 7,264 | 0 | 18 | 2,579 | 2,015 | 1,048 | 967 | 173 | 5 |
{-# LANGUAGE NoMonomorphismRestriction, FlexibleContexts #-}
-- | Filter for compressing the 'Response' body.
module Happstack.Server.Compression
( compressedResponseFilter
, compressedResponseFilter'
, compressWithFilter
, gzipFilter
, deflateFilter
, identityFilter
, starFilter
, stand... | arybczak/happstack-server | src/Happstack/Server/Compression.hs | bsd-3-clause | 923 | 0 | 5 | 450 | 68 | 46 | 22 | 18 | 0 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.FetchUtils
-- Copyright : (c) David Himmelstrup 2005
-- Duncan Coutts 2011
-- License : BSD-like
--
-- Maintainer : cabal-devel@gmail.com
-- Stability : provisional
--... | martinvlk/cabal | cabal-install/Distribution/Client/FetchUtils.hs | bsd-3-clause | 6,921 | 0 | 15 | 1,591 | 1,497 | 761 | 736 | 130 | 7 |
{-# LANGUAGE Haskell98 #-}
{-# LINE 1 "src/Data/BitUtil.hs" #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE Trustworthy #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.BitUtil
-- Copyrig... | phischu/fragnix | tests/packages/scotty/Data.BitUtil.hs | bsd-3-clause | 2,131 | 0 | 10 | 811 | 255 | 159 | 96 | 22 | 1 |
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-}
{- | Haskell-specific web worker API. The URL is expected to point to a script
that is the same as the caller, or at least a script that has been
produced by GHCJS and contains the same static values.
-}
module JavaScript.Web.Worker.Haskell ( Haskel... | tavisrudd/ghcjs-base | JavaScript/Web/Worker/Haskell.hs | mit | 895 | 0 | 8 | 251 | 120 | 69 | 51 | 14 | 1 |
-- | test module: call some server methods
module Main where
import Network.XmlRpc.Client
import Modular.Documented
import Modular.Signed
import Modular.Task
import Modular.Config
import Modular.Seed
import Modular.Instance
import Modular.Solution
import Modular.Pair
type URL = String
server :: URL
server = "http:... | Erdwolf/autotool-bonn | src/Modular/Server_Test.hs | gpl-2.0 | 1,752 | 6 | 16 | 454 | 523 | 259 | 264 | 50 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Response.Graph
(graphResponse) where
import Text.Blaze ((!))
import qualified Text.Blaze.Html5 as H
import qualified Text.Blaze.Html5.Attributes as A
import Happstack.Server
import MasterTemplate
import Scripts
graphResponse :: ServerPart Response
graphResponse... | chocoluffy/courseography | hs/Response/Graph.hs | gpl-3.0 | 2,535 | 0 | 23 | 866 | 887 | 411 | 476 | 54 | 1 |
-----------------------------------------------------------------------------
-- |
-- Copyright : (c) 2006-2014 Duncan Coutts
-- License : BSD-style
--
-- Maintainer : duncan@community.haskell.org
--
-- Compression and decompression of data streams in the gzip format.
--
-- The format is described in detail i... | CloudI/CloudI | src/api/haskell/external/zlib-0.6.2.1/Codec/Compression/GZip.hs | mit | 3,981 | 0 | 6 | 676 | 312 | 225 | 87 | 38 | 1 |
{-# LANGUAGE BangPatterns, CPP #-}
-- | File descriptor cache to avoid locks in kernel.
module Network.Wai.Handler.Warp.FdCache (
withFdCache
, Fd
, Refresh
#ifndef WINDOWS
, openFile
, closeFile
, setFileCloseOnExec
#endif
) where
#ifndef WINDOWS
#if __GLASGOW_HASKELL__ < 709
import Control.Applicat... | utdemir/wai | warp/Network/Wai/Handler/Warp/FdCache.hs | mit | 4,467 | 0 | 14 | 874 | 273 | 170 | 103 | 88 | 2 |
{-# CFILES a.c #-}
foreign import ccall unsafe "foo" foo :: Int -> Int
main = print $ foo 6
| dcreager/cabal | tests/systemTests/exeWithC/test.hs | bsd-3-clause | 93 | 0 | 6 | 21 | 32 | 17 | 15 | 2 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.