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 OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where
-------------------------------------------------------------------------------
import Control.Lens hiding (elements)
import Control.Monad
import Control.Monad.Trans
import qualified Data.Configurator ... | Soostone/charade | src/Charade.hs | bsd-3-clause | 2,431 | 0 | 15 | 635 | 465 | 245 | 220 | 50 | 1 |
{- |
Module : TestPuffyToolsJournal
Description : Test the PuffyTools journal functions
Copyright : 2014, Peter Harpending
License : BSD3
Maintainer : Peter Harpending <pharpend2@gmail.com>
Stability : experimental
Portability : Linux
-}
module TestPuffyToolsJournal where
import Contro... | pharpend/puffytools | test/TestPuffyToolsJournal.hs | bsd-3-clause | 3,172 | 0 | 11 | 936 | 547 | 311 | 236 | 49 | 1 |
-- Copyright (c) 2006-2010
-- The President and Fellows of Harvard College.
--
-- 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 copyright
-- notice... | HIPERFIT/language-c-quote | Language/C/Syntax.hs | bsd-3-clause | 20,604 | 0 | 10 | 6,670 | 6,370 | 3,208 | 3,162 | 747 | 6 |
-- 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. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
module Duckling.T... | rfranek/duckling | tests/Duckling/Temperature/Tests.hs | bsd-3-clause | 1,192 | 0 | 7 | 178 | 211 | 151 | 60 | 28 | 1 |
module Main where
import Music.Prelude.CmdLine
main = converterMain "writeMusicXml" "xml"
| music-suite/music-preludes | tools/music2musicxml.hs | bsd-3-clause | 93 | 0 | 5 | 13 | 20 | 12 | 8 | 3 | 1 |
module Model where
import Prelude
import Yesod
import Data.Text (Text)
import Database.Persist.Quasi
import Data.Time
import Data.Int (Int64)
newtype Identifier = Identifier Text
deriving (Read, Show, Eq, PathPiece, PersistField)
-- You can define all of your database entities in the entities file.
-- You can find... | ehamberg/rssqueue | Model.hs | bsd-3-clause | 546 | 0 | 8 | 75 | 105 | 60 | 45 | -1 | -1 |
module Frenetic.Slices.Compile
( -- * Compilation
transform
, transformEdge
, dynTransform
, compileSlice
, edgeCompileSlice
-- * Internal tools
, modifyVlan
, setVlan
, matchesSwitch
) where
import Control.Monad
import Frenetic.Common
import qualified Data.Map as Map
import qualified Data.Set ... | frenetic-lang/netcore-1.0 | src/Frenetic/Slices/Compile.hs | bsd-3-clause | 11,996 | 0 | 20 | 2,731 | 3,004 | 1,538 | 1,466 | -1 | -1 |
{- OPLSS, Summer 2013 -}
{-# LANGUAGE GADTs, NamedFieldPuns, FlexibleContexts, ViewPatterns, RankNTypes #-}
{-# OPTIONS_GHC -Wall -fno-warn-unused-matches #-}
-- | Utilities for managing a typechecking context.
module Environment
(
TcMonad, runTcMonad,
Env,Hint(..),
emptyEnv,
lookupTy, lookupTyMaybe... | jonsterling/ETT-Lite | src/Environment.hs | bsd-3-clause | 9,542 | 0 | 17 | 2,424 | 3,013 | 1,585 | 1,428 | 181 | 6 |
{-# language MultiParamTypeClasses#-}
{-# language TemplateHaskell#-}
{-# language ScopedTypeVariables#-}
{-# language ViewPatterns#-}
{-# language FlexibleInstances#-}
{-# language DeriveFunctor#-}
{-# language StandaloneDeriving#-}
{-# language GADTs#-}
{-# language NoMonomorphismRestriction#-}
{-# language Flexible... | paolino/HDynTs | src/executables/Console.hs | bsd-3-clause | 3,639 | 0 | 24 | 1,014 | 1,325 | 680 | 645 | 82 | 8 |
{-# LANGUAGE ScopedTypeVariables #-}
module GhcUtilsSpec (main, spec) where
import Test.Hspec
import TestUtils
import qualified GHC as GHC
import qualified Data.Generics as SYB
import qualified GHC.SYB.Utils as SYB
import Language.Haskell.GHC.ExactPrint.Utils
import Language.Haskell.Refact... | kmate/HaRe | test/GhcUtilsSpec.hs | bsd-3-clause | 3,069 | 0 | 30 | 734 | 959 | 531 | 428 | 64 | 2 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section{@Vars@: Variables}
-}
{-# LANGUAGE CPP, DeriveDataTypeable, MultiWayIf #-}
-- |
-- #name_types#
-- GHC uses several kinds of name internally:
--
-- * 'OccName.OccName': see "OccName#name_types"
--
-- * 'RdrName.R... | tjakway/ghcjvm | compiler/basicTypes/Var.hs | bsd-3-clause | 17,675 | 0 | 19 | 4,931 | 2,872 | 1,597 | 1,275 | 230 | 1 |
module Wash.Locking (obtainLock, releaseLock) where
import Wash.Auxiliary
import Directory
import IO
import System
obtainLock :: FilePath -> IO ()
releaseLock :: FilePath -> IO ()
lockPath name = name ++ ".lockdir"
obtainLock name =
assertDirectoryExists (lockPath name)
(system "sleep 1" ... | florianpilz/autotool | src/Wash/Locking.hs | gpl-2.0 | 394 | 0 | 8 | 83 | 117 | 61 | 56 | 13 | 1 |
module Utils (v3toGL, transMatrix) where
import Linear
import qualified Graphics.Rendering.OpenGL as GL
v3toGL :: V3 Double -> V3 GL.GLfloat
v3toGL x = fmap realToFrac x
transMatrix :: V3 Double -> M44 GL.GLfloat
transMatrix pos =
mkTransformation
(axisAngle (V3 1 1 1) (realToFrac 0)) (v3toGL pos)
| sgillis/HaskHull | src/Utils.hs | gpl-3.0 | 314 | 0 | 9 | 60 | 114 | 60 | 54 | 9 | 1 |
import System.Process
import System.IO
import System.Posix
import System.Exit
tmpfile = "process007.tmp"
main = do
writeFile tmpfile "You bad pie-rats!\n"
fd <- handleToFd =<< openFile tmpfile ReadMode
rawSystem "./process007_fd" [show fd]
closeFd fd
fd <- handleToFd =<< openFile tmpfile ReadMode
nul <-... | DavidAlphaFox/ghc | libraries/process/tests/process007.hs | bsd-3-clause | 661 | 0 | 14 | 183 | 199 | 95 | 104 | 20 | 2 |
-- Copyright (c) 2015 Eric McCorkle. 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. Redistributions of source code must retain the above copyright
-- notice, this list of conditi... | emc2/chill | src/IR/FlatIR/Location.hs | bsd-3-clause | 2,130 | 0 | 9 | 385 | 87 | 64 | 23 | 14 | 0 |
{-# language GADTSyntax #-}
{-# language KindSignatures #-}
{-# language UnliftedFFITypes #-}
{-# language ForeignFunctionInterface #-}
{-# language MagicHash #-}
{-# language UnboxedTuples #-}
-- Test for shims when passing an array of unlifted values
-- to a foreign function.
-- See test T16650a for more commentary.... | sdiehl/ghc | testsuite/tests/ffi/should_run/T16650b.hs | bsd-3-clause | 2,322 | 1 | 14 | 421 | 593 | 305 | 288 | -1 | -1 |
mingle :: String -> String -> String
mingle [] [] = []
mingle (p:ps) (q:qs) = p:q:mingle ps qs
main = do
a <- getLine
b <- getLine
putStrLn $ mingle a b
| EdisonAlgorithms/HackerRank | practice/fp/recursion/string-mingling/string-mingling.hs | mit | 167 | 0 | 8 | 47 | 98 | 48 | 50 | 7 | 1 |
module Rushhour.Quiz where
import qualified Rushhour.Data as I
import qualified Rushhour.Config as C
import Rushhour.Solve
import Autolib.Util.Zufall
import Autolib.Util.Sort
import Autolib.FiniteMap
import Autolib.ToDoc
import Data.Array
import Control.Monad
import System.IO
roll0 c = do
( i, (k,zs) : _ ) <-... | florianpilz/autotool | src/Rushhour/Quiz.hs | gpl-2.0 | 5,212 | 2 | 21 | 1,939 | 2,236 | 1,101 | 1,135 | 142 | 3 |
module Robots.QSearch where
import Robots.Solver
import Robots.Config
import Robots.Data
import Robots.Examples
import Autolib.Util.Hide
import Autolib.ToDoc
import Control.Monad ( guard, when )
import Data.Set ( Set )
import Data.Maybe
import qualified Data.Set as S
import System.IO
search :: Ord a
=> ( a -... | Erdwolf/autotool-bonn | src/Robots/QSearch.hs | gpl-2.0 | 2,279 | 15 | 21 | 882 | 911 | 478 | 433 | 57 | 2 |
-------------------------------------------------------------------------------
-- |
-- Module : System.Hardware.Haskino.ShallowDeepPlugin.Utils
-- Copyright : (c) University of Kansas
-- License : BSD3
-- Stability : experimental
--
-- Shallow Deep Plugin Utility Functions
----------------------------... | ku-fpg/kansas-amber | System/Hardware/Haskino/ShallowDeepPlugin/Utils.hs | bsd-3-clause | 18,678 | 0 | 26 | 6,520 | 4,413 | 2,283 | 2,130 | 389 | 9 |
module Timing
( time, showTime, prettyTime
, wallTime, cpuTime, milliseconds)
where
import System.CPUTime
import System.Time
import Debug.Trace
-- Time -----------------------------------------------------------------------
data Time
= Time
{ cpu_time :: Integer
, wall_time :: Integer
}
... | agremm/Matryoshka | examples/lib/Timing.hs | bsd-3-clause | 1,769 | 14 | 11 | 433 | 502 | 266 | 236 | 47 | 1 |
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies,
FlexibleInstances, FlexibleContexts, UndecidableInstances #-}
-- Example of improvement, due to George Russel
module Folders where
data Folder = Folder
newtype SB x = SB x
newtype SS x = SS ... | oldmanmike/ghc | testsuite/tests/typecheck/should_compile/tc181.hs | bsd-3-clause | 1,271 | 2 | 12 | 284 | 328 | 174 | 154 | 24 | 1 |
{-# LANGUAGE TemplateHaskell, TypeOperators #-}
module T7667 where
import Language.Haskell.TH
$( return [ TySynD (mkName "+") [PlainTV (mkName "a"), PlainTV (mkName "b")]
(AppT (AppT (ConT ''Either) (VarT $ mkName "a")) (VarT $ mkName "b")) ] ) | urbanslug/ghc | testsuite/tests/th/T7667.hs | bsd-3-clause | 266 | 0 | 16 | 57 | 105 | 54 | 51 | 5 | 0 |
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
-- |
-- Module : Network.Policy.Client
-- Copyright : (c) 2014 Stefan Bühler
-- License : MIT-style (see the file COPYING)
--
-- Maintainer : stbuehler@web.de
-- Stability : experimental
... | stbuehler/haskell-mail-policy | src/Network/Policy/Client.hs | mit | 1,863 | 8 | 16 | 293 | 339 | 183 | 156 | 28 | 4 |
module Timeline.Parser.Graph
( barParser
, lineParser
, scatterPlotParser
, stackedBarParser
, boxPlotParser
) where
import Data.Text (Text)
import qualified Data.Text as T
import Text.Megaparsec
import Text.Megaparsec.Text
import Timeline.Parser.Internal... | joshuaclayton/timeline | src/Timeline/Parser/Graph.hs | mit | 2,244 | 0 | 13 | 432 | 582 | 307 | 275 | 48 | 2 |
module Sequences.Geometric (
recGeoSequence,
expGeoSequence
) where
import Sequences.General
recGeoSequence :: (Real a) => a -> a -> Sequence a
recGeoSequence a0 q = recSequence a0 (*q)
expGeoSequence :: (Real a) => a -> a -> Sequence a
expGeoSequence a0 q = expSequence (\n -> a0 * q^n)
| DevWurm/numeric-sequences-haskell | src/Sequences/Geometric.hs | mit | 299 | 0 | 9 | 59 | 117 | 63 | 54 | 8 | 1 |
module CFDI.Types.CompanyRfc where
import CFDI.Chainable
import CFDI.Types.Type
import Data.Text (Text, pack, unpack)
import Text.Regex (mkRegex)
import Text.Regex.Posix (matchTest)
newtype CompanyRfc = CompanyRfc Text deriving (Eq, Show)
instance Chainable CompanyRfc where
chain (CompanyRfc r) = r
i... | yusent/cfdis | src/CFDI/Types/CompanyRfc.hs | mit | 774 | 0 | 9 | 188 | 177 | 94 | 83 | 16 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Qwu.Html.NewPost where
import Control.Monad
import Lucid
newPost :: Monad m => HtmlT m ()
newPost =
form_ [action_ "/newpost", method_ "post"]
(div_ [class_ "newPostForm"]
(do (textarea_ [name_ "msg"
,rows_ "10"
,cols_ "50"]... | bryangarza/qwu | src/Qwu/Html/NewPost.hs | mit | 434 | 0 | 16 | 131 | 134 | 69 | 65 | 14 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
module Data.Track.Log where
import Control.DeepSeq
import Control.Lens
import Data.Aeson
import Data.Data
import Data.Text
import Data.Time
import Data.Track.Rules
import ... | AndrewRademacher/track | src/Data/Track/Log.hs | mit | 658 | 0 | 8 | 203 | 137 | 80 | 57 | 20 | 0 |
{-# LANGUAGE NoImplicitPrelude #-}
{- |
Generate XML-isomorphic types from declarative descriptions.
There are two kinds of XML-isomorphic types: enumerations and records.
Enumerations are simple enum-types generated via "Data.THGen.Enum"
plus a `FromContent` instance and a `ToXML` instance which are derived
from `R... | typeable/xml-isogen | src/Data/THGen/XML.hs | mit | 3,542 | 2 | 5 | 730 | 150 | 109 | 41 | 27 | 0 |
module Main where
import Haste
import Haste.DOM
import Haste.Events
import ProcNum
main = withElems ["fv","ty","r","result"] calculator
calculator [fv,ty,r,result] = do
onEvent fv KeyUp $ \_ -> recalculate
onEvent ty KeyUp $ \_ -> recalculate
onEvent r Change $ \_ -> recalculate
where
recalculate... | CodiePP/Hedge-o-Mat | hs/src/calculators/presentv/calculator.hs | mit | 678 | 0 | 15 | 195 | 275 | 140 | 135 | 19 | 2 |
{-# LANGUAGE RecordWildCards #-}
module Language.PureScript.Docs.AsMarkdown (
renderModulesAsMarkdown
) where
import Control.Monad.Writer hiding (First)
import Data.Foldable (for_)
import Data.List (partition)
import qualified Language.PureScript as P
import Language.PureScript.Docs.Types
import Language.PureScri... | michaelficarra/purescript | src/Language/PureScript/Docs/AsMarkdown.hs | mit | 3,253 | 0 | 15 | 690 | 957 | 499 | 458 | 90 | 6 |
-- | Internal helpers that provide strict atomic MutVar access.
--
-- These functions allow us to avoid the overhead of MVar as long
-- as we can factor the impure sections of code out in such a way
-- that the pure metric calculations can be executed without requiring
-- access to multiple MutVars at a time.
module Da... | iand675/metrics | src/Data/Metrics/Internal.hs | mit | 1,708 | 0 | 18 | 364 | 465 | 251 | 214 | 27 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-containerdefinitions.html
module Stratosphere.ResourceProperties.ECSTaskDefinitionContaine... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/ECSTaskDefinitionContainerDefinition.hs | mit | 20,747 | 0 | 13 | 1,513 | 2,686 | 1,526 | 1,160 | 174 | 1 |
-- Copyright (c) 2016-present, SoundCloud Ltd.
-- All rights reserved.
--
-- This source code is distributed under the terms of a MIT license,
-- found in the LICENSE file.
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
module Kubern... | soundcloud/haskell-kubernetes | lib/Kubernetes/Model/V1/ResourceRequirements.hs | mit | 1,643 | 0 | 14 | 428 | 275 | 166 | 109 | 31 | 1 |
module Language.SexpGrammar.Generic
( -- * GHC.Generics helpers
with
, match
, Coproduct (..)
) where
import Data.InvertibleGrammar.Generic
| ricardopenyamari/ir2haskell | clir-parser-haskell-master/lib/sexp-grammar/src/Language/SexpGrammar/Generic.hs | gpl-2.0 | 154 | 0 | 5 | 31 | 29 | 20 | 9 | 6 | 0 |
{- |
Module : ./Static/PrintDevGraph.hs
Description : pretty printing (parts of) a LibEnv
Copyright : (c) C. Maeder, Uni Bremen 2002-2006
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : non-portable(DevGraph)
pretty printing (... | gnn/Hets | Static/PrintDevGraph.hs | gpl-2.0 | 13,455 | 3 | 28 | 3,325 | 4,241 | 2,096 | 2,145 | 344 | 27 |
{- |
Module : ./HolLight/HolLight2DG.hs
Description : Import data generated by hol2hets into a DG
Copyright : (c) Jonathan von Schroeder, DFKI GmbH 2010
License : GPLv2 or higher, see LICENSE.txt
Maintainer : jonathan.von_schroeder@dfki.de
Stability : experimental
Portability : portable
-}
modul... | gnn/Hets | HolLight/HolLight2DG.hs | gpl-2.0 | 15,052 | 3 | 28 | 4,289 | 5,677 | 2,890 | 2,787 | 383 | 9 |
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
module Rewriting.Apply where
import Rewriting.Derive.Instance
import Autolib.Reporter
import Autolib.ToDoc
class Apply tag system object action | tag -> system object action where
-- | default instance
example :: tag -> Instance system object
... | Erdwolf/autotool-bonn | src/Rewriting/Apply.hs | gpl-2.0 | 544 | 0 | 11 | 136 | 107 | 61 | 46 | 11 | 0 |
{- | Module : $Header$
- Description : Implementation of logic instance Graded Modal Logic
- Copyright : (c) Daniel Hausmann & Georgel Calin & Lutz Schroeder, DFKI Lab Bremen,
- Rob Myers & Dirk Pattinson, Department of Computing, ICL
- License : GPLv2 or higher, see LICENSE.txt
- Mai... | nevrenato/Hets_Fork | GMP/versioning/gmp-coloss-0.0.3/GMP/Logics/G.hs | gpl-2.0 | 4,828 | 6 | 27 | 1,286 | 1,812 | 974 | 838 | -1 | -1 |
main = do
putStrLn "Your name bro?"
name <- getLine
print ("Hey dude " ++ name ++ ", you rock!")
| ThePaul51/Paul-repo | hellodude.hs | gpl-3.0 | 100 | 0 | 10 | 23 | 36 | 16 | 20 | 4 | 1 |
{-
Copyright (C) 2017-2018 defanor <defanor@uberspace.net>
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
(at your option) any later version.
This program is dis... | defanor/pancake | Pancake/Rendering.hs | gpl-3.0 | 21,441 | 0 | 23 | 6,342 | 6,833 | 3,459 | 3,374 | 437 | 16 |
{-# LANGUAGE OverloadedStrings, DeriveGeneric #-}
module System.DevUtils.MySQL.Helpers.Tables.JSON (
) where
import System.DevUtils.MySQL.Helpers.Tables.Include (Tables(..))
import Data.Aeson (FromJSON, ToJSON, decode, encode)
instance FromJSON Tables
instance ToJSON Tables
| adarqui/DevUtils-MySQL | src/System/DevUtils/MySQL/Helpers/Tables/JSON.hs | gpl-3.0 | 277 | 0 | 6 | 27 | 65 | 42 | 23 | 6 | 0 |
module Calculusbot.Simplify where
import Calculusbot.LanguageDef
simplify :: CBExpr -> CBExpr
simplify (BinExpr Plus (Const (IntLit x)) (Const (IntLit y))) = (Const (IntLit (x + y)))
simplify (BinExpr Plus l r)
| sr == (Const (IntLit 0)) = sl
| sl == (Const (IntLit 0)) = sr
| otherwise ... | BenedictEggers/calculusbot | src/Calculusbot/Simplify.hs | gpl-3.0 | 1,998 | 0 | 12 | 688 | 952 | 467 | 485 | 43 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/TargetTCPProxies/Insert.hs | mpl-2.0 | 4,579 | 0 | 16 | 1,006 | 484 | 292 | 192 | 77 | 1 |
module Codewars.Kata.SumString where
data Token = TChar Char
| TInt Int
| TStr String
deriving (Eq, Show)
--
alpha, digit :: String
alpha = ['a'..'z'] ++ ['A'..'Z']
digit = ['0'..'9']
tokenize :: String -> [Token]
tokenize [] = []
tokenize xxs@(c:cs)
| c `elem` "-+*/()[]" = TChar c... | ice1000/OI-codes | codewars/1-100/sum-up-the-random-string.hs | agpl-3.0 | 733 | 0 | 12 | 229 | 330 | 175 | 155 | 22 | 2 |
-- |
-- Copyright : (c) 2012 Daniël de Kok
-- License : BSD3
--
-- Maintainer : Daniël de Kok <me@danieldk.eu>
-- Stability : experimental
--
-- The more tests that are applied on a dataset, the more likely it becomes
-- that a Type I error occurs (rejecting the null hypothesis when it is
-- true). This module pro... | danieldk/approx-rand-test | src/Statistics/Test/Correction.hs | apache-2.0 | 1,431 | 0 | 9 | 288 | 155 | 97 | 58 | 15 | 1 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE BangPatterns #-}
module Spark.Core.RowToSQLSpec where
import qualified Data.Vector as V
import GHC.Generics (Generic)
import Test.Hspec
import Spark.Core.Types
import Spark.Core.Row
data TestStruct1 = Test... | tjhunter/karps | haskell/test/Spark/Core/RowToSQLSpec.hs | apache-2.0 | 1,994 | 0 | 16 | 478 | 730 | 378 | 352 | 51 | 1 |
module FreePalace.GUI.Initialize where
import FreePalace.Domain.GUI
import qualified FreePalace.Domain.Net as Net
initializeGUI :: Components -> (Net.Hostname -> Net.PortId -> IO ()) -> IO ()
initializeGUI guiComponents handler =
do
setUpMainWindow guiComponents
setUpConnectDialog guiComponents ha... | psfblair/freepalace | src/FreePalace/GUI/Initialize.hs | apache-2.0 | 1,240 | 0 | 14 | 244 | 310 | 148 | 162 | 29 | 1 |
-----------------------------------------------------------------------------
-- Copyright 2012 Microsoft Corporation.
--
-- This is free software; you can redistribute it and/or modify it under the
-- terms of the Apache License, Version 2.0. A copy of the License can be
-- found in the file "license.txt" at the root ... | lpeterse/koka | src/Backend/JavaScript/FromCore.hs | apache-2.0 | 42,627 | 0 | 29 | 16,378 | 10,937 | 5,428 | 5,509 | 764 | 21 |
-- | Basic low-level GL wrapper and reference.
module Graphics.GL.Low (
-- * Overview
-- | This library exposes a simplified subset of OpenGL that I hope is
-- complete enough for following tutorials and making simple games or demos.
--
-- For a whirlwind tour of the machinery behind GL see the module:
-- ... | evanrinehart/lowgl | Graphics/GL/Low.hs | bsd-2-clause | 3,783 | 0 | 5 | 677 | 533 | 384 | 149 | 117 | 0 |
module Emulator.Video.BitmapModes where
import Emulator.Memory
import Emulator.Types
import Emulator.Video.Util
import Emulator.Video.Palette
import Emulator.Video.VideoController
import Data.Array.IArray
bitmapModes :: AddressIO m => LCDControl -> m [ScreenObj]
bitmapModes cnt = do
bgCNT <- recordBGControl 0x0400... | intolerable/GroupProject | src/Emulator/Video/BitmapModes.hs | bsd-2-clause | 2,549 | 0 | 13 | 443 | 978 | 516 | 462 | 47 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module KATOCB3 where
import qualified Data.ByteString as B
import Data.ByteString.Char8 ()
-- (key, iv, aad, input, out, taglen, tag)
type KATOCB3 = (B.ByteString, B.ByteString, B.ByteString, B.ByteString, B.ByteString, Int, B.ByteString)
key1 = "\x00\x01\x02\x03\x04\x05\x06\x07\... | vincenthz/hs-cipher-aes | Tests/KATOCB3.hs | bsd-3-clause | 1,735 | 0 | 6 | 340 | 233 | 155 | 78 | 43 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveGeneric #-}
{-# OPTIONS_GHC -funbox-strict-fields #-}
module Tinfoil.Data.KDF(
Credential(..)
, CredentialHash(..)
, KDF(..)
, MCFHash(..)
, MCFPrefix(..)
, NeedsRehash(..)
, Ver... | ambiata/tinfoil | src/Tinfoil/Data/KDF.hs | bsd-3-clause | 3,562 | 0 | 15 | 682 | 742 | 427 | 315 | 86 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeOperators #-}
module Data.Vector.Vinyl.Default.NonEmpty.Monomorphic.Join where
import Control.Monad (guard)
import Control.Monad.Pri... | andrewthad/vinyl-vectors | src/Data/Vector/Vinyl/Default/NonEmpty/Monomorphic/Join.hs | bsd-3-clause | 9,352 | 0 | 27 | 3,336 | 3,092 | 1,567 | 1,525 | -1 | -1 |
-- Programatica Front-End Commands, level 1
module Pfe1Cmds where
import Prelude hiding (putStr,putStrLn,print)
import Pfe0Cmds(pfe0Cmds,runPFE0Cmds)
import PfeParse(moduleArg,fileArg,filename,( #@ ), (<@),kwOption)
import PFE0(pput,lex0SourceFile,preparseSourceFile,findFile)
import DefinedNames
import FreeNames
impor... | forste/haReFork | tools/pfe/Pfe1Cmds.hs | bsd-3-clause | 1,904 | 0 | 12 | 327 | 520 | 293 | 227 | -1 | -1 |
module Position
( Position (getX, getY)
, position
, unPosition
, row
, rows
, positionsByRow
, column
, columns
, positionsByColumn
, axis
) where
import Data.Array (Ix)
import Axis (Axis(Column, Row))
import Coordinate (Coordinate, coordinate, coordinates, unCoordinate)
-- A Position on a 5x5... | jameshales/voltorb-flip | src/Position.hs | bsd-3-clause | 2,122 | 0 | 11 | 430 | 543 | 308 | 235 | 46 | 1 |
{-# LANGUAGE QuasiQuotes #-}
module Main where
import Text.Printf.Safe (fmt, printf)
main = do
putStrLn $ printf [fmt|1 + 2 = %d and 0 == 1 is %S.|] (1 + 2) (0 == 1)
putStrLn $ printf [fmt|42 is %010b in binary.|] 42
putStrLn $ printf [fmt|48%% of people answers that the negation of True is %{show . not}.|] True... | konn/safe-printf | examples/quasi.hs | bsd-3-clause | 321 | 0 | 10 | 67 | 88 | 52 | 36 | 7 | 1 |
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
-- | This module provides XML pic... | Philonous/xml-picklers | src/Data/XML/Pickle.hs | bsd-3-clause | 38,996 | 0 | 21 | 12,660 | 9,041 | 4,827 | 4,214 | 607 | 7 |
{-# LANGUAGE CPP, ExistentialQuantification, MultiParamTypeClasses, FlexibleInstances, Rank2Types, BangPatterns, KindSignatures, GADTs, ScopedTypeVariables #-}
-- |
-- Module : Data.Vector.Fusion.Stream.Monadic
-- Copyright : (c) Roman Leshchinskiy 2008-2010
-- License : BSD-style
--
-- Maintainer : Roman ... | hvr/vector | Data/Vector/Fusion/Stream/Monadic.hs | bsd-3-clause | 52,317 | 0 | 20 | 19,453 | 15,858 | 7,987 | 7,871 | 890 | 9 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE... | silkapp/bloodhound | src/Database/Bloodhound/Types.hs | bsd-3-clause | 81,736 | 0 | 17 | 25,337 | 16,884 | 9,316 | 7,568 | 1,676 | 16 |
-----------------------------------------------------------------------------
-- |
-- Module : Generics.Pointless.Observe.Functors
-- Copyright : (c) 2008 University of Minho
-- License : BSD3
--
-- Maintainer : hpacheco@di.uminho.pt
-- Stability : experimental
-- Portability : non-portable
--
-- P... | d-day/relation | include/pointfree-style/pointless-haskell-0.0.8/src/Generics/Pointless/Observe/Functors.hs | bsd-3-clause | 4,814 | 0 | 17 | 998 | 1,949 | 1,012 | 937 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
module VYPe15.Internal.Lexer
where
import Data.Bool (Bool(False))
import Data.Monoid ((<>))
import Text.Parsec (alphaNum, char, letter, oneOf, (<|>))
import Text.Parsec.Language (LanguageDef, emptyDef)
import Text.Parsec.Token
( ... | Tr1p0d/VYPe15 | src/VYPe15/Internal/Lexer.hs | bsd-3-clause | 2,030 | 0 | 8 | 614 | 452 | 290 | 162 | 65 | 1 |
graph :: [[Integer]]
graph =
[ [75]
, [95,64]
, [17,47,82]
, [18,35,87,10]
, [20,04,82,47,65]
, [19,01,23,75,03,34]
, [88,02,77,73,07,63,67]
, [99,65,04,28,06,16,70,92]
, [41,41,26,56,83,40,80,70,33]
, [41,48,72,33,47,32,37,16,94,29]
, [53,71,44,65,25,43,91,52,97,51,14]
, [70,11,33,28,77,73,17,78,39,68,17,... | bgwines/project-euler | src/solved/problem18.hs | bsd-3-clause | 1,007 | 15 | 11 | 150 | 633 | 396 | 237 | 32 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Control.Concurrent.STM.TSem
-- Copyright : (c) The University of Glasgow 2012
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libraries@haskell.org
-- Stability : experiment... | gridaphobe/packages-stm | Control/Concurrent/STM/TSem.hs | bsd-3-clause | 1,692 | 0 | 9 | 303 | 245 | 140 | 105 | 19 | 1 |
module Day6 where
import Test.Hspec
import Data.List (transpose, sortOn)
import Utils
-- utils
countString s = sortOn (flip count s) ['a' .. 'z']
-- FIRST problem
day = map (last . countString) . transpose
-- SECOND problem
day' = map (head . countString) . transpose
-- tests and data
test = hspec $ do
describ... | guibou/AdventOfCode2016 | src/Day6.hs | bsd-3-clause | 582 | 0 | 15 | 121 | 186 | 98 | 88 | 16 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
module ControllerPostActions where
import Control.Monad
import Control.Monad.Trans
import Data.List (isInfixOf)
import qualified Data.ByteString.Char8 as B
import Control.Monad.Error
import System.FilePath (takeFileName)
import HAppS.Server
import HAppS.Helpers
import StateStuff... | tphyahoo/happs-tutorial | src/ControllerPostActions.hs | bsd-3-clause | 9,876 | 0 | 32 | 2,839 | 1,893 | 950 | 943 | 128 | 5 |
x = concatMap show [1..]
y = [x!!0, x!!9, x!!99, x!!999, x!!9999, x!!99999, x!!999999]
result = product $ map (\z->read [z]) y :: Int
main :: IO ()
main = print result
| stulli/projectEuler | eu40.hs | bsd-3-clause | 171 | 0 | 10 | 35 | 117 | 64 | 53 | 5 | 1 |
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 704
{-# LANGUAGE Trustworthy #-}
#endif
--------------------------------------------------------------------------------
-- |
-- Module : System.USB.Devices
-- Copyright : (c) 2009–2014 Bas van Dijk
-- License : BSD3 (see the file LICENSE)
-- Maintainer : ... | alex1818/usb | System/USB/DeviceHandling.hs | bsd-3-clause | 1,319 | 0 | 4 | 291 | 99 | 73 | 26 | 25 | 0 |
{-# LANGUAGE MultiParamTypeClasses,
FlexibleInstances,
OverloadedStrings #-}
module Text.KIF where
import Numeric
import Text.Twine
data KIFTest = KIFTest {
noOfScenarios :: Int,
noOfFailures :: Int,
testDuration :: Float,
scenarios :: [KIFScenario]
}
deriving (Eq, Show)
data KIF... | plancalculus/kif-parser | Text/KIF.hs | bsd-3-clause | 2,838 | 0 | 12 | 609 | 802 | 424 | 378 | 70 | 1 |
{-# LANGUAGE TemplateHaskell, TypeFamilies #-}
module Test.LazySmallCheck2012.TH (deriveSerial, deriveArgument, viewPretty, viewRaw) where
import Control.Applicative
import Control.Monad
import Data.Generics.Uniplate.Data
import Data.List
import Language.Haskell.TH
import Test.LazySmallCheck2012.Core
import Test.Lazy... | UoYCS-plasma/LazySmallCheck2012 | Test/LazySmallCheck2012/TH.hs | bsd-3-clause | 4,616 | 6 | 22 | 1,234 | 1,641 | 832 | 809 | -1 | -1 |
import System.IO (hSetEcho,stdin)
import Text.Read (readMaybe)
import Network.Transport.InMemory (createTransport)
import Control.Distributed.Process.Node (LocalNode,newLocalNode,initRemoteTable,forkProcess,runProcess)
import Control.Distributed.Process (Process,ProcessId,send,receiveWait,match,getSelfPid,expectTimeou... | mitsuji/exp-CloudHaskell | app/ConsoleAsk.hs | bsd-3-clause | 2,350 | 1 | 19 | 595 | 852 | 425 | 427 | 63 | 4 |
{-# LANGUAGE FlexibleContexts #-}
module PatternRecogn.Gauss.Classify(
ClassificationParam,
calcClassificationParams,
classify,
infoStringForParam
) where
import PatternRecogn.Lina
import PatternRecogn.Gauss.Utils
import PatternRecogn.Gauss.Types
import PatternRecogn.Types
import PatternRecogn.Utils
import Data.... | EsGeh/pattern-recognition | src/PatternRecogn/Gauss/Classify.hs | bsd-3-clause | 1,607 | 50 | 16 | 273 | 456 | 252 | 204 | 46 | 1 |
{-
foo
bar
a) foo
foo
<ESC>a b) bar
bar
baa
-}
{-
foo
bar
* @foo
* @bar
<ESC>abaa
-}
{-
foo
bar
> foo
> bar
<ESC>abaa
-}
| itchyny/vim-haskell-indent | test/comment/list.in.hs | mit | 130 | 0 | 2 | 39 | 5 | 4 | 1 | 1 | 0 |
{- |
Module : ./FreeCAD/HetPrinter.hs
Description : print the HasCASL representation of FreeCAD terms
Copyright : (c) Robert Savu and Uni Bremen 2011
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Robert.Savu@dfki.de
Stability : experimental
Portability : portable
Printing of the HasCASL... | spechub/Hets | FreeCAD/HetPrinter.hs | gpl-2.0 | 3,575 | 0 | 12 | 680 | 1,300 | 667 | 633 | 53 | 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-cognito-sync/gen/Network/AWS/CognitoSync/SubscribeToDataset.hs | mpl-2.0 | 5,366 | 0 | 13 | 1,101 | 712 | 429 | 283 | 94 | 1 |
module Data.Discrimination
(
-- * Discrimination
Discriminating(..)
-- * Unordered
, Group(..)
, Grouping(..)
, Grouping1(..)
, nub
, nubWith
, group
, groupWith
, runGroup
-- , groupingBag
-- , groupingSet
, groupingEq
-- * Ordered
, Sort(..)
, Sorting(..)
, Sorting1(..)
, de... | markus1189/discrimination | src/Data/Discrimination.hs | bsd-2-clause | 727 | 0 | 5 | 182 | 157 | 109 | 48 | 37 | 0 |
{-# LANGUAGE TemplateHaskell, FlexibleInstances, MultiParamTypeClasses, KindSignatures, DataKinds #-}
{-# OPTIONS -Wall #-}
module Language.Hakaru.TH (THRepr, unTHRepr, show_code) where
import Prelude hiding (Real)
import Language.Hakaru.Syntax (Hakaru(..), Number(..), Fraction(..),
Order(..), Base(..), Mochast... | suhailshergill/hakaru | Language/Hakaru/TH.hs | bsd-3-clause | 3,931 | 3 | 15 | 960 | 2,201 | 1,165 | 1,036 | -1 | -1 |
module Lib where
-- | Hjälpfunktion för inmatning av lista (inte en del av just den här
-- uppgiften, men ofta användbar i dessa tävlingar).
getList :: Read a => String -> String -> IO [a]
getList frågaAntal frågaVarje = do
putStr frågaAntal
n <- readLn
sequence $ replicate n $ do
putStr frågaVarje
readL... | patrikja/progolymp | skolkval/2015/Lib.hs | bsd-3-clause | 629 | 7 | 12 | 145 | 244 | 119 | 125 | 16 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TemplateHaskell #-}
module Ros.Sensor_msgs.JointState where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Internal.R... | acowley/roshask | msgs/Sensor_msgs/Ros/Sensor_msgs/JointState.hs | bsd-3-clause | 1,667 | 1 | 12 | 367 | 457 | 262 | 195 | 38 | 0 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
----------------------------------------------... | spacekitteh/compdata | src/Data/Comp/Multi/HFoldable.hs | bsd-3-clause | 2,345 | 0 | 14 | 673 | 805 | 420 | 385 | 43 | 1 |
{-| Incident failing in the maintenace daemon
This module implements the treatment of an incident, once
a job failed.
-}
{-
Copyright (C) 2015 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
m... | leshchevds/ganeti | src/Ganeti/MaintD/FailIncident.hs | bsd-2-clause | 3,842 | 0 | 18 | 742 | 637 | 352 | 285 | 47 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
module Main (main) where
import Compare.BufferBuilder ()
import Compare.JsonBuilder ()
import Criterion.Main
import Data.BufferBuilder.Json
import Data.Json.Builder
import Twitter
import Twitter.Manual ()
import Typed.Common
import qualified Compare.JsonBench as JsonBench
import q... | abbradar/aeson | benchmarks/Compare.hs | bsd-3-clause | 669 | 0 | 13 | 132 | 179 | 101 | 78 | 21 | 1 |
-- !!! cc009 -- foreign label returning newtype of Addr
module ShouldCompile where
import Foreign
type Addr = Ptr ()
newtype NPtr a = NPtr Addr
foreign import ccall "&" foo :: NPtr Int
| urbanslug/ghc | testsuite/tests/ffi/should_compile/cc009.hs | bsd-3-clause | 187 | 0 | 6 | 36 | 43 | 26 | 17 | 5 | 0 |
module T7368 where
f = b (l Nothing)
l :: b a -> c b
l = undefined
b :: (a -> b) -> c
b = undefined | siddhanathan/ghc | testsuite/tests/typecheck/should_fail/T7368.hs | bsd-3-clause | 105 | 0 | 7 | 33 | 59 | 32 | 27 | 6 | 1 |
{-# htermination (gtRatio :: Ratio MyInt -> Ratio MyInt -> MyBool) #-}
import qualified Prelude
data MyBool = MyTrue | MyFalse
data List a = Cons a (List a) | Nil
data MyInt = Pos Nat | Neg Nat ;
data Nat = Succ Nat | Zero ;
data Ordering = LT | EQ | GT ;
data Ratio a = CnPc a a;
primCmpNat :: Nat -> ... | ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/GT_2.hs | mit | 2,199 | 0 | 9 | 465 | 1,009 | 533 | 476 | 54 | 1 |
module Args where
data Args = Args {}
getArgs :: IO Args
getArgs = pure Args {}
| mrak/coreutils.hs | src/uniq/Args.hs | mit | 82 | 3 | 4 | 19 | 27 | 19 | 8 | 4 | 1 |
-- Emirps
-- https://www.codewars.com/kata/55de8eabd9bef5205e0000ba
module Codewars.G964.Emirps (findEmirp) where
import Data.Maybe(listToMaybe, fromMaybe)
import Data.List(unfoldr, genericLength)
import Data.Set (fromDistinctAscList, member)
pfactors prs n = unfoldr (\(ds,n) -> listToMaybe [(x, (dropWhile (< x) ds,... | gafiatulin/codewars | src/5 kyu/Emirps.hs | mit | 932 | 2 | 16 | 187 | 421 | 235 | 186 | 13 | 1 |
module Network.Traffic.Object.NewlineSplitter
(splitAtNextNewline
) where
import qualified Data.ByteString.Lazy.Char8 as LBS
import GHC.Int (Int64)
splitAtNextNewline :: Int64
-> LBS.ByteString
-> (LBS.ByteString, LBS.ByteString)
splitAtNextNewline startIndex lbs = ... | kosmoskatten/traffic-analysis | src/Network/Traffic/Object/NewlineSplitter.hs | mit | 642 | 0 | 12 | 193 | 188 | 100 | 88 | 14 | 1 |
{-# LANGUAGE OverloadedStrings, NoImplicitPrelude #-}
module SuccessfulRequestLogger(initDB, logRequest, getTopNUserAgents, getTopNUrls) where
import qualified Data.Text as T
import qualified Data.Text.Encoding as E
import qualified Network.Wai as Wai
import qualified Database.SQLite.Simple as SQL
import System.IO (IO... | itsuart/fdc_archivist | src/SuccessfulRequestLogger.hs | mit | 4,370 | 0 | 13 | 855 | 944 | 495 | 449 | 73 | 2 |
{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.SVGRectElement
(getX, getY, getWidth, getHeight, getRx, getRy, SVGRectElement(..),
gTypeSVGRectElement)
... | ghcjs/jsaddle-dom | src/JSDOM/Generated/SVGRectElement.hs | mit | 2,556 | 0 | 10 | 295 | 610 | 364 | 246 | 33 | 1 |
module Handler.Home where
import Import hiding (on, (==.), delete)
import qualified Import as I
import Helpers.Common
import Models.Readable
import Yesod.Form.Bootstrap3
import Database.Esqueleto
import qualified Database.Esqueleto as E
skillForm :: UserId -> Maybe Skill -> Form Skill
skillForm userId ms = renderBoot... | darthdeus/reedink | Handler/Home.hs | mit | 2,268 | 0 | 14 | 552 | 667 | 323 | 344 | 58 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-|
Provides combinators for currying and uncurrying functions over arbitrary vinyl
records.
-}
module Data.Vinyl.Curry wh... | VinylRecords/Vinyl | Data/Vinyl/Curry.hs | mit | 5,327 | 0 | 12 | 1,187 | 888 | 469 | 419 | 49 | 1 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
import Data.Default (def)
import Data.Text (Text)
import Network.HTTP.Condui... | cirquit/quizlearner | resources/auth/Authentification3.hs | mit | 2,378 | 3 | 11 | 755 | 398 | 210 | 188 | 51 | 3 |
-- | Minify JS and CSS files using no external @$PATH@ dependencies.
--
-- @
-- main :: IO ()
-- main = shakeArgs shakeOptions $ do
-- want ["\/\/*.min.js", "\/\/*.min.css"]
-- "//*.min.js" *> minifyJs
-- "//*.min.css" *> minifyCss
-- @
module Development.Shake.Minify where
import qualified Data.ByteSt... | alfa07/shake-minify | src/Development/Shake/Minify.hs | mit | 2,249 | 0 | 13 | 554 | 377 | 220 | 157 | 31 | 1 |
module Filter.Bib (bibliography) where
import Paths_ppp
import Emb (emb)
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as LBS
import Data.Maybe (catMaybes, fromJust, fromMaybe, isJust)
import qualified Text.CSL as CSL
import Text.CSL.Pandoc (processCites)
import qualified Text.CSL.Style... | Thhethssmuz/ppp | src/Filter/Bib.hs | mit | 3,441 | 0 | 18 | 938 | 1,180 | 600 | 580 | 84 | 4 |
module Network.Tremulous.Protocol (
module Network.Tremulous.NameInsensitive
, Delay(..)
, Team(..)
, GameServer(..)
, Player(..)
, MasterServer(..)
, PollResult(..)
, defaultDelay
, parseGameServer
, parseMasterServer
) where
import Prelude as P hiding (Maybe(..), maybe)
impor... | Cadynum/tremulous-query | Network/Tremulous/Protocol.hs | gpl-3.0 | 5,409 | 0 | 15 | 1,693 | 1,545 | 821 | 724 | -1 | -1 |
import System.Environment
import System.IO
import Data.Char
import Data.List
import Data.Ord
import Control.Arrow ((&&&))
orf :: (a -> Bool) -> (a -> Bool) -> a -> Bool
orf f1 f2 = (\b -> (f1 b) || (f2 b))
wordCount :: String -> [(String, Int)]
wordCount = sortBy (flip $ comparing snd) . map (head &&& length) . group... | CS-CLUB/contests | 2013/submissions/Wesley Taylor/1/haskell/word_frequency.hs | gpl-3.0 | 662 | 0 | 14 | 142 | 305 | 157 | 148 | 18 | 1 |
predecessor = predecessor
-- comment
successor :: a
successor = successor
| evolutics/haskell-formatter | testsuite/resources/source/comments/depends_on_displacement/single_annotation/single_line/none/Input.hs | gpl-3.0 | 74 | 0 | 4 | 11 | 17 | 10 | 7 | 3 | 1 |
-- -----------------------------------------------------------------------------
module Main(main) where
-- -----------------------------------------------------------------------------
import System.Environment( getArgs, getProgName )
import System.Console.GetOpt(
ArgOrder(..), OptDescr(..), ArgDescr(..), getOpt, u... | zhensydow/zhtoolkit | src/ArrangeDate.hs | gpl-3.0 | 2,267 | 0 | 14 | 411 | 553 | 289 | 264 | 41 | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.