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
module Cauterize.Specification ( module X ) where import Cauterize.Specification.Types as X import Cauterize.Specification.Parser as X
reiddraper/cauterize
src/Cauterize/Specification.hs
bsd-3-clause
136
0
4
16
28
20
8
3
0
module Network.Orchid.Format.Plain (fPlain) where import Data.FileStore (FileStore) import Network.Orchid.Core.Format fPlain :: WikiFormat fPlain = WikiFormat "txt" "text/plain" plain plain :: FileStore -> FilePath -> FilePath -> String -> IO Output plain _ _ _ = return . TextOutput
sebastiaanvisser/orchid
src/Network/Orchid/Format/Plain.hs
bsd-3-clause
288
0
9
42
87
49
38
7
1
module Main where import Prelude hiding ((/), (-), head, (>), (.), div) import Air.Light ((-)) import Text.HTML.Moe2 import System.Nemesis.Titan test_page :: String test_page = render - html - do head - do meta ! [http_equiv "Content-Type", content "text/html; charset=utf-8"] - (/) title - str "my t...
nfjinjing/moe
src/Main.hs
bsd-3-clause
534
0
14
130
205
113
92
19
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE DataKinds, Empty...
spacekitteh/libgrin
src/GRIN/GrinValue.hs
bsd-3-clause
4,608
0
13
976
1,286
670
616
-1
-1
import System.Environment (getArgs) pic :: [Double] -> String pic xs | x*x + y*y <= r*r = "true" | otherwise = "false" where x = head xs - xs!!3 y = last xs - xs!!1 r = xs!!2 main :: IO () main = do [inpFile] <- getArgs input <- readFile inpFile putStr . un...
nikai3d/ce-challenges
moderate/point_in_circle.hs
bsd-3-clause
408
0
13
137
199
98
101
12
1
import qualified Data.Set as S import Data.List (sort) import Common.List (nub') {-- analysis: - It is equvilant to consider Q_n = n*(3n-1), denote the answer as Q_c/2, - then there exists a and b, with Q_b-Q_a=Q_c, by factorization, we get (b-a)(3b+3a-1)=Q_c, - then we can enumerate the divisor b-a, solve the equa...
foreverbell/project-euler-solutions
src/44.hs
bsd-3-clause
1,436
0
15
449
628
341
287
26
3
module Problem132 where import Prime main :: IO () main = print . sum . take 40 . filter (dividesRepunit (10 ^ 9)) $ getPrimesUpto 1000000 where dividesRepunit n p | gcd 10 p /= 1 = False | otherwise = n `mod` a p == 0 a :: Int -> Int a = go 1 go v n = case (10 * v + 1) `rem` n o...
adityagupta1089/Project-Euler-Haskell
src/problems/Problem132.hs
bsd-3-clause
361
0
11
135
178
90
88
12
2
import Numeric.LinearAlgebra import HVX -- declare a symbolic variable x = EVar "x" -- give x a value (a 4-element column vector) vars = [("x", (4><1) [0,-3,1,2])] -- define the expression to sudifferentiate: max(abs(x)) myexpr = hmax(habs(x)) -- compute the subgradient mysubgrad = jacobianWrtVar myexpr vars "x" main...
chrisnc/hvx
examples/subgrad.hs
bsd-3-clause
353
0
9
57
106
60
46
8
1
{-# LANGUAGE CPP, DeriveDataTypeable #-} module Main where import Distribution.Client.DistDirLayout import Distribution.Client.ProjectConfig import Distribution.Client.Config (defaultCabalDir) import Distribution.Client.ProjectPlanning import Distribution.Client.ProjectPlanning.Types import Distribution.Client.Project...
headprogrammingczar/cabal
cabal-install/tests/IntegrationTests2.hs
bsd-3-clause
14,311
0
15
3,342
2,913
1,474
1,439
282
5
module KParse where import KTypes import qualified Data.Binary.Get as Get import qualified Data.ByteString as BS import qualified Data.Int as I import qualified Data.Word as W import qualified Data.Vector as V import qualified Data.Vector.Unboxed as U import Data.Binary.IEEE754 (floatToWord, wordToFloat, doubleToWord...
carrutstick/hasq
src/Hasq/KParse.hs
bsd-3-clause
4,818
0
15
1,331
1,815
919
896
108
23
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperators #-} module Servant.Ekg where...
anchor/servant-ekg
lib/Servant/Ekg.hs
bsd-3-clause
6,177
0
19
1,700
1,920
996
924
132
3
{-# LANGUAGE RankNTypes, TypeFamilies, FlexibleInstances, MultiParamTypeClasses, UndecidableInstances, BangPatterns #-} -- | Duck utility functions module Util ( -- * IO exit , die , debug , debugVal -- * Data -- ** List , unique , groupPairs , spanJust , zipCheck , zipWithCheck -- ** Sta...
girving/duck
duck/Util.hs
bsd-3-clause
4,608
0
12
1,075
2,054
1,117
937
-1
-1
-- | 0 から 9 までの 10 種類の数字を高々一度だけ使って 4 桁の数字を 2 つ用意する -- それら 2 つの数の差の最小を求めよ -- module Num8 where import Data.List (foldl') import Control.Arrow ((***)) import Control.Monad.State (StateT, evalStateT, get, put, forM_, when, liftIO) select :: [Int] -> [(Int, [Int])] select [x] = [(x, [])] select (x:xs) = (x,xs) : [ (y, x:...
cutsea110/aop
src/Num8.hs
bsd-3-clause
1,637
0
16
568
785
436
349
39
1
{-| This module provides efficient and streaming left folds that you can combine using 'Applicative' style. Import this module qualified to avoid clashing with the Prelude: >>> import qualified Control.Foldl as L Use 'fold' to apply a 'Fold' to a list: >>> L.fold L.sum [1..100] 5050 'Fold's are 'Ap...
danidiaz/Haskell-Foldl-Library
src/Control/Foldl.hs
bsd-3-clause
22,449
0
14
6,090
5,294
2,823
2,471
370
4
-- | -- Copyright : (c) Sam Truzjan 2013 -- License : BSD3 -- Maintainer : pxqr.sta@gmail.com -- Stability : stable -- Portability : portable -- -- (Word5 <-> Word8) and (Word8 -> Word5) bytestring packers using -- lookup table. -- {-# LANGUAGE CPP, BangPatterns #-} module Data.ByteString.Ba...
pxqr/base32-bytestring
src/Data/ByteString/Base32/Internal.hs
bsd-3-clause
8,324
3
21
2,427
2,653
1,352
1,301
185
4
module Signal.Wavelet.Eval.CommonBench where import Control.Arrow ((&&&)) import Signal.Wavelet.Eval.Common {-# INLINE benchLattice #-} benchLattice :: ((Double, Double), [Double]) -> [Double] benchLattice (baseOp, sig) = latticePar baseOp sig dataLattice :: ([Double], [Double]) -> ((Double, Double), [...
jstolarek/lattice-structure-hs
bench/Signal/Wavelet/Eval/CommonBench.hs
bsd-3-clause
387
0
9
64
145
90
55
9
1
{-# LANGUAGE TypeOperators, EmptyDataDecls, RankNTypes #-} {-# LANGUAGE TypeFamilies, DataKinds, PolyKinds, KindSignatures #-} {-# LANGUAGE GADTs, TypeInType, PatternGuards, ScopedTypeVariables #-} -- | -- Module : Data.Type.RList -- Copyright : (c) 2016 Edwin Westbrook -- -- License : BSD3 -- -- Maintainer ...
eddywestbrook/hobbits
src/Data/Type/RList.hs
bsd-3-clause
10,946
0
13
2,310
3,187
1,685
1,502
159
2
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[SimplCore]{Driver for simplifying @Core@ programs} -} {-# LANGUAGE CPP #-} module SimplCore ( core2core, simplifyExpr ) where #include "HsVersions.h" import DynFlags import CoreSyn import HscTypes import CSE ( cseProgram ) import Ru...
tjakway/ghcjvm
compiler/simplCore/SimplCore.hs
bsd-3-clause
41,072
2
22
13,888
5,493
2,953
2,540
450
7
{-# LANGUAGE QuasiQuotes #-} module HarmLang.QuasiQuoter where import qualified Language.Haskell.TH as TH import qualified Control.Applicative as Ctrl import Language.Haskell.TH.Quote import Text.ParserCombinators.Parsec import Data.Generics import HarmLang.Parser import HarmLang.Types import HarmLang.Expression p...
lrassaby/harmlang
src/HarmLang/QuasiQuoter.hs
mit
4,115
0
17
1,076
1,153
573
580
90
2
{-# Language RebindableSyntax #-} {-# Language TypeOperators #-} {-# Language FlexibleContexts #-} {-# Language ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-unused-do-bind #-} module PingMulti00 where import Prelude hiding ((>...
abakst/symmetry
checker/tests/pos/PingMultiBaby01.hs
mit
924
0
15
205
306
164
142
24
1
module Model where import Prelude import Yesod import Data.Text (Text,pack) import Database.Persist.Quasi import Data.Time -- You can define all of your database entities in the entities file. -- You can find more information on persistent and how to declare entities -- at: -- http://www.yesodweb.com/book/persistent/...
MaxGabriel/hackvote-yesod
Model.hs
cc0-1.0
751
0
8
102
146
80
66
-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-glacier/gen/Network/AWS/Glacier/SetVaultNotifications.hs
mpl-2.0
6,663
0
11
1,216
572
357
215
74
1
{-| Module : Logic Description : Mathematical logic module for the MPL DSL Copyright : (c) Rohit Jha, 2015 License : BSD2 Maintainer : rohit305jha@gmail.com Stability : Stable Functionality for: * AND * OR * NOT * XOR * NAND * NOR * Logical Implication * Logical Equality * Operators for...
rohitjha/DiMPL
src/Logic.hs
bsd-2-clause
5,930
0
9
2,048
617
345
272
63
1
{-| Implementation of command-line functions. This module holds the common command-line related functions for the binaries, separated into this module since "Ganeti.Utils" is used in many other places and this is more IO oriented. -} {- Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc. All rights reserved. Re...
grnet/snf-ganeti
src/Ganeti/HTools/CLI.hs
bsd-2-clause
32,151
293
16
8,193
6,557
3,727
2,830
755
3
{-# OPTIONS_GHC -cpp #-} {-# LANGUAGE ForeignFunctionInterface #-} module Main where import Control.Concurrent haskellFun :: Int -> IO () haskellFun c = putStrLn ("Haskell: " ++ show c) foreign export ccall "hFun" haskellFun :: Int -> IO () foreign import ccall safe "hFun" hFun :: Int -> IO () #if defined(mingw32...
sdiehl/ghc
testsuite/tests/concurrent/should_run/conc038.hs
bsd-3-clause
898
0
10
199
239
116
123
22
1
data Foo = Foo { r1 :: Int , r2 :: Int }
mpickering/ghc-exactprint
tests/examples/ghc710/HangingRecord.hs
bsd-3-clause
48
0
8
20
22
13
9
3
0
{-# LANGUAGE CPP #-} module Network.Bluetooth.UUID ( ShortUUID , fromShortUUID , toShortUUID , isReservedUUID , randomUUID , protocolToUUID , serviceClassToUUID , byteSwap32 , baseUUID , UUIDProtocol(..) , UUIDServiceClass(..) , UUIDProfile ) where import Data.Ix i...
RyanGlScott/bluetooth
src/Network/Bluetooth/UUID.hs
bsd-3-clause
16,039
0
17
6,029
909
669
240
55
2
{-# language FlexibleContexts #-} {-# language OverloadedLists #-} {-# language OverloadedStrings #-} {-# language QuasiQuotes #-} {-# language TypeFamilies #-} module Planetary.Core.Typecheck.Test ( unitTests , checkTest , emptyTypingEnv ) where import Control.Lens import Control.Unification (freeze, unfreeze...
joelburget/interplanetary-computation
src/Planetary/Core/Typecheck/Test.hs
bsd-3-clause
9,182
0
26
3,434
2,312
1,206
1,106
-1
-1
{- (c) The AQUA Project, Glasgow University, 1994-1998 \section[ErrsUtils]{Utilities for error reporting} -} {-# LANGUAGE CPP #-} module ErrUtils ( MsgDoc, Validity(..), andValid, allValid, isValid, getInvalids, ErrMsg, WarnMsg, Severity(..), Messages, ErrorMessages, WarningMessages,...
forked-upstream-packages-for-ghcjs/ghc
compiler/main/ErrUtils.hs
bsd-3-clause
15,469
0
23
4,480
3,601
1,871
1,730
285
4
-- | -- TH.Lib contains lots of useful helper functions for -- generating and manipulating Template Haskell terms {-# LANGUAGE CPP #-} module Language.Haskell.TH.Lib where -- All of the exports from this module should -- be "public" functions. The main module TH -- re-exports them all. import Language.H...
vikraman/ghc
libraries/template-haskell/Language/Haskell/TH/Lib.hs
bsd-3-clause
25,510
0
13
6,283
8,280
4,258
4,022
-1
-1
module Main where import System.Posix.CircularBuffer main :: IO () main = do wb <- createBuffer "/abuf" "/abuf" 4 384 :: IO (WriteBuffer Int) mapM_ (putBuffer wb) [1..16] removeBuffer wb
smunix/shared-buffer
tests/Writer.hs
bsd-3-clause
201
0
10
43
78
39
39
7
1
import Data.List import System.Process import System.IO import System.Exit import Text.Printf import Control.Applicative import Control.Concurrent import Control.Concurrent.Spawn -- mass 1 - 50 -- radius 0.05 - 1.0 -- orbit time 1 - 5 -- sim time 1 - 5 bin = "./milkyway_nbody" outFile = "runtime_results" inFile = "...
MarchM4/Milkyway-home-server-expansion
tools/nbody_run_times/FindNBodyTimes.hs
gpl-3.0
5,010
0
13
2,004
1,265
671
594
-1
-1
module Main (main) where -- This module test whether joining two maps with equal keys works correctly. import FiniteMaps (FiniteMap, unitFM, toListFM, joinFM, joinCombFM, addToFM) main :: IO () main = let map1 = addToFM 1 () (unitFM 2 ()) map2 = addToFM 1 () (unitFM 3 ()) -- finalmap = joinCombFM co...
phischu/gtk2hs
tools/c2hs/base/general/tests/doubles.hs
lgpl-3.0
555
0
12
138
185
97
88
14
1
addMaybe1 :: Maybe Int addMaybe1 = Just 4 >>= \x -> Just 5 >>= \y -> return (x+y) addMaybe2 :: Maybe Int addMaybe2 = do x <- Just 4 y <- Just 5 return (x+y) profileSetup :: IO String profileSetup = do putStrLn "What is your name?" name <- getLine putStrLn ...
junnf/Functional-Programming
codes/Algebra.hs
unlicense
2,217
0
11
619
683
331
352
57
2
{-# LANGUAGE OverloadedStrings #-} module Database.Persist.Sql.Util ( parseEntityValues , entityColumnNames , entityColumnCount , isIdField , hasCompositeKey , dbIdColumns , dbIdColumnsEsc , dbColumns ) where import Data.Maybe (isJust) import Data.Monoid ((<>)) import Data.Text (Text, pack) import Da...
jasonzoladz/persistent
persistent/Database/Persist/Sql/Util.hs
mit
2,980
0
17
722
861
447
414
66
7
<?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="pt-BR"> <title>Network Add-on</title> <maps> <homeID>addon.network</homeID> <mapref loc...
thc202/zap-extensions
addOns/network/src/main/javahelp/help_pt_BR/helpset_pt_BR.hs
apache-2.0
969
77
67
156
413
209
204
-1
-1
module Oops where -- highlight >x +< in f, then select IntroNewDef main = print ((f 1) 2, gaga True) where f x y = g + y where g = x gaga h = ("g: " ++) (show h)
kmate/HaRe
old/testing/introNewDef/Oops_TokOut.hs
bsd-3-clause
197
0
9
75
75
40
35
5
1
{-# LANGUAGE DeriveDataTypeable #-} -- $Id: HsGuardsStruct.hs,v 1.1 2001/07/25 01:15:30 moran Exp $ module HsGuardsStruct where import Data.Generics import SrcLoc1 data HsAlt e p ds = HsAlt SrcLoc p (HsRhs e) {-where-} ds deriving (Ord,Read, Eq, Show, Data, Typeable) data HsRhs e = HsBody e | H...
kmate/HaRe
old/tools/base/AST/HsGuardsStruct.hs
bsd-3-clause
396
0
8
87
120
70
50
11
0
module LiftOneLevel.WhereIn6 where --A definition can be lifted from a where or let into the surrounding binding group. --Lifting a definition widens the scope of the definition. --In this example, lift 'pow' defined in 'sq' sumSquares x y = sq x + sq y where sq::Int->Int ...
RefactoringTools/HaRe
test/testdata/LiftOneLevel/WhereIn6.hs
bsd-3-clause
437
0
8
158
94
49
45
8
2
module Fixme where import Language.Haskell.Liquid.Prelude {-@ LIQUID "--no-termination" @-} {-@ measure containsV @-} {-@ measure binderContainsV @-} binderContainsV :: Binder n -> Bool binderContainsV B = True binderContainsV (M x) = containsV x data Binder n = B | M (TT n) data TT n = V Int | Other | B...
mightymoose/liquidhaskell
tests/pos/MeasureContains.hs
bsd-3-clause
706
0
12
166
220
118
102
13
1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Yesod.Default.Main ( defaultMain , defaultMainLog , defaultRunner , defaultDevelApp , LogFunc ) where import Yesod.Default.Config import Network...
pikajude/yesod
yesod/Yesod/Default/Main.hs
mit
4,442
0
19
1,014
943
519
424
87
1
{-# LANGUAGE TypeFamilies #-} module ShouldCompile where class C a where data Sd a :: * data Sn a :: * type St a :: * instance C Int where data Sd Int = SdC Char newtype Sn Int = SnC Char type St Int = Char
urbanslug/ghc
testsuite/tests/indexed-types/should_compile/Simple1.hs
bsd-3-clause
228
0
7
68
77
44
33
10
0
module LilRender.Image.Immutable ( Image(..) , ImageIndexType , (<!>) , ImageConvertible , toImage , fromImage , makeImage ) where import Control.DeepSeq import qualified Data.Vector.Storable as V import GHC.Generics (Generic) import LilRender....
SASinestro/lil-render
src/LilRender/Image/Immutable.hs
isc
1,109
0
10
301
349
198
151
33
1
module Shaker.CabalInterface where import Control.Monad.Reader import Control.Arrow import Distribution.PackageDescription import Distribution.Simple.Build import Distribution.Simple.GHC(ghcOptions) import Distribution.Simple.LocalBuildInfo import Distribution.Simple.PreProcess import Distribution.Verbosity import Sh...
bonnefoa/Shaker
src/Shaker/CabalInterface.hs
isc
1,603
0
12
176
357
187
170
29
1
module Network.Gravatar ( gravatar -- * Options , GravatarOptions(..) , Size(..) , DefaultImg(..) , ForceDefault(..) , Rating(..) , Scheme(..) , def , defaultConfig ) where import Data.Default (Default(..)) import Data.Digest.Pure.MD5 (md5) import Data.List (intercalate) im...
pbrisbin/gravatar
src/Network/Gravatar.hs
mit
4,468
0
11
1,082
970
567
403
92
2
module Atom.CommandRegistry where import Control.Monad import Data.Text (Text) import GHCJS.Foreign import GHCJS.Types import Atom.TextEditor (TextEditor) data Event_ type Event = JSRef Event_ foreign import javascript unsafe "atom.commands.add($1, $2, $3)" js_addCommand :: JSString -> JSString -> JSFun (Event ->...
CRogers/stack-ide-atom
haskell/src/Atom/CommandRegistry.hs
mit
783
15
9
116
227
121
106
-1
-1
{-# LANGUAGE TypeOperators #-} module Api where import Data.Proxy import Database.Persist (Entity) import Models (Todo, TodoId) import Servant.API ((:<|>), (:>), Capture, Delete, Get, JSON, NoContent, Post, Put, ReqBody) type ...
sectore/haskell-elm-todo-app
server/src/Api.hs
mit
823
0
21
300
255
142
113
-1
-1
{-# htermination unzip :: [(a,b)] -> ([a],[b]) #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_unzip_1.hs
mit
51
0
2
8
3
2
1
1
0
{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoMonomorphismRestriction #-} module Test.Hspec.Wai.JSONSpec (main, spec) where import Test.Hspec import Data.String import Test.Hspec.Wai hiding (pending) import Test.Hspec.Wai.JSON main :: IO () mai...
hspec/hspec-wai
hspec-wai-json/test/Test/Hspec/Wai/JSONSpec.hs
mit
1,893
0
24
588
458
244
214
46
1
{-# htermination ap :: Maybe (a -> b) -> Maybe a -> Maybe b #-} import Monad
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Monad_ap_3.hs
mit
77
0
3
17
5
3
2
1
0
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} module AI where import qualified Data.Tree.Game_tree.Game_tree as GT import qualified Data.Tree.Game_tree.Negascout as NS import Data.Maybe (fromJust) import Data.List (nubBy, sort) import Yinsh -- | Every AI should provide a function @ai..@,...
sharkdp/yinsh
src/AI.hs
mit
4,215
0
13
1,287
903
478
425
60
13
module Templates.HActivityStringTemplate( getActivityStringTemplate, loadActivityStringTemplate ) where import Data.ByteString.Lazy (ByteString) import Text.StringTemplate import Control.Monad getActivityStringTemplate nameActivity tpl = do t <- liftM (render . setAttribute "nam...
jrm2k6/adom
Templates/HActivityStringTemplate.hs
mit
754
2
14
181
171
84
87
16
2
{- | Module : Orville.PostgreSQL.Internal.Expr.Update Copyright : Flipstone Technology Partners 2021 License : MIT -} module Orville.PostgreSQL.Internal.Expr.Update ( SetClauseList, setClauseList, SetClause, setColumn, UpdateExpr, updateExpr, ) where import Orville.PostgreSQL.Internal.Expr...
flipstone/orville
orville-postgresql-libpq/src/Orville/PostgreSQL/Internal/Expr/Update.hs
mit
536
0
5
68
82
58
24
10
0
{-# LANGUAGE TemplateHaskell, RecordWildCards, DeriveDataTypeable #-} module Ratscrew.Game ( module Ratscrew.Types, module Ratscrew.Cards, attemptSnap, gameView, playCard, newGame, Game() ) where import Ratscrew.Cards import Control.Lens import Ratscrew.Types import Data.Type...
smobs/Ratscrew
src/Ratscrew/Game.hs
mit
965
0
11
218
265
149
116
33
1
{-# LANGUAGE CPP #-} {- arch-tag: HVFS Combinators Copyright (c) 2004-2011 John Goerzen <jgoerzen@complete.org> All rights reserved. For license and copyright information, see the file LICENSE -} {- | Module : System.IO.HVFS.Combinators Copyright : Copyright (C) 2004-2011 John Goerzen License : BSD3 ...
haskellbr/missingh
missingh-all/src/System/IO/HVFS/Combinators.hs
mit
7,331
0
15
2,194
1,555
776
779
115
3
module Numeric.Limp.Solvers.Cbc.Solve where import Numeric.Limp.Canon import Numeric.Limp.Rep import Numeric.Limp.Solvers.Cbc.Error import Numeric.Limp.Solvers.Cbc.MatrixRepr import qualified Data.Vector.Storable as V import Numeric.Limp.Solvers.Cbc.Internal.Wrapper import System.IO.Unsafe solve :: (Ord z, Ord r) =...
amosr/limp-cbc
src/Numeric/Limp/Solvers/Cbc/Solve.hs
mit
1,089
0
16
374
315
162
153
27
2
{-# LANGUAGE OverloadedStrings #-} module GitIssues.Web.Styles where import Clay import Data.Text.Lazy (Text) import Prelude hiding ((**)) css :: Text css = render stylesheet stylesheet :: Css stylesheet = do ".spacing-top" ? marginTop (px 10) ".spacing-right" ...
yamadapc/git-issues
src/GitIssues/Web/Styles.hs
mit
500
0
12
156
139
72
67
18
1
module Test.Integration where import Import import Control.Monad.IO.Class (MonadIO(..)) import qualified Data.ByteString as BS import Data.Text.Encoding (decodeUtf8) import Test.Hspec import Base64URL import qualified Station ...
seagreen/station
test/Test/Integration.hs
mit
5,402
0
22
1,694
1,250
618
632
74
1
module Handler.Home where import Import getHomeR :: Handler Html getHomeR = defaultLayout $ do setTitle "Crypto demo homepage" [whamlet| <p>Welcome to the crypto demo site homepage. <p>Learn more about: <ul> <li> <a href=@{AesR}>AES ...
snoyberg/crypto-demo-site
src/Handler/Home.hs
mit
323
0
8
121
39
22
17
-1
-1
-- Flatten a nested list structure module Problem7 where data NestedList a = Elem a | List [NestedList a] flatten :: NestedList a -> [a] flatten (Elem a) = [a] flatten (List a) = flattenSubList a flattenSubList :: [NestedList a] -> [a] flattenSubList ((Elem x):xs) = x:(flattenSubList xs) flattenSubList (x...
Matt-Renfro/haskell
H-99/Problem7.hs
mit
385
0
9
78
161
85
76
9
1
{-- HSFM, a filemanager written in Haskell. Copyright (C) 2016 Julian Ospald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful,...
hasufell/hsfm
src/HSFM/GUI/Gtk/MyView.hs
gpl-2.0
12,814
0
21
3,006
2,958
1,408
1,550
283
8
----------------------------------------------------------------------------- -- | -- Module : Application.Layer -- Copyright : (c) Gushcha Anton 2013-2014 -- License : GNU GPLv3 (see the file LICENSE) -- -- Maintainer : ncrashed@gmail.com -- Stability : experimental -- Portability : portable -- --...
NCrashed/PowerCom
src/powercom/Application/Layer.hs
gpl-3.0
7,171
0
20
1,872
1,449
781
668
101
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RankNTypes #-} module Main (main) where -------------------------------------------------------------------------------- import Control.Exception (SomeException (..), handle) import Data.List (isPrefixOf) import ...
d12frosted/environment
xmonad/xmobar/Main.hs
gpl-3.0
6,758
0
14
2,360
1,337
738
599
174
2
module Control.Monad.Loop where import Control.Monad -- | Monadic loop helper. Runs the loop until True loopM :: (Monad m) => s -> (s -> m (s,Bool)) -> m s loopM s f = do (s', stop) <- f s if stop then return s' else loopM s' f -- | Monadic loop helper. Runs the loop until True. Returns unit. loop...
grwlf/vsim
src_r/Control/Monad/Loop.hs
gpl-3.0
456
0
11
127
190
100
90
10
2
module SIRS.SIRSFronend where import qualified Graphics.Gloss as GLO winSizeX :: Int winSizeX = 800 winSizeY :: Int winSizeY = 800 display :: GLO.Display display = (GLO.InWindow "SIRS (Gloss)" (winSizeX, winSizeY) (0, 0)) data RenderCellState = ShadeGreen | ShadeRed | ShadeBlue data RenderCell = RenderCell { ...
thalerjonathan/phd
coding/prototyping/haskell/PureAgentsPar/src/SIRS/SIRSFronend.hs
gpl-3.0
1,441
0
13
285
460
250
210
30
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.Fitness.Types.Sum -- Copyright : (c) 2015-2016 Brendan...
rueshyna/gogol
gogol-fitness/gen/Network/Google/Fitness/Types/Sum.hs
mpl-2.0
12,095
0
11
2,474
1,718
905
813
224
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/MobileCarriers/List.hs
mpl-2.0
4,810
0
18
1,155
726
421
305
107
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} -- Module : Network.AWS.EC2.Metadata -- Copyright : (c) 2013-2015 Brendan Hay <brendan.g.hay@gmail.com> -- License : This Source Code Form is subject to the terms of -- the Mozilla Public L...
dysinger/amazonka
amazonka/src/Network/AWS/EC2/Metadata.hs
mpl-2.0
12,551
0
12
3,549
1,487
835
652
198
2
module Main where import Lib main :: IO () main = print "hi"
shapr/schrabble
app/Main.hs
agpl-3.0
73
0
6
25
25
14
11
4
1
{-# LANGUAGE OverloadedStrings #-} import Language.PureScript.Bridge import Control.Lens import Data.Proxy import GHC.Generics import Servant.PureScript import Gonimo.CodeGen.TypeBridges import Gonimo.Server.Db.Entities import Gonimo.Serv...
gonimo/gonimo-back
app/PSGenerator.hs
agpl-3.0
2,043
0
9
519
501
275
226
-1
-1
data Slovo = Samo Char | Crtica Slovo deriving (Eq) instance Show Slovo where show (Samo c) = [c] show (Crtica s) = (show s) ++ "'" data Lambda = Varijabla Slovo | Aplikacija Lambda Lambda | Apstrakcija Slovo Lambda instance Show Lambda where show (Varijabla s) = show s show (Apl...
vedgar/mlr
2016 Kolokvij/Lambde.hs
unlicense
1,481
0
13
398
640
317
323
34
1
module SyntaxOne where x = (+) f :: String -> Int f xs = w `x` 1 where w = length xs
thewoolleyman/haskellbook
04/09/chad/SyntaxOne.hs
unlicense
90
0
7
27
44
26
18
5
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} -- | Example taken from: http://members.shaw.ca/el.supremo/MagickWand/gel.htm -- "Gel" Effects example -- http://www.imagemagick.org/Usage/advanced/#gel_effects import Control.Exception.Lifted import Control.Monad ...
flowbox-public/imagemagick
examples/gel.hs
apache-2.0
4,782
0
13
1,257
919
449
470
81
1
{- Control.Exception.Hierarchical -- Template Haskell for defining exceptions Copyright (C) 2014 Galois, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LIC...
GaloisInc/hierarchical-exceptions
src/Control/Exception/Hierarchical.hs
apache-2.0
7,992
0
16
1,904
681
372
309
-1
-1
{- This code is derived from Andrej Bauer's implementation of the Reals using Dyadics -} {- | This module contains a purely Haskell implementation of dyadic rationals, suitable for interval arithmetic. A faster implementation of dyadic rationals would use a fast arbitrary-precision floating-point library, such a...
robbertkrebbers/fewdigits
Data/Real/Dyadic.hs
bsd-2-clause
2,990
0
14
946
1,189
610
579
55
4
module NinetyNine where myReverse :: [a] -> [a] myReverse = foldl (\acc x -> (x:acc)) []
naphthalene/haskell-99onthewall
ten/5.hs
bsd-2-clause
90
0
9
17
48
28
20
3
1
-- | Define a position datatype for giving locations in error messages. module Text.XML.HaXml.Posn ( -- * Position type Posn() -- ** Constructors of a new position , posInNewCxt -- :: String -> Maybe Posn -> Posn , noPos -- :: Posn -- ** Strictifier , forcep -- ** Modifiers , addcol, n...
FranklinChen/hugs98-plus-Sep2006
packages/HaXml/src/Text/XML/HaXml/Posn.hs
bsd-3-clause
2,182
0
12
696
487
263
224
41
1
module Test.Relation where import Data.List.TypeLevel import Data.List.TypeLevel.Union (Union) import Data.Proxy import Data.Proxy.TH import Data.Relation import qualified Data.Relation.Backend as Backend import Data.Tagged.Functor import ...
andrewthad/vinyl-vectors
test/Test/Relation.hs
bsd-3-clause
13,411
0
19
3,671
4,584
2,382
2,202
-1
-1
{-# LANGUAGE RelaxedPolyRec #-} -- Needed for vhdl_ty_either', for some reason... module CLasH.VHDL.VHDLTools where -- Standard modules import qualified Maybe import qualified Data.Either as Either import qualified Data.List as List import qualified Data.Char as Char import qualified Data.Map as Map import qualified C...
christiaanb/clash
clash/CLasH/VHDL/VHDLTools.hs
bsd-3-clause
41,122
444
28
10,597
9,978
5,220
4,758
618
11
{-# LANGUAGE OverloadedStrings #-} module Path where import Graphics.Blank import Wiki -- (578,200) main :: IO () main = blankCanvas 3000 $ \ context -> do send context $ do beginPath() moveTo(100, 20) -- line 1 lineTo(200, 160) -- quadratic curve quadraticCurveTo(2...
ku-fpg/blank-canvas
wiki-suite/Path.hs
bsd-3-clause
595
0
14
194
185
94
91
18
1
{-# LANGUAGE CPP #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE OverloadedStrings #-} module Network.SSH.PrivateKeyFormat where import Network.SSH.Messages import Network.SSH.Protocol import Network.SSH.PubKey import Control.Applicative import Control.Monad import...
glguy/ssh-hans
src/Network/SSH/PrivateKeyFormat.hs
bsd-3-clause
8,188
14
24
2,233
1,907
982
925
158
8
{-# LANGUAGE MultiParamTypeClasses #-} module Data.Interface.Package ( ModuleEnv , singleModuleInterface , PackageInterface(..) , showPackageId , PackageDiff(..) , PackageId , PackageIdentifier , parsePackageId ) where import Data.Function ( on ) import Data.Map ( Map ) import qualified Data.Map ...
cdxr/haskell-interface
src/Data/Interface/Package.hs
bsd-3-clause
2,372
0
11
574
385
220
165
46
1
{-# LANGUAGE CPP, FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-} module Llvm.Hir.Target (module Llvm.Hir.DataLayoutMetrics ,...
mlite/hLLVM
src/Llvm/Hir/Target.hs
bsd-3-clause
759
0
8
127
141
85
56
-1
-1
{-# LANGUAGE FlexibleContexts #-} module BoardParser (pBoard) where import Data.Array (array) import Data.Char (digitToInt) import Text.Parsec import Board (Board, board) import Position (Position, rows) import Tile (Tile, tile) pTile :: Stream s m Char => ParsecT s u m Tile pTile = fmap (tile . digitToInt) $ oneOf...
jameshales/voltorb-flip
src/BoardParser.hs
bsd-3-clause
648
0
13
130
286
151
135
17
1
{-# OPTIONS -XTypeSynonymInstances -XFlexibleInstances #-} module TexTables.Types where import TexTables.Utils import Text.Printf type TableTitles = Line type TableEquations = [EqnEx] type EqnEx = (Head -> Int -> Case) type Eqn = (Head -> Case) -- |Root of a table data Head = Table TableEquations TableTitl...
davbaumgartner/tex-tables
TexTables/Types.hs
bsd-3-clause
1,766
62
17
462
667
366
301
56
1
{-# LANGUAGE OverloadedStrings #-} module Rho.Magnet where import Data.Bits import qualified Data.ByteString as B import qualified Data.ByteString.Builder as BB import qualified Data.ByteString.Char8 as BC import qualified Data.ByteString.Lazy as LB import Data.Char (dig...
osa1/rho-torrent
src/Rho/Magnet.hs
bsd-3-clause
3,377
51
25
903
900
496
404
63
3
{-# LANGUAGE OverloadedStrings #-} module Hackerrank where import Control.Lens import Data.Map as Map import Data.Aeson import Data.Aeson.Lens (key) import Network.Wreq type Resp = Response (Map String Value) languagesUrl = "http://api.hackerrank.com/checker/languages.json" languages :: IO (Maybe Value) languages...
arknave/utpc
src/Hackerrank.hs
bsd-3-clause
410
0
10
62
113
62
51
-1
-1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} ------------------------------------------------------------------------------ -- | This module defines our application's state type and an alias for its -- handler monad. module ...
nurpax/snaplet-sqlite-simple
example/src/Application.hs
bsd-3-clause
1,116
0
11
156
175
102
73
23
0
{-# LANGUAGE CPP, ScopedTypeVariables #-} -- | -- Module : Language.Haskell.Packages -- Copyright : (c) Thiago Arrais 2009 -- License : BSD3 -- -- Maintainer : jpmoresmau@gmail.com -- Stability : beta -- Portability : portable -- -- Packages from packages databases (global, user). -- see <http:...
JPMoresmau/ghc-pkg-lib
src/Language/Haskell/Packages.hs
bsd-3-clause
8,543
1
27
2,573
1,639
837
802
143
7
module Zero.ResetToken.Internal ( ResetSecret(..) , ResetBundle(..) ) where import Servant.API.Experimental.Auth (AuthProtect) import Data.Text (Text) import Zero.Swagger ------------------------------------------------------------------------------ data ResetSecret = Res...
et4te/zero
src-shared/Zero/ResetToken/Internal.hs
bsd-3-clause
1,552
0
11
263
316
171
145
-1
-1
{-# LANGUAGE ForeignFunctionInterface #-} module Network.EXTLS where import Data.Bits import qualified Data.ByteString as B import Data.ByteString.Internal (createAndTrim) import Data.ByteString.Unsafe (unsafeUseAsCStringLen) import Data.Functor import Data.Word impor...
xplat/extls
src/Network/EXTLS.hs
bsd-3-clause
2,179
0
11
469
624
328
296
39
1
module Main where import Ivory.Tower.Config import Ivory.OS.FreeRTOS.Tower.STM32 import LDrive.Platforms import LDrive.Tests.Calib (app) main :: IO () main = compileTowerSTM32FreeRTOS testplatform_stm32 p $ app (stm32config_clock . testplatform_stm32) testplatform_adcs testplatform_e...
sorki/odrive
test/CalibTest.hs
bsd-3-clause
496
0
8
127
95
53
42
15
1
module Sols.Prob13 ( solution ) where parseNumbers :: String -> [Integer] parseNumbers txt = map read txtLines where txtLines = lines txt solution = do nums <- readFile "./data/prob13.txt" print $ take 10 $ show $ sum $ parseNumbers nums
authentik8/haskell-euler
src/Sols/Prob13.hs
bsd-3-clause
259
0
11
61
86
43
43
8
1
{-# LANGUAGE TemplateHaskell, StandaloneDeriving, GeneralizedNewtypeDeriving #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Micro.PkgMsgpack where import Micro.Types import qualified Data.MessagePack as MsgPack import Data.MessagePack (deriveObject) import Data.ByteString.Lazy as BS serialise :: Tree -> BS.ByteStr...
arianvp/binary-serialise-cbor
bench/Micro/PkgMsgpack.hs
bsd-3-clause
444
0
6
52
85
51
34
12
1
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} module Aws.DynamoDB.Commands.GetItem ( GetItem(..) , GetItemResponse(..) , getItem ) where import Aws.Core import...
ywata/dynamodb
Aws/DynamoDB/Commands/GetItem.hs
bsd-3-clause
3,509
0
15
1,255
749
411
338
87
1
{-# LANGUAGE OverloadedStrings #-} module System.Nemesis.Utils where import Prelude hiding ((-)) infixr 0 - {-# INLINE (-) #-} (-) :: (a -> b) -> a -> b f - x = f x ljust :: Int -> a -> [a] -> [a] ljust n x xs | n < length xs = xs | otherwise = take n (xs ++ replicate n x)
nfjinjing/nemesis
src/System/Nemesis/Utils.hs
bsd-3-clause
286
0
9
75
135
73
62
11
1
---------------------------------------------------------------------------- -- | -- Module : ESpecificExportListWithChildrenPlusSome -- Copyright : (c) Sergey Vinokurov 2018 -- License : BSD3-style (see LICENSE) -- Maintainer : serg.foo@gmail.com --------------------------------------------------------...
sergv/tags-server
test-data/0012resolve_reexport_import_cycles/ESpecificExportListWithChildrenPlusSome.hs
bsd-3-clause
1,133
0
9
236
256
154
102
41
1
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, RankNTypes, GADTs, PatternSynonyms, TypeFamilies, DeriveGeneric, GeneralizedNewtypeDeriving #-} module QueryArrow.SQL.SQL where import QueryArrow.Syntax.Term hiding (Subst, subst) import QueryArrow.Syntax.Type import Qu...
xu-hao/QueryArrow
QueryArrow-db-sql-common/src/QueryArrow/SQL/SQL.hs
bsd-3-clause
49,536
353
23
15,666
10,747
6,279
4,468
913
30
module Types where import Data.Char import System.FilePath import Text.Printf data Args = A { bver :: Bool , out_c :: FilePath , out_h :: FilePath , out_urs :: FilePath , out_wrapper :: FilePath , out_ffi_js :: FilePath , mangle_css_url :: Bool , inp :: FilePath } -- out_ffi_js a = wrap (out_ffi_js...
grwlf/cake3
app/UrEmbed/Types.hs
bsd-3-clause
1,301
0
12
314
407
217
190
33
3
module Renkon.Cli ( start ) where import ClassyPrelude import Options.Declarative as Options import Renkon.Command.Exec as ExecCommand import Renkon.Command.Info as InfoCommand import Renkon.Command.List as ListCommand import Renkon.Command.Path as PathCommand import Renkon.Config start :: IO () start = run_ ...
kayhide/renkon
src/Renkon/Cli.hs
bsd-3-clause
1,264
0
12
263
383
194
189
-1
-1