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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
-- | ref.) http://titech-ssr.blog.jp/archives/1047835805.html
{-# LANGUAGE NPlusKPatterns #-}
module Fib where
import Prelude hiding (Functor)
import FixPrime
fib :: Integer -> Integer
fib = hylo phi psi
where
psi 0 = FZero
psi 1 = FOne
psi n = FNode (n-1) (n-2)
phi FZero = 0
phi FOne = 1
... | cutsea110/aop | src/Fib.hs | bsd-3-clause | 980 | 1 | 11 | 267 | 518 | 271 | 247 | 29 | 5 |
{-# LANGUAGE OverloadedStrings #-}
module Ifrit.Client.Pushover where
import Ifrit.Framework
import Network.HTTP.Conduit
import Data.Conduit
import Control.Monad.IO.Class (liftIO)
import qualified Data.ByteString.Lazy as L
import qualified Data.ByteString.Char8 as C
import Data.Conduit.Binary (sinkFile)
data Pushover... | frio/ifrit | src/hs/Ifrit/Client/Pushover.hs | bsd-3-clause | 1,119 | 0 | 12 | 393 | 263 | 144 | 119 | 26 | 1 |
module Test1 where
import Prelude hiding (Ordering(..))
import StableMarriage.GaleShapley
import Data.List (find)
-- | Active Boyes meets Passive Girls
type Name = String
data Boy = B { boyName :: Name, ranking :: [Girl] }
data Girl = G { girlName :: Name, selects :: [Boy] }
instance Show Boy where
show (B n _) =... | cutsea110/stable-marriage | test/Test1.hs | bsd-3-clause | 2,328 | 0 | 13 | 920 | 1,088 | 617 | 471 | -1 | -1 |
module Language.Grass.Transpiler.Untyped.Optimization (
Optimizer (..)
, noOpt
, Eff (..)
, elimUnused
, elimUnused'
, elimDuplicate
, elimDuplicate'
) where
import Data.List
import Data.Monoid
import Safe
import Language.Grass.Transpiler.Untyped.Term
data Optimizer = Optimizer {
globalOpt :: ... | susisu/Grassy | src/Language/Grass/Transpiler/Untyped/Optimization.hs | bsd-3-clause | 4,766 | 0 | 23 | 1,812 | 1,898 | 987 | 911 | 107 | 10 |
{-# OPTIONS_GHC -Wall #-}
module Language.Haskell.Exts.Desugar.Generic.Case where
import qualified Prelude
import Prelude hiding (error)
import Language.Haskell.Exts hiding (binds,alt)
import Language.Haskell.Exts.SrcLoc(noLoc)
import Language.Haskell.Exts.Unique
import Language.Haskell.Exts.Desugar.Ba... | shayan-najd/Haskell-Desugar-Generic | Language/Haskell/Exts/Desugar/Generic/Case.hs | bsd-3-clause | 17,787 | 10 | 26 | 6,640 | 6,086 | 3,106 | 2,980 | 418 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Data.SBV.BitVectors.Model
-- Copyright : (c) Levent Erkok
-- License : BSD3
-- Maintainer : erkokl@gmail.com
-- Stability : experimental
--
-- Instance declarations for our symbolic world
------------------... | Copilot-Language/sbv-for-copilot | Data/SBV/BitVectors/Model.hs | bsd-3-clause | 82,229 | 0 | 21 | 22,512 | 23,955 | 12,491 | 11,464 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-#... | bitemyapp/serials | server/Serials/Lib/ServantCookie.hs | mit | 2,259 | 0 | 13 | 553 | 354 | 207 | 147 | 33 | 0 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Unison.NodeServer where
import Control.Monad.IO.Class
import Data.Aeson (ToJSON, FromJSON)
import Network.HTTP.Types.Method (StdMethod(OPTIONS))
import Unison.Hash (Hash)
import Unison.Node (Node)
import... | CGenie/platform | node/src/Unison/NodeServer.hs | mit | 4,393 | 0 | 16 | 958 | 1,704 | 845 | 859 | 126 | 2 |
import System.Environment
import NLP.FrenchTAG.Automat
main :: IO ()
main = do
[path] <- getArgs
baseAutomatRules path
| kawu/french-tag | src/baseline-automat.hs | bsd-2-clause | 129 | 0 | 8 | 26 | 43 | 22 | 21 | 6 | 1 |
{-# language CPP #-}
{-# language ConstraintKinds #-}
{-# language MultiParamTypeClasses #-}
#ifndef ENABLE_INTERNAL_DOCUMENTATION
{-# OPTIONS_HADDOCK hide #-}
#endif
module OpenCV.Internal.Core.Types.Point
( Point(..)
, PointDim
, IsPoint(..)
, IsPoint2
, IsPoint3
) where
import "base" Foreign.ForeignPt... | lukexi/haskell-opencv | src/OpenCV/Internal/Core/Types/Point.hs | bsd-3-clause | 1,861 | 0 | 12 | 434 | 572 | 319 | 253 | -1 | -1 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.InstalledPackageInfo
-- Copyright : (c) The University of Glasgow 2004
--
-- Maintainer : libraries@haskell.org
-- Stability : alpha
-- Portability : portable
--
-- This is the information about a... | FranklinChen/hugs98-plus-Sep2006 | packages/Cabal/Distribution/InstalledPackageInfo.hs | bsd-3-clause | 11,274 | 191 | 13 | 3,111 | 2,445 | 1,405 | 1,040 | 204 | 2 |
-- |
-- Module: Database.PostgreSQL.Simple.QueryParams
-- Copyright: (c) 2011 Chris Done, 2011 MailRank, Inc.
-- License: BSD3
-- Maintainer: Chris Done <chrisdone@gmail.com>
-- Stability: experimental
-- Portability: portable
--
-- The 'QueryParams' typeclass, for rendering a collection of
-- parameters ... | chrisdone/pgsql-simple | Database/PostgreSQL/Simple/QueryParams.hs | bsd-3-clause | 3,028 | 0 | 8 | 674 | 1,330 | 746 | 584 | 49 | 0 |
import System.Environment (getArgs)
import Network.Transport
import Network.Transport.TCP (createTransport)
import qualified Data.ByteString.Char8 as BSC (putStrLn, pack, unpack)
import qualified Data.ByteString as BS (concat)
import Control.Concurrent (forkIO)
import Control.Concurrent.MVar (MVar, newEmptyMVar, putMVa... | qnikst/network-transport | tests/sumeuler/SumEulerWorker.hs | bsd-3-clause | 1,524 | 0 | 20 | 357 | 559 | 280 | 279 | 42 | 2 |
<?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="ro-RO">
<title>Advanced SQLInjection Scanner</title>
<maps>
<homeID>sqliplugin</homeID>
... | thc202/zap-extensions | addOns/sqliplugin/src/main/javahelp/help_ro_RO/helpset_ro_RO.hs | apache-2.0 | 981 | 77 | 66 | 157 | 409 | 207 | 202 | -1 | -1 |
-- | Exporting records.
module Bug6( A(A), B(B), b, C(C,c1,c2), D(D,d1), E(E) ) where
-- |
-- This record is exported without its field
data A = A { a :: Int }
-- |
-- .. with its field, but the field is named separately in the export list
-- (the field isn't documented separately since it is already documented here)... | DavidAlphaFox/ghc | utils/haddock/html-test/src/Bug6.hs | bsd-3-clause | 654 | 0 | 8 | 153 | 147 | 102 | 45 | 16 | 0 |
{-# LANGUAGE MagicHash #-}
module T8205 where
import GHC.Exts
data Stack a = Stack a (Stack a)
dropFromStack :: Int# -> Stack a -> Stack a
dropFromStack 0# l = l
dropFromStack n (x `Stack` xs) = dropFromStack (n -# 1#) xs
| forked-upstream-packages-for-ghcjs/ghc | testsuite/tests/codeGen/should_compile/T8205.hs | bsd-3-clause | 226 | 0 | 8 | 46 | 88 | 48 | 40 | 7 | 1 |
main = do
putStrLn "Hello. What is your name?"
name <- getLine
putStrLn $ "Nice to meet you, " ++ name ++ "." | RAFIRAF/HASKELL | name.hs | mit | 117 | 0 | 9 | 30 | 34 | 15 | 19 | 4 | 1 |
{-# htermination (\\) :: Eq a => [(Maybe a)] -> [(Maybe a)] -> [(Maybe a)] #-}
import List
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/List_BACKSLBACKSL_10.hs | mit | 91 | 0 | 3 | 18 | 5 | 3 | 2 | 1 | 0 |
-- Requires cabal install Gamma
-- note, does not seem to work
import Math.Gamma
-- Type annotation (optional)
factorial :: Integer -> Integer
-- Point-free style analytic solution
factorial = round . exp . lnGamma . fromIntegral . (+1) | butchhoward/xhaskell | factorial_gamma.hs | mit | 240 | 0 | 8 | 41 | 44 | 26 | 18 | 3 | 1 |
module SqlFieldTypes where
import Database.Persist.TH (derivePersistField)
data Subject = Math | Reading | Writing | Science | SocialStudies deriving (Eq, Show, Read)
derivePersistField "Subject"
data Subgroup = All | MultiRace | White | Disabled
| Migrant | Asian | PacificIslander
| Hisp... | rdlester/meap-analysis | failed_src/SqlFieldTypes.hs | mit | 563 | 0 | 6 | 117 | 150 | 87 | 63 | -1 | -1 |
{-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable #-}
module Main where
data Liste a = Tømme | Kons a (Liste a)
deriving (Eq, Show,
Functor,
Foldable,
Traversable)
-- instance Foldable Liste where
-- foldr _ z Tømme = ... | filippovitale/eta-playground | ghc-derive/Main.hs | mit | 598 | 0 | 9 | 201 | 108 | 60 | 48 | 10 | 1 |
{-# htermination lookup :: Eq a => (Maybe a) -> [((Maybe a),b)] -> Maybe b #-}
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/Prelude_lookup_10.hs | mit | 79 | 0 | 2 | 16 | 3 | 2 | 1 | 1 | 0 |
{-# LANGUAGE
RecordWildCards
#-}
{-|
Module : HSat.Problen.Instances.Common.Clauses
Description : The 'Clause' data type
Copyright : (c) Andrew Burnett 2014-2015
Maintainer : andyburnett88@gmail.com
Stability : experimental
Portability : Unknown
This module exports the common functions and definitio... | aburnett88/HSat | src/HSat/Problem/Instances/Common/Clauses.hs | mit | 4,530 | 0 | 12 | 1,213 | 714 | 410 | 304 | 81 | 2 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, OverlappingInstances #-}
module Compiler.Serializable where
import Data.List (intercalate, sort)
import Data.Set (Set, size, findMin, toList)
import qualified Data.Set as Set
import System.Console.ANSI
infixr 6 >>>>
class... | banacorn/mini-pascal | src/Compiler/Serializable.hs | mit | 2,975 | 0 | 13 | 648 | 924 | 477 | 447 | 61 | 1 |
-- Mathematics/Fundamentals/Filling Jars
module Main where
import qualified HackerRank.Mathematics.FillingJars as M
main :: IO ()
main = M.main
| 4e6/sandbox | haskell/hackerrank/FillingJars.hs | mit | 147 | 0 | 6 | 21 | 31 | 20 | 11 | 4 | 1 |
module Y2020.M09.D09.Exercise where
{--
Yesterday (which, oddly enough, is really yesterday, in this particular case),
--}
import Y2020.M09.D08.Exercise
import Y2020.M09.D01.Exercise (Ontology)
{--
we did a modicum of data analyses and reduced a word-... set? word-... net?
from ~250,000 words to ~2,000 words.
We ca... | geophf/1HaskellADay | exercises/HAD/Y2020/M09/D09/Exercise.hs | mit | 1,487 | 0 | 8 | 252 | 65 | 41 | 24 | 6 | 1 |
module Render
(
renderRay
)
where
import Numeric.FastMath ( )
import Color ( Color, black )
import Core ( Ray )
import Light ( toColor )
import PhotonMap ( PhotonMap, getLightToViewerAtIntersection )
import Scene ( Scene, sceneIntersection )
renderRay :: R... | stu-smith/rendering-in-haskell | src/experiment06/Render.hs | mit | 486 | 0 | 8 | 129 | 121 | 69 | 52 | -1 | -1 |
-- |
-- Module : Algebra.Closure.Set.DepthFirst
-- Copyright : (c) Joseph Abrahamson 2013
-- License : MIT
--
-- Maintainer : me@jspha.com
-- Stability : experimental
-- Portability : non-portable
--
-- Depth-first closed sets. For a particular endomorphism @(p :: a ->
-- a)@ a 'Closed' set is a set whe... | tel/closure | src/Algebra/Closure/Set/DepthFirst.hs | mit | 1,669 | 0 | 10 | 364 | 401 | 223 | 178 | 22 | 1 |
module Light.Geometry.Matrix
-- ADT
( Matrix(..)
-- Default Instances
, zeroMatrix, identityMatrix
-- Arithmetic
, transpose, (|+|), (|-|), (|*|), (|*), (|/), (|*^), (|*.), (|*!), (^*|), (.*|), (!*|)
-- Transformation Matricies
, scalingMatrix, translationMatrix, rotationMatrix, frustumMatrix, perspe... | jtdubs/Light | src/Light/Geometry/Matrix.hs | mit | 6,095 | 0 | 17 | 2,125 | 4,097 | 2,180 | 1,917 | 144 | 2 |
module ElasticSearch.Internal where
import qualified API as API
import Data.Aeson (ToJSON, FromJSON)
import Data.Aeson.Types
import Data.ByteString.Char8 (ByteString, pack)
import Data.Text (Text)
import ElasticSearch.Types
import Network.HTTP.Conduit
import Network.HTTP.Types
get :: FromJSON a => String -> ElasticSea... | SaneApp/elastic-search-api | src/ElasticSearch/Internal.hs | mit | 1,215 | 0 | 13 | 213 | 451 | 228 | 223 | 30 | 2 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE OverloadedStrings #-}
module Shake.Configure.Package where
import Control.Applicative
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
import Data.... | bennofs/shake-configure | Shake/Configure/Package.hs | mit | 2,570 | 0 | 34 | 622 | 816 | 434 | 382 | -1 | -1 |
-- Haskell version of https://gcc.gnu.org/onlinedocs/jit/intro/tutorial03.html
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Compiler.GCC.JIT
import Foreign.Ptr
import Foreign.C.Types
import Control.Monad.IO.Class (liftIO)
type FnType = CInt -> IO CInt
foreign import ccall "dynamic"
mkFun :: FunPt... | Slowki/hgccjit | example/Tutorial3.hs | mit | 1,679 | 0 | 17 | 376 | 507 | 233 | 274 | 40 | 1 |
{-|
Module: Y2015.D21
Description: Advent of Code Day 21 Solutions.
License: MIT
Maintainer: @tylerjl
Solutions to the day 21 set of problems for <adventofcode.com>.
-}
module Y2015.D21
( battle
, cheapestVictory
, highestLoss
, toBoss
, mkTestCombatant
)
where
import Control.Monad (replicateM)... | tylerjl/adventofcode | src/Y2015/D21.hs | mit | 3,984 | 0 | 12 | 1,372 | 1,196 | 702 | 494 | 85 | 3 |
{-# LANGUAGE
FlexibleInstances
,TypeSynonymInstances
#-}
module ComputedAnswer (ComputedAnswer(..)) where
import Pretty
import Subst (Subst)
import Lang
import CoreLang
import Data.List (elemIndex, sortBy, groupBy)
import Data.Either (rights)
import Data.Monoid (Monoid, mappend, mempty, mconcat)
data Compute... | acharal/hopes | src/prover/ComputedAnswer.hs | gpl-2.0 | 5,801 | 0 | 20 | 2,057 | 2,659 | 1,345 | 1,314 | 116 | 15 |
{-# LANGUAGE CPP #-}
{-
Copyright (C) 2009 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 Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
... | imuli/gitit | Network/Gitit/Plugins.hs | gpl-2.0 | 3,342 | 0 | 20 | 782 | 486 | 252 | 234 | 16 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Buildsome.MagicFiles
( inputIgnored, outputIgnored
, allowedUnspecifiedOutput
) where
import Lib.FilePath (FilePath)
import Prelude hiding (FilePath)
import qualified Data.ByteString.Char8 as BS8
specialFile :: FilePath -> Bool
specialFile path = any (`BS8.isPrefixOf` p... | nadavshemer/buildsome | src/Buildsome/MagicFiles.hs | gpl-2.0 | 590 | 0 | 6 | 76 | 138 | 86 | 52 | 15 | 1 |
{-
- Copyright (C) 2014 Alexander Berntsen <alexander@plaimi.net>
-
- This file is part of coreutilhs.
-
- coreutilhs 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
- (at y... | alexander-b/coreutilhs | basename.hs | gpl-3.0 | 1,077 | 0 | 12 | 190 | 94 | 51 | 43 | 10 | 2 |
-----------------------------------------------------------------------------
-- |
-- Module : Text.Parsec.Combinator
-- Copyright : (c) Daan Leijen 1999-2001, (c) Paolo Martini 2007
-- License : BSD-style (see the LICENSE file)
--
-- Maintainer : derek.a.elkins@gmail.com
-- Stability : provisional
... | antarestrader/sapphire | Text/Parsec/Combinator.hs | gpl-3.0 | 10,619 | 0 | 12 | 3,449 | 2,176 | 1,160 | 1,016 | 82 | 1 |
module Luhn where
-- Exercise 7: Helper methods to doubleEveryOther, sumDigits
-- and to split a number in to an array with digits
-- source: https://en.wikipedia.org/wiki/Payment_card_number
-- source: https://en.wikipedia.org/wiki/Luhn_algorithm
-- Time spent: 30 min
luhn :: Integer -> Bool
luhn n = (flip mod 10 $ ... | vdweegen/UvA-Software_Testing | Lab1/Willem/Luhn.hs | gpl-3.0 | 1,251 | 0 | 14 | 340 | 496 | 253 | 243 | 24 | 1 |
module Reffit.Filter where
import Reffit.Types
import Reffit.Document
import Reffit.FieldTag
import qualified Data.Map as Map
import qualified Data.List as List
import qualified Data.Tree as Tree
import Data.Time
filterDocs :: [TagPath] -> [DocClass] -> [Document] -> [Document]
filterDocs queryTags queryClasses =
... | imalsogreg/reffit | src/Reffit/Filter.hs | gpl-3.0 | 585 | 0 | 15 | 140 | 171 | 97 | 74 | 15 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Reviews/List.hs | mpl-2.0 | 4,230 | 0 | 17 | 1,057 | 661 | 381 | 280 | 94 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-iamcredentials/gen/Network/Google/Resource/IAMCredentials/Projects/ServiceAccounts/GenerateIdentityBindingAccessToken.hs | mpl-2.0 | 7,081 | 0 | 16 | 1,493 | 780 | 456 | 324 | 131 | 1 |
{-
- This file is part of Bilder.
-
- Bilder 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 later version.
-
- Bilder i... | ingemaradahl/bilder | src/CompilerTypes.hs | lgpl-3.0 | 967 | 0 | 5 | 210 | 42 | 29 | 13 | 5 | 0 |
{-# LANGUAGE ForeignFunctionInterface #-}
module Lib where
import System.Environment (getProgName)
import Foreign.C.String (newCString)
import Curryrs.Types
triple :: I64 -> I64
triple x = 3 * x
foreign export ccall triple :: I64 -> I64
getProgNameStr :: IO Str
getProgNameStr = getProgName >>= newCString
foreign... | mgattozzi/curryrs | haskell/htest/src/Lib.hs | apache-2.0 | 359 | 0 | 6 | 57 | 96 | 55 | 41 | 11 | 1 |
{-# LANGUAGE
CPP
, ScopedTypeVariables
, FlexibleInstances
, TypeSynonymInstances
#-}
module Main where
import GCF
import Data.Complex
import Foreign.Storable.Complex ()
import Foreign
import qualified Data.ByteString.Unsafe as BS
import qualified Data.ByteString as BS
-- import ... | SKA-ScienceDataProcessor/RC | MS3/Sketches/GCF_new/GCF_DNA.hs | apache-2.0 | 1,249 | 0 | 13 | 264 | 362 | 189 | 173 | 35 | 1 |
f i d =
let m = d `mod` i
v = d `div` i
n = f (i+1) d
in
if v < i
then []
else if m /= 0
then n
else if v == i
then [v]
else (i:v:n)
ans d =
let y = f 2 d
y'= if d == 1 then y else (1:y)
s = sum y'
in
if d > s then "deficient... | a143753/AOJ | 2101.hs | apache-2.0 | 519 | 0 | 13 | 224 | 254 | 135 | 119 | 22 | 4 |
-- Copyright 2013 Mario Pastorelli (pastorelli.mario@gmail.com) Samuel Gélineau (gelisam@gmail.com)
--
-- 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.o... | gelisam/hawk | tests/System/Console/Hawk/Representable/Test.hs | apache-2.0 | 5,006 | 0 | 18 | 1,097 | 2,021 | 1,172 | 849 | 76 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Data.ByteString.Builder
-- Copyright : Lennart Kolmodin, Ross Paterson, George Giorgidze
-- License : BSD3
--
-- Maintainer : George Giorgidze <http://cs.nott.ac.uk/~ggg/>
-- Stability : experimental
-- Portabi... | astro/haskell-torrent | src/Data/ByteString/Builder.hs | bsd-2-clause | 13,877 | 0 | 15 | 3,090 | 3,150 | 1,739 | 1,411 | 190 | 2 |
{-# LANGUAGE QuasiQuotes #-}
-----------------------------------------------------------------------------
--
-- Module : Model.PaperReader.Elsevier
-- Copyright :
-- License : BSD3
--
-- Maintainer : Hiro Kai
-- Stability : Experimental
-- Portability :
--
-- |
--
-----------------------------------... | hirokai/PaperServer | Parser/Publisher/Elsevier.hs | bsd-2-clause | 5,587 | 0 | 23 | 1,365 | 1,898 | 1,019 | 879 | 138 | 2 |
module Distribution.ArchLinux.Libalpm.Raw (
module Distribution.ArchLinux.Libalpm.Raw.Database,
module Distribution.ArchLinux.Libalpm.Raw.Misc,
module Distribution.ArchLinux.Libalpm.Raw.Options,
module Distribution.ArchLinux.Libalpm.Raw.Packages,
module Distribution.ArchLinux.Libalpm.Raw.Transaction... | netvl/alpmhs | lib/Distribution/ArchLinux/Libalpm/Raw.hs | bsd-3-clause | 788 | 0 | 5 | 65 | 129 | 98 | 31 | 15 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
-- |
-- Module: $HEADER$
-- Description: Data type for DHT operation result.
-- Copyright: (c) 2015, Jan Šipr, Matej Kollár, Peter Trško
-- License: BSD3
--
-- Stability: e... | Siprj/dht-api | src/Data/DHT/Type/Result.hs | bsd-3-clause | 5,341 | 0 | 13 | 1,117 | 971 | 556 | 415 | 76 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Monad.IO.Class
import qualified Data.ByteString.Lazy as BS
import qualified Data.Text as T
import Test.Hspec
import Test.HUnit.Base
import System.Nagios.Plugin
import Syste... | anchor/nagios-plugin-retcond | tests/HSpec.hs | bsd-3-clause | 1,649 | 0 | 11 | 368 | 255 | 133 | 122 | 28 | 1 |
module TailRec where
import Iter
import If
type TailRec a b = a -> If a (Iter a b)
runTailRec :: TailRec a b -> a -> b
runTailRec = iterLoop . runIf
| ku-fpg/ku-accelerate-examples | fib/TailRec.hs | bsd-3-clause | 173 | 0 | 8 | 57 | 62 | 35 | 27 | 6 | 1 |
{-# LANGUAGE BangPatterns #-}
{-
Problem 50
Which prime under a million can be written as the sum of the most
consecutive primes?
Result
997651
24.21 s
-}
module Problem50 (solution) where
import Data.Numbers.Primes
import Data.List
import CommonFunctions
... | quchen/HaskellEuler | src/Problem50.hs | bsd-3-clause | 736 | 0 | 9 | 192 | 177 | 100 | 77 | 12 | 1 |
{-# LANGUAGE PatternGuards, ViewPatterns, RecordWildCards #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -O0 #-} -- otherwise it takes a lot of memory to compile on the haskell.org server
module Query(
Query(..), isQueryName, isQueryType, isQueryScope,
parseQuery, renderQuery,
query_test
) wher... | ndmitchell/hoogle | src/Query.hs | bsd-3-clause | 10,248 | 0 | 18 | 2,572 | 4,077 | 2,050 | 2,027 | -1 | -1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE UndecidableInstances #-}
#if __GLASGOW_HASKELL__ >= 706
{-# LANGUAGE PolyKinds #-}
... | timjb/lens | src/Control/Lens/Wrapped.hs | bsd-3-clause | 23,998 | 0 | 12 | 4,677 | 7,073 | 3,748 | 3,325 | -1 | -1 |
module Main where
import Data.Json.Token
main :: IO ()
main = print (show (jsonTokenBraceL :: JsonToken))
| haskell-works/data-json-token | app/Main.hs | bsd-3-clause | 108 | 0 | 8 | 18 | 40 | 23 | 17 | 4 | 1 |
module Generics.GPAH.Derive (
module Generics.GPAH.Derive.Base
,module Generics.GPAH.Derive.Analyze
,module Generics.GPAH.Derive.PPrint
)
where
import Generics.GPAH.Derive.Base
import Generics.GPAH.Derive.Analyze
import Generics.GPAH.Derive.PPrint | bezirg/gpah | src/Generics/GPAH/Derive.hs | bsd-3-clause | 293 | 0 | 5 | 62 | 54 | 39 | 15 | 7 | 0 |
{-# Language TemplateHaskell, RecordWildCards #-}
module Template where
import Alex
import Language.Haskell.TH
import Language.Haskell.TH.Quote
import Language.Haskell.TH.Syntax
import Language.Haskell.Meta.Parse ( parseExp )
templateDriver :: Driver [Q Dec] (Q Exp)
templateDriver = Driver {..}
where
startCod... | farre/template-alex | Template.hs | bsd-3-clause | 4,627 | 0 | 20 | 1,807 | 1,598 | 831 | 767 | 105 | 15 |
module Language.TECS.Jack.ToDeck.Layout (layout, Id(..), Alloc(..)) where
import Language.TECS.Jack.Syntax
import Control.Monad.Reader
import Control.Monad.State
import Control.Applicative
import Data.Map (Map)
import qualified Data.Map as Map
import Control.Arrow (first, second, (***))
import qualified Data.Traversab... | gergoerdi/tecs | src/Language/TECS/Jack/ToDeck/Layout.hs | bsd-3-clause | 4,035 | 0 | 16 | 921 | 1,648 | 833 | 815 | 84 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Control.Concurrent.SHFSTM.Internal.TVar
-- Copyright : (c) D. Sabel, Goethe-University, Frankfurt a.M., Germany
-- License : BSD-style
--
-- Maintainer : sabel <at> ki.cs.uni-frankfurt.de
-- Stability : e... | cornell-pl/HsAdapton | stmshf/Control/Concurrent/SHFSTM/Internal/TVar.hs | bsd-3-clause | 4,001 | 0 | 14 | 842 | 647 | 377 | 270 | -1 | -1 |
{-# OPTIONS_HADDOCK hide #-}
{-# LANGUAGE DeriveDataTypeable #-}
-- |
-- Module : Network.TLS.Struct
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : unknown
--
-- the Struct module contains all definitions and values of the TLS protocol... | tolysz/hs-tls | core/Network/TLS/Struct.hs | bsd-3-clause | 18,129 | 0 | 10 | 4,120 | 3,882 | 2,104 | 1,778 | 478 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE UnicodeSyntax #-}
module DB.Base where
import Data.ByteString
import Database.HDBC
import Database.HDBC.Sqlite3
import Control.Monad.IO.Class (liftIO)
import Debug
type DB = Connection
type FileName = Strin... | marklar/TagFS | src/DB/Base.hs | bsd-3-clause | 1,686 | 0 | 14 | 586 | 494 | 270 | 224 | 49 | 1 |
{-# LANGUAGE CPP #-}
import Control.Monad (foldM_, forM_)
import System.Cmd
import System.Exit
import System.Info (os)
import System.FilePath
import System.Directory ( doesFileExist, copyFile, removeFile, createDirectoryIfMissing )
import Distribution.PackageDescription
import Distribution.Simple.Setup
import Distrib... | elbrujohalcon/hfiar | Setup.hs | bsd-3-clause | 2,557 | 0 | 13 | 418 | 535 | 274 | 261 | 45 | 2 |
{-# LANGUAGE CPP, DeriveDataTypeable, MultiParamTypeClasses, FlexibleInstances, ScopedTypeVariables #-}
-- |
-- Module : Data.Vector.Primitive.Mutable
-- Copyright : (c) Roman Leshchinskiy 2008-2010
-- License : BSD-style
--
-- Maintainer : Roman Leshchinskiy <rl@cse.unsw.edu.au>
-- Stability : experimen... | thomie/vector | Data/Vector/Primitive/Mutable.hs | bsd-3-clause | 10,887 | 0 | 12 | 2,506 | 2,759 | 1,505 | 1,254 | 187 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
module HipBot.HipLambda.Pointfree
( pointfreeResource
, pointfulResource
) where
import Control.Monad.Reader
import Data.Foldable
import Data.List (isPrefixOf, isSuffixOf)
import Data.Monoid
import Data.Text (Text)
... | mietek/hiplambda | src/HipBot/HipLambda/Pointfree.hs | bsd-3-clause | 1,149 | 0 | 12 | 181 | 326 | 184 | 142 | 33 | 3 |
{-# LANGUAGE CPP #-}
{-# OPTIONS -fno-warn-unused-binds #-}
{-# OPTIONS -fno-warn-unused-imports #-}
-- |
-- Module : Data.Array.Accelerate.CUDA.Debug
-- Copyright : [2008..2014] Manuel M T Chakravarty, Gabriele Keller
-- [2009..2014] Trevor L. McDonell
-- License : BSD3
--
-- Maintainer : T... | mikusp/accelerate-cuda | Data/Array/Accelerate/CUDA/Debug.hs | bsd-3-clause | 2,967 | 0 | 19 | 826 | 581 | 314 | 267 | 31 | 2 |
module TicTacToe.Data.Cell where
import qualified TicTacToe.Data.Token as T
data Cell
-- Should be hidden
= Cell {
getPosition :: CellPosition
, getState :: CellState
} deriving (Eq, Ord, Show)
type CellPosition
= Int
data CellState
= MarkedWith T.Token
| Empty
deriving (Eq, Ord, Show)
-- mk... | rodamber/haskell-tic-tac-toe | src/TicTacToe/Data/Cell.hs | bsd-3-clause | 787 | 0 | 9 | 212 | 219 | 122 | 97 | 22 | 1 |
{-# LANGUAGE FlexibleInstances, UndecidableInstances #-}
module PFDS.Commons.IsList.RandomAccessListNoFamily where
import PFDS.Commons.RandomAccessListNoFamily
import Data.List (unfoldr)
import Prelude hiding (head, tail)
class RandomAccessList l => IsList l where
toList :: l a -> [a]
fromList :: [a] -> l a
ins... | matonix/pfds | src/PFDS/Commons/IsList/RandomAccessListNoFamily.hs | bsd-3-clause | 485 | 0 | 11 | 86 | 148 | 81 | 67 | 13 | 0 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE... | mstksg/tensor-ops | src/TensorOps/Backend/NTensor.hs | bsd-3-clause | 7,897 | 0 | 16 | 2,797 | 2,624 | 1,393 | 1,231 | -1 | -1 |
{-# LANGUAGE CPP #-}
module Gidl.Backend.Ivory.Types where
import Data.Monoid
import Data.List (intercalate, nub)
import Data.Char (toUpper, toLower)
import Gidl.Types
import Ivory.Artifact
#if MIN_VERSION_mainland_pretty(0,6,0)
import Text.PrettyPrint.Mainland.Class
#endif
import Text.PrettyPrint.Mainland
typeUmbre... | GaloisInc/gidl | src/Gidl/Backend/Ivory/Types.hs | bsd-3-clause | 11,370 | 0 | 17 | 2,617 | 3,781 | 1,872 | 1,909 | 264 | 10 |
module App.Views.Home.Index where
import Turbinado.View
markup :: VHtml
markup=
<div>
<h1>Turbinado?</h1>
<div style="float:right">
<img src="http://upload.wikimedia.org/wikipedia/en/thumb/0/0e/TurbinadoSugar.jpg/757px-TurbinadoSugar.jpg" width="300" />
</div>
... | alsonkemp/turbinado-website | App/Views/Home/Index.hs | bsd-3-clause | 2,795 | 110 | 31 | 593 | 829 | 431 | 398 | -1 | -1 |
{-# LANGUAGE QuasiQuotes, TypeFamilies, FlexibleInstances, OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
import Prelude hiding (concat)
import File.Binary (binary, Field(..))
import File.Binary.Instances ()
import File.Binary.Instances.BigEndian ()
import File.Binary.Instances.MSB0 ()
import CRC (crc)
im... | YoshikuniJujo/binary-file | examples/readPNG.hs | bsd-3-clause | 5,163 | 50 | 11 | 948 | 1,719 | 932 | 787 | 117 | 1 |
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RecordWildCards #-}
-- |
-- Module : Pact.Native.Internal
-- Copyright : (C... | kadena-io/pact | src/Pact/Native/Internal.hs | bsd-3-clause | 10,746 | 0 | 22 | 2,406 | 3,696 | 1,863 | 1,833 | 225 | 7 |
import Data.Array.CArray
import Data.Complex
import Data.List (intercalate, transpose)
import Math.FFT (dft, idft)
type Vector = CArray Int (Complex Double)
(.*), (.+) :: Vector -> Vector -> Vector
a .* b = liftArray2 (*) a b
a .+ b = liftArray2 (+) a b
normalize :: Double -> Vector -> Vector
normalize dx v =
let ... | Gathros/algorithm-archive | contents/split-operator_method/code/haskell/splitOp.hs | mit | 3,358 | 1 | 19 | 912 | 1,468 | 773 | 695 | 85 | 2 |
{-# LANGUAGE GeneralizedNewtypeDeriving, TemplateHaskell #-}
-- | View and Branch have a cyclic dependency. This module
-- | contains the parts of both that both may depend on, to avoid the
-- | cycle.
module Revision.Deltum.Rev.ViewBranchInternal
( ViewData(..), vdBranch
, View(..)
, BranchData(..), brVer... | lamdu/lamdu | src/Revision/Deltum/Rev/ViewBranchInternal.hs | gpl-3.0 | 2,676 | 0 | 11 | 585 | 704 | 397 | 307 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | fmapfmapfmap/amazonka | amazonka-ec2/gen/Network/AWS/EC2/CreateNetworkInterface.hs | mpl-2.0 | 8,148 | 0 | 13 | 1,645 | 1,063 | 635 | 428 | 125 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | fmapfmapfmap/amazonka | amazonka-ec2/gen/Network/AWS/EC2/DeleteVPCPeeringConnection.hs | mpl-2.0 | 5,310 | 0 | 13 | 1,030 | 630 | 378 | 252 | 83 | 1 |
module Propellor.PrivData.Paths where
import Utility.Exception
import System.FilePath
import Control.Applicative
import Prelude
privDataDir :: FilePath
privDataDir = "privdata"
privDataFile :: IO FilePath
privDataFile = allowRelocate $ privDataDir </> "privdata.gpg"
privDataKeyring :: IO FilePath
privDataKeyring = ... | ArchiveTeam/glowing-computing-machine | src/Propellor/PrivData/Paths.hs | bsd-2-clause | 903 | 0 | 12 | 134 | 216 | 115 | 101 | 20 | 2 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
module Database.DSH.SL.SegmentAlgebra where
import Database.Algebra.Dag.Build
import qualified Database.DSH.Common.Lang as L
import Database.DSH.Common.VectorLang
-- | This class defines the segment operators t... | ulricha/dsh | src/Database/DSH/SL/SegmentAlgebra.hs | bsd-3-clause | 5,304 | 0 | 13 | 1,316 | 1,315 | 663 | 652 | 46 | 0 |
{- |
Module : $Header$
Description : translate theories to OWL2
Copyright : (c) C. Maeder, DFKI GmbH 2012
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : non-portable (via Logic.Logic)
-}
module OWL2.CreateOWL where
import C... | keithodulaigh/Hets | OWL2/CreateOWL.hs | gpl-2.0 | 1,752 | 0 | 21 | 479 | 402 | 211 | 191 | 42 | 5 |
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Prompt.DirExec
-- Copyright : (C) 2008 Juraj Hercek
-- License : BSD3
--
-- Maintainer : juhe_xmonad@hck.sk
-- Stability : unstable
-- Portability : unportable
--
-- A directory file executables pro... | kmels/xmonad-launcher | XMonad/Prompt/DirExec.hs | bsd-3-clause | 3,837 | 0 | 17 | 871 | 540 | 310 | 230 | 39 | 2 |
-- |
-- Module: Voting
-- Description: Implementation of the Boyer-Moore Majority Vote Algorithm
-- Copyright: (c) 2011 National Institute of Aerospace / Galois, Inc.
--
-- This is an implementation of the Boyer-Moore Majority Vote Algorithm for
-- Copilot, which solves the majority vote problem in linear time and con... | fredyr/copilot-libraries | src/Copilot/Library/Voting.hs | bsd-3-clause | 3,292 | 0 | 13 | 931 | 543 | 299 | 244 | 33 | 3 |
<?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="fil-PH">
<title>Mga Patakaran ng Aktibong Pag-scan - Beta | Ekstensyon ng ZAP</title>
<maps>
... | thc202/zap-extensions | addOns/ascanrulesBeta/src/main/javahelp/org/zaproxy/zap/extension/ascanrulesBeta/resources/help_fil_PH/helpset_fil_PH.hs | apache-2.0 | 1,020 | 83 | 54 | 167 | 419 | 219 | 200 | -1 | -1 |
module ComplexPatIn1 where
--The application of a function is replaced by the right-hand side of the definition,
--with actual parameters replacing formals.
--In this example, unfold the 't' in 'foo'
--This example aims to test unfolding a complex pattern binding, as well as layout
--adjustment.
main :: Int
main = f... | mpickering/HaRe | old/testing/unfoldDef/ComplexPatIn1_TokOut.hs | bsd-3-clause | 630 | 0 | 15 | 228 | 158 | 91 | 67 | 9 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE BangPatterns #-}
-- | Access files on the filesystem.
module WaiAppStatic.Storage.Filesystem
( -- * Types
ETagLookup
-- * Settings
, defaultWebAppSettings
, defaultFileServerSettings
, webAppSettingsWithLook... | utdemir/wai | wai-app-static/WaiAppStatic/Storage/Filesystem.hs | mit | 6,504 | 0 | 26 | 1,798 | 1,364 | 726 | 638 | 131 | 5 |
module Main where
import Digraph
main = mapM_ print
[ test001
, test002
, test003
, test004
]
-- These check that the result of SCCs doesn't depend on the order of the key
-- type (Int here).
test001 = testSCC [("a", 1, []), ("b", 2, []), ("c", 3, [])]
test002 = testSCC [("a", 2, []), ("b", 3, []), ("c",... | olsner/ghc | testsuite/tests/determinism/determ001/determinism001.hs | bsd-3-clause | 515 | 0 | 8 | 109 | 240 | 149 | 91 | 12 | 1 |
-- |
-- Module : Data.Vector.Fusion.Util
-- Copyright : (c) Roman Leshchinskiy 2009
-- License : BSD-style
--
-- Maintainer : Roman Leshchinskiy <rl@cse.unsw.edu.au>
-- Stability : experimental
-- Portability : portable
--
-- Fusion-related utility types
--
module Data.Vector.Fusion.Util (
Id(..), Box... | ssaavedra/liquidhaskell | benchmarks/vector-0.10.0.1/Data/Vector/Fusion/Util.hs | bsd-3-clause | 1,237 | 0 | 8 | 305 | 266 | 152 | 114 | 21 | 1 |
{-# LANGUAGE QuasiQuotes,
OverloadedStrings #-}
{- |
generate various apply functions for the RTS, for speeding up
function application in the most common cases. The code is generated
because it contains lots of repeating patterns, and to make it more
flexible when changing the RTS (for example ho... | beni55/ghcjs | src/Gen2/RtsApply.hs | mit | 25,059 | 0 | 17 | 9,747 | 2,315 | 1,307 | 1,008 | 173 | 2 |
module Geometry
( sphereVolume
, sphereArea
, cubeVolume
, cubeArea
, cuboidArea
, cuboidVolume
) where
sphereVolume :: Float -> Float
sphereVolume radius = (4.0 / 3.0) * pi * (radius ^ 3)
sphereArea :: Float -> Float
sphereArea radius = 4 * pi * (radius ^ 2)
cubeVolume :: Float -> Float
cubeVolume side ... | fredmorcos/attic | snippets/haskell/Geometry.hs | isc | 726 | 0 | 11 | 155 | 284 | 150 | 134 | 21 | 1 |
module Scheme.PrettyPrint (astDoc, simpleDoc, textDoc) where
import Control.Applicative ((<$>))
import qualified Data.Text as T
import Text.PrettyPrint
import Scheme.Simplified
import Scheme.IR
ttext = text . T.unpack
astDoc ast = case ast of
Number (Num n) -> double n
Ref (Reference name) -> ttext name
... | AKST/scheme.llvm | src/Scheme/PrettyPrint.hs | mit | 1,871 | 0 | 19 | 554 | 724 | 348 | 376 | 53 | 9 |
{-# LANGUAGE OverloadedStrings #-}
import System.Environment
import Data.Time.Clock.POSIX (getPOSIXTime)
import System.IO.Error
import Web.Scotty.Trans
import Network.Wai
import Network.Wai.Middleware.RequestLogger
import Network.HTTP.Types
import Network.HTTP.Authentication.Basic
import Control.Monad
import Control... | keithduncan/logplex-statsd | src/Main.hs | mit | 4,372 | 0 | 25 | 1,009 | 1,223 | 619 | 604 | 101 | 3 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE UndecidableInstances #-}
module Betfair.... | joe9/streaming-betfair-api | src/Betfair/StreamingAPI/Requests/OrderSubscriptionMessage.hs | mit | 2,151 | 0 | 9 | 483 | 264 | 163 | 101 | 43 | 1 |
module Unison.Test.Var where
import EasyTest
import Unison.Symbol (Symbol)
import Unison.Var as Var
test :: Test ()
test = scope "var" $ tests [
scope "free synthetic vars are universally quantifiable" $ tests
[ scope (Var.nameStr v)
(expect $ Var.universallyQuantifyIfFree @Symbol v)
| v <- [ Va... | unisonweb/platform | parser-typechecker/tests/Unison/Test/Var.hs | mit | 634 | 0 | 15 | 194 | 150 | 83 | 67 | -1 | -1 |
module GHCJS.DOM.AudioListener (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/AudioListener.hs | mit | 43 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
-- "Haskell Intensivkurs", Chpt. 17
--f :: String -> Int
--f = length
--g :: Int -> String
--g 1 = "One"
--g 2 = "Two"
--g _ = "Something else"
--f :: String -> (Int, String)
--f s = (length s, "length")
--g :: Int -> (String, String)
--g 1 = ("One", "number")
--g 2 = ("Two", "number")
--g _ = ("Something else", "nu... | maggy96/haskell | smaller snippets/monads/monads.hs | mit | 716 | 0 | 9 | 174 | 245 | 142 | 103 | 10 | 1 |
-----------------------------------------------------------------------------
--
-- Module : Language.PureScript.Sugar.TypeClasses
-- Copyright : (c) 2013-15 Phil Freeman, (c) 2014-15 Gary Burgess
-- License : MIT (http://opensource.org/licenses/MIT)
--
-- Maintainer : Phil Freeman <paf31@cantab.net>
--... | michaelficarra/purescript | src/Language/PureScript/Sugar/TypeClasses.hs | mit | 12,879 | 0 | 28 | 2,393 | 2,897 | 1,506 | 1,391 | 145 | 8 |
{-|
Module : Web.Facebook.Messenger.Types.Callbacks.CheckoutUpdate
Copyright : (c) Felix Paulusma, 2016
License : MIT
Maintainer : felix.paulusma@gmail.com
Stability : semi-experimental
This callback enables you to update pricing for flexible-amount transactions on the checkout dialog displayed by the `B... | Vlix/facebookmessenger | src/Web/Facebook/Messenger/Types/Callbacks/CheckoutUpdate.hs | mit | 2,904 | 0 | 21 | 701 | 403 | 220 | 183 | 35 | 0 |
{-# language GADTs #-}
{-# language BangPatterns #-}
{-# language DeriveFunctor #-}
{-# language PatternGuards #-}
{-# language EmptyDataDecls #-}
{-# language PatternSynonyms #-}
module Unison.Runtime.MCode
( Args'(..)
, Args(..)
, RefNums(..)
, MLit(..)
, Instr(..)
, Section(.., MatchT, MatchW)
, Comb(... | unisonweb/platform | parser-typechecker/src/Unison/Runtime/MCode.hs | mit | 44,817 | 2 | 18 | 10,472 | 13,529 | 6,887 | 6,642 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{- |
Module : $Header$
Description : ADT describing a project.
Author : Nils 'bash0r' Jonsson
Copyright : (c) 2015 Nils 'bash0r' Jonsson
License : MIT
Maintainer : aka.bash0r@gmail.com
Stability : unstable
Portability : non-portable (Portability is unteste... | aka-bash0r/multi-cabal | src-lib/Data/Model/Project.hs | mit | 1,054 | 0 | 13 | 290 | 157 | 88 | 69 | 18 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.