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 QuasiQuotes, FlexibleContexts #-} import Control.Monad import qualified Data.ByteString as B import Data.Char import qualified Data.ListLike as LL import Numeric import Text.Peggy data JSON = JSONString String | JSONNumber Double | JSONObject [(String, JSON)] | JSONArray [JSON] | JSONBool Bool ...
tanakh/Peggy
example/Json.hs
bsd-3-clause
1,306
7
11
352
137
79
58
21
1
module Foo (foo) where foo :: a -> a foo x = x
donkopotamus/flycheck
test/resources/language/haskell/stack-project-with-renamed-stack-yaml/src/Foo.hs
gpl-3.0
49
0
5
15
26
15
11
3
1
-- original author: -- Mirco "MacSlow" Mueller <macslow@bangang.de> -- -- created: -- 10.1.2006 (or so) -- -- http://www.gnu.org/licenses/licenses.html#GPL -- -- ported to Haskell by: -- Duncan Coutts <duncan.coutts@worc.ox.ac.uk> -- import Graphics.Rendering.Cairo import Graphics.UI.Gtk import Graphics.UI.Gt...
phischu/gtk2hs
cairo/demo/Clock.hs
lgpl-3.0
10,422
0
21
2,601
3,633
1,651
1,982
-1
-1
{-# LANGUAGE TypeFamilies, DataKinds, PolyKinds, GADTs #-} module Dep3 where import Data.Kind import GHC.Exts ( Constraint ) type Star1 = Type data Id1 (a :: Star1) where Id1 :: a -> Id1 a data Id1' :: Star1 -> Type where Id1' :: a -> Id1' a type family Star2 x where Star2 x = Type data Id2a (a :: Star2 Co...
sdiehl/ghc
testsuite/tests/dependent/should_compile/Dep3.hs
bsd-3-clause
467
0
7
111
158
93
65
16
0
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE DeriveGeneric, NoImplicitPrelude, MagicHash, ExistentialQuantification, ImplicitParams #-} {-# OPTIONS_GHC -funbox-strict-fields #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : G...
tolysz/prepare-ghcjs
spec-lts8/base/GHC/IO/Exception.hs
bsd-3-clause
12,712
0
17
2,799
1,921
1,070
851
218
2
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 Utilities for desugaring This module exports some utility functions of no great interest. -} {-# LANGUAGE CPP #-} -- | Utility functions for constructing Core syntax, principally for desugaring module DsUtils ( ...
green-haskell/ghc
compiler/deSugar/DsUtils.hs
bsd-3-clause
31,776
0
19
8,857
5,108
2,657
2,451
-1
-1
module A1 where import D1 sumSq xs ys = (sum (map sq xs)) + (sumSquares xs) main = sumSq [1 .. 4]
kmate/HaRe
old/testing/rmOneParameter/A1_AstOut.hs
bsd-3-clause
101
0
9
25
55
30
25
4
1
module Golf where ----------- -- Skips -- ----------- every :: Int -> [a] -> [a] every n xs = case drop (n-1) xs of (y:ys) -> y : every n ys [] -> [] skips :: [a] -> [[a]] skips xs = map (\n -> every n xs) [1..length xs] ------------------ -- Local Maxima -- ------------------ take3 n xs = take 3 (drop...
dzeban/haskell-exercises
hw3/Golf.hs
mit
1,704
0
12
386
874
466
408
47
2
{-# LANGUAGE OverloadedStrings #-} module Main where import Facebook import Network.HTTP.Conduit (withManager) import Control.Monad.IO.Class (liftIO) import Data.Text (pack, Text(..)) import Control.Applicative ((<$>), (*>)) printUser :: Text -> IO () printUser x = withManager . flip runNoAuthFacebookT $ ...
Fresheyeball/facebook-haskell-sandbox
Main.hs
mit
480
0
12
95
177
102
75
13
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeInType #-} {-# LANGUAGE UndecidableInstances #-} ...
nshepperd/funn
AI/Funn/TypeLits.hs
mit
4,311
0
12
1,013
1,757
957
800
80
4
-- This is a sample config file import Haystack.Lib main = haystackConfig $ defaultConfig { message = "HELLO WORLD" }
ajnsit/haystack
haystack.hs
mit
119
0
7
21
24
14
10
2
1
{- Pattern match compilation + exhaustiveness check Ideas came mainly from the following sources: - "GADTs meet their match" - "The implementation of functional programming languages", Chapter 5, "Efficient compilation of pattern matching" -} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE Patter...
BP-HUG/presentations
2016_april/pattern-match-compilation/PatCompile.hs
mit
9,177
0
23
2,675
3,802
1,991
1,811
203
5
{-# Language FlexibleInstances, GeneralizedNewtypeDeriving #-} {- | Module : Language.Egison.Desugar Copyright : Satoshi Egi Licence : MIT This module provide desugar functions. -} module Language.Egison.Desugar ( DesugarM , runDesugarM , desugarTopExpr , desugarExpr , desugar ...
beni55/egison
hs-src/Language/Egison/Desugar.hs
mit
14,718
0
19
3,037
4,891
2,422
2,469
290
10
{-# LANGUAGE OverloadedStrings #-} module Main where import Prelude import Text.Earley import Engine.Recognizer main :: IO () main = undefined -- let p = allParses (parser imperative) . words -- print $ p "refuel ship" -- print $ p "move ship to mongo" -- print $ p "buy 100 finest_green" -- print $ p "buy shizzl...
mlitchard/cosmos
executable/Main.hs
mit
329
0
6
69
38
25
13
7
1
{-# LANGUAGE TemplateHaskell #-} module Main where import Control.Applicative import Control.Monad (forM, forM_, void) import CStack import Foreign hiding (void) import Foreign.C.Types import System.IO.Unsafe (unsafePerformIO...
andreasfrom/realtime_dynamic_int_stack
Main.hs
mit
3,957
0
13
916
1,516
739
777
112
2
module Main where import List group5 :: (Ord a) => [a] -> [[a]] group5 [] = [] group5 xs = (take 5 xs) : group5 (drop 5 xs) median :: (Ord a) => [a] -> a median xs = let s = sort xs sz = length xs in s !! (sz `div` 2) momPivot :: (Ord a) => [a] -> a momPivot [x] = x momPivot xs = ...
wks/algorithmic-junks
select/mom-select.hs
mit
830
0
13
322
403
216
187
31
3
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE UndecidableInstances #-} module Supply where import Control.Monad.Trans import Control.Monad.State import Control.Monad.Reader import Control.Monad.Writer import Control.Monad.Exc...
vladfi1/hs-misc
Supply.hs
mit
1,528
0
12
351
521
263
258
45
0
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE OverloadedStrings #-} module FP.Extra where import ClassyPrelude.Yesod (mconcat, (++), toBuilder, (=$), toStrict, builderToLazy, intersperse) import Control.Exception.Lifted import ...
fpco/schoolofhaskell.com
src/FP/Extra.hs
mit
2,464
0
17
718
525
298
227
52
2
{-# LANGUAGE BangPatterns #-} module Crypto.RNCryptor.V3.Encrypt ( encrypt , encryptBlock , encryptStream , encryptStreamWithContext ) where import Crypto.Cipher.AES (AES256) import Crypto.Cipher.Types (makeIV, IV, BlockCipher, cbcEncrypt) import Crypto.MAC.HMAC ...
RNCryptor/rncryptor-hs
src/Crypto/RNCryptor/V3/Encrypt.hs
mit
4,197
0
18
1,038
803
429
374
58
1
module Acme.StrTok ( -- * The StrTokT monad transformer StrTokT, runStrTokT, -- * The StrTok monad StrTok, runStrTok, -- * The strTok function strTok ) where import Control.Applicative import Control.Monad import Control.Monad.Identity import Control.Arrow import Control.Monad.Trans ...
3of8/haskell_playground
strtok/Acme/StrTok.hs
gpl-2.0
3,062
0
12
689
790
438
352
40
1
module WAM.Instruction where import Prolog (VarId) type WamAddress = Int -- WAM Operator data WamOp = PutVariable | PutValue | PutUnsafeValue | PutStructure WamLabel | PutConstant String | GetStructure WamLabel | GetConstant String | GetValue | GetVariable | UnifyConstant String |...
acharal/wam
src/WAM/Instruction.hs
gpl-2.0
1,271
0
12
335
380
234
146
47
1
module Flowskell.InputActions ( keyboardMouseHandler, mouseHandler, motionHandler, actionReloadSource) where import Control.Monad (when) import Data.Maybe (isJust, fromJust) import Graphics.Rendering.OpenGL.GL.FramebufferObjects import Graphics.UI.GLUT hiding (Bool, Float) import Language.Scheme.Core (e...
lordi/flowskell
src/Flowskell/InputActions.hs
gpl-2.0
3,983
0
17
690
1,333
655
678
88
1
{-# LANGUAGE DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-} module Exp.Smaller where -- $Id$ import Inter.Types import Inter.Quiz import Autolib.ToDoc import Autolib.Hash import Autolib.Util.Seed import qualified Challenger as C import Data.Typeable import Autolib.Reporter import Autolib.Exp.Exam...
Erdwolf/autotool-bonn
src/Exp/Smaller.hs
gpl-2.0
2,461
8
16
688
711
368
343
65
1
module PokerII where import Data.List data Rank = Two|Three|Four|Five|Six|Seven|Eight|Nine|Ten|J|Q|K|A deriving (Eq, Ord, Enum, Show, Read) data Suit = Spades|Hearts|Diamonds|Clubs deriving (Eq, Show, Read) -- no ordering for poker data Card = Card Rank Suit deriving (Sh...
collective/ECSpooler
backends/haskell/haskell_libs/PokerII.hs
gpl-2.0
1,219
0
13
400
532
279
253
28
1
-- Copyright (c) 2014 Contributors as noted in the AUTHORS file -- -- This file is part of frp-arduino. -- -- frp-arduino 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 -...
rickardlindberg/frp-arduino-old
src/Arduino/Internal/DAG.hs
gpl-3.0
2,995
0
13
903
552
322
230
54
1
{-# LANGUAGE CPP #-} module Hkl.XRD.Calibration ( NptExt(..) , XRDCalibrationEntry(..) , XRDCalibration(..) , calibrate ) where import Control.Monad.IO.Class (liftIO) import Data.ByteString.Char8 (pack) import Data.List (foldl') import Data.Text (Text) import Data.Vector.Storable ...
picca/hkl
contrib/haskell/src/Hkl/XRD/Calibration.hs
gpl-3.0
7,748
0
20
2,361
2,246
1,209
1,037
154
1
module Miekka.DB.Persist where import System.IO import Miekka.DB.Query import System.IO.Unsafe import Miekka.DB.Struct saveDB :: DB -> IO () saveDB db = writeFile filepath (show db) where filepath = tagValue "dbFilepath" $ gTaV db --Put down your pitchforks! "unsafePerformIO" has no side effects here. loadDB :: Fi...
Miekka-Software/OxygenDB
Miekka/DB/Persist.hs
gpl-3.0
394
0
8
60
111
60
51
10
1
{-# LANGUAGE DeriveGeneric #-} module Src.Model.Credential (Credential(..)) where import Data.Aeson import GHC.Generics data Credential = Credential { email :: String , password :: String } deriving (Eq, Generic) instanc...
mdipirro/haskell-secure-types
app/Src/Model/Credential.hs
gpl-3.0
533
0
11
196
121
67
54
14
0
-- | This module defines the basic node lifecycle operations and types. {-# OPTIONS_GHC -fno-warn-incomplete-patterns #-} module MuPromote.Node.Base ( -- * Node instance Node(..), spawnNode, -- * Node actions NodeAction(..), ) where import MuPromote.Common.PromotableItem (PromotableItem) import MuPromot...
plcplc/muPromote-code
node/src/MuPromote/Node/Base.hs
gpl-3.0
1,986
4
16
369
271
155
116
36
1
module Heuristics where import ShrdliteGrammar import CombinatorParser import Text.JSON import Data.List import Data.Char import Data.Maybe import HelpFunctions -- Heuristics for solving goles -- Returns (minDepth,(smallerStack,BiggerStack)) heuristics :: World -> PDDL -> (Int,(Int,Int)) heuristics w (PDDL Insid...
alexandersjosten/AI-shrdlite
haskell/Heuristics.hs
gpl-3.0
2,552
0
17
668
1,499
796
703
61
7
{-# LANGUAGE TypeSynonymInstances #-} module Types (RemoteFsEntry(..) , PathQualification(..) , isSymlink) where import System.Posix.Types import System.Posix.Files data RemoteFsEntry = RemoteFsEntry { rfseMode :: FileMode , rfseSize :: Integer ...
7ocb/fuse_adb_fs
lib/Types.hs
gpl-3.0
789
0
8
287
152
92
60
21
1
{-# LANGUAGE OverloadedStrings #-} module Freenet ( Freenet, mkFreenet, shutdownFreenet ) where import Control.Concurrent ( forkIO ) import Control.Concurrent.STM import Control.Monad ( void ) import qualified Data.Configurator as CFG import qualified Data.Configurator.Types as CFG ...
waldheinz/ads
src/lib/Freenet.hs
gpl-3.0
1,583
0
11
450
259
143
116
32
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ViewPatterns#-} {-# LANGUAGE FlexibleInstances,UndecidableInstances#-} {-# LANGUAGE CPP #-} module Test.QuickFuzz.Derive.Mutation where import Language.Haskell.TH import Language.Haskell.TH.Syntax import Test.QuickCheck import Control.Monad import Control.Arrow import Co...
CIFASIS/QuickFuzz
src/Test/QuickFuzz/Derive/Mutation.hs
gpl-3.0
5,370
26
19
2,043
1,653
872
781
103
6
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} -- | This module wraps RSCoin.User.Wallet into ACID state. module RSCoin.User.AcidState ( UserState , openState , openMemState , closeSt...
input-output-hk/rscoin-haskell
src/RSCoin/User/AcidState.hs
gpl-3.0
5,557
0
15
1,532
1,198
687
511
128
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-youtube/gen/Network/Google/Resource/YouTube/I18nRegions/List.hs
mpl-2.0
5,062
0
18
1,259
802
467
335
116
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Conversions/Batchinsert.hs
mpl-2.0
3,557
0
15
790
410
244
166
66
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QStyleOptionTab.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:36 Warning : this file is machine generated - ...
keera-studios/hsQt
Qtc/Enums/Gui/QStyleOptionTab.hs
bsd-2-clause
12,545
0
18
2,661
3,241
1,579
1,662
280
1
{-#LANGUAGE MonoLocalBinds #-} module LambdaF where import Name import Value import Lambda as Lam -- TODO i is always () maybe remove data LamTermF i j n a = LambdaF i Name a | ApplF a a | VarF j n | ValF j Value | LetF j [Def i a] a deriving (Eq, Show) in...
kwibus/myLang
src/LambdaF.hs
bsd-3-clause
3,274
0
15
1,023
1,624
801
823
70
5
{- BinarySearchTree by Russell Bentley A simple Haskell module that implements a basic binary search tree. -} module BinarySearchTree (search, insert, delete, flatten, mergeT, buildTree) where -- | 'BST' stands for Binary Search Tree. -- The BST type represents that data structure. data B...
ThermalSpan/haskell-euler
src/BinarySearchTree.hs
bsd-3-clause
3,007
0
12
1,422
875
437
438
43
3
{-# LANGUAGE TemplateHaskell, TypeOperators, ScopedTypeVariables #-} -------------------------------------------------------------------- -- | -- Executable : mbox-iter -- Copyright : (c) Nicolas Pouillard 2009, 2011 -- License : BSD3 -- -- Maintainer: Nicolas Pouillard <nicolas.pouillard@gmail.com> -- Stability : pr...
np/mbox-tools
mbox-iter.hs
bsd-3-clause
2,271
0
13
479
625
341
284
46
3
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Marvin.Adapter.Slack.Internal.Types where import Control.Concurrent.Chan.Lifted (Chan) import Control.Concurrent.MVar.Lifted (MVar) import Data.Aeson hiding (Error) import Data.Aeson.TH import Data....
JustusAdam/marvin
src/Marvin/Adapter/Slack/Internal/Types.hs
bsd-3-clause
7,439
0
31
2,009
1,704
936
768
-1
-1
{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} -------------------------------------------------------------------------------- -- | -- -- Module : Kiosk.Backend.Data.InvoiceTemplate -- ...
plow-technologies/cobalt-kiosk-data-template
src/Kiosk/Backend/Data/InvoiceTemplate.hs
bsd-3-clause
15,326
0
16
3,564
2,452
1,343
1,109
-1
-1
{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE TypeFamilies #-} module Game.MetaGame.Types.Board ( BoardC (..) , MachineState (..), MachineStateId (..) ) where import Data.Text (Text) import Control.Monad.Trans.Except (Except) import Game.MetaGame.Types.Core...
maximilianhuber/innovation
lib/Game/MetaGame/Types/Board.hs
bsd-3-clause
2,953
0
10
768
553
297
256
53
0
{-# LANGUAGE OverloadedStrings #-} module Kai.Syntax where import qualified Language.Lua.Syntax as Lua import qualified Data.ByteString.Lazy as BS import qualified Data.ByteString.Lazy.Char8 as C8 import Data.Sequence ((|>),(<|), ViewL(..), ViewR(..)) import qualified Data.Sequence as S import qualified Data.Vector as...
ScrambledEggsOnToast/Kai
src/Kai/Syntax.hs
bsd-3-clause
2,482
0
19
541
1,068
567
501
85
0
{-# LANGUAGE TemplateHaskell #-} module QCommon.PMoveGlobals where import Control.Lens (makeLenses) import qualified Data.Vector as V import Linear.V3 (V3(..)) import qualified Constants import Game.PMoveT import QCommon.PmlT import Types makeLenses ''PMoveGlobal...
ksaveljev/hake-2
src/QCommon/PMoveGlobals.hs
bsd-3-clause
816
0
9
272
167
104
63
24
1
#!/usr/bin/env runhaskell -- Reads markdown (man/xmonad.1.markdown) from stdin, subtitutes -- ___KEYBINDINGS___ for key-binding definitions generated from -- src/XMonad/Config.hs, prints result to stdout. -- -- Unlike the rest of xmonad, this file is released under the GNU General -- Public License version 2 or later....
xmonad/xmonad
util/GenerateManpage.hs
bsd-3-clause
2,399
0
14
579
632
341
291
36
4
module PBKDF2 where import Data.Bits import Data.Word import Data.Char (ord) import Data.List (unfoldr, intersperse) -- for converting between words of different size and other numbers. import qualified Codec.Binary.UTF8.String as S import Numeric -- for testing. import Debug.Trace import Test.QuickCheck (quickCheck...
markus-git/PBKDF2
src/PBKDF2.hs
bsd-3-clause
11,210
0
16
2,790
2,651
1,486
1,165
156
2
module D12Lib where import Control.Monad import Data.Char import Data.List import Data.Maybe import Text.Parsec hiding (Error) import Text.Parsec.String type Register = (Char, Int) data RegOperand = Reg Char deriving (Eq, Show) type RegOrIntOperand = Either RegOperand Int data Instruction = Cpy RegOrIntOperand ...
wfleming/advent-of-code-2016
2016/src/D12Lib.hs
bsd-3-clause
3,200
0
11
846
1,356
728
628
101
2
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleContexts #-} {-# OPTIONS_GHC -F -pgmF trhsx #-} module Crete.Templates.Menu where import Control.Monad.Reader import Data.Time (getCurrentTime) import Happstack.Server --import Happstack.Serv...
fphh/crete
src/Crete/Templates/Menu.hs
bsd-3-clause
2,751
91
26
806
1,025
519
506
-1
-1
module Distribution.Client.Dependency.Modular ( modularResolver, SolverConfig(..)) where -- Here, we try to map between the external cabal-install solver -- interface and the internal interface that the solver actually -- expects. There are a number of type conversions to perform: we -- have to convert the pa...
alphaHeavy/cabal
cabal-install/Distribution/Client/Dependency/Modular.hs
bsd-3-clause
2,594
0
13
547
460
273
187
39
5
import qualified Data.Char as Char s :: String s = concatMap show [1..1000000] index :: String -> Int -> Char index s i = s !! (i - 1) prod :: Int prod = product . map (Char.digitToInt . index s) $ [1,10,100,1000,10000,100000,1000000] main :: IO () main = do putStrLn . show $ prod
bgwines/project-euler
src/solved/problem40.hs
bsd-3-clause
290
2
10
63
146
80
66
13
1
{- HashMap representation of Di-Graph where vertices are keys and collection of di-adjecent edges is stored as a value. Efficient for traversing algorithms. -} module Instances.DiGraph.DiEdgesByVertexMap where import Data.Hashable import PolyGraph.Common import PolyGraph.ReadOnly import PolyGraph.ReadOnly.Graph...
rpeszek/GraphPlay
src/Instances/DiGraph/DiEdgesByVertexMap.hs
bsd-3-clause
3,897
17
18
1,058
1,041
557
484
-1
-1
import Test.Network.AuthorizeNet.Api (authorizeNetTests) import Test.Tasty main :: IO () main = defaultMain authorizeNetTests
MichaelBurge/haskell-authorize-net
test/Spec.hs
bsd-3-clause
128
0
6
15
36
20
16
4
1
module CLaSH.Desugar.Types ( DesugarState(..) , DesugarSession , DesugarStep , dsDesugared , dsBindings , emptyDesugarState ) where -- External Modules import Control.Monad.State.Strict (StateT) import qualified Data.Label import Data.Map (Map,empty) import Language.KURE (RewriteM) -- GHC API import qua...
christiaanb/clash-tryout
src/CLaSH/Desugar/Types.hs
bsd-3-clause
937
0
10
141
226
132
94
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Main where import Control.Concurrent (forkIO, threadDelay) import Control.Concurrent.STM import Control.Concurrent.STM.TVar import Control.Monad.Trans (liftIO) import Data.Time import Network.HTTP.Types (status200) import Network.HTTP.Types.Header (hContentType) import Netw...
stormont/vg-process-monitor
WarpMonitor.hs
bsd-3-clause
1,695
38
10
410
462
260
202
66
2
{-# LANGUAGE ScopedTypeVariables #-} module Main where import Network.LambdaBridge.Bridge import Network.LambdaBridge.SLIP import Network.LambdaBridge.CRC import Network.LambdaBridge.Bus hiding (debug) import Network.LambdaBridge.Logging import Network.LambdaBridge.Board hiding (debug) import qualified Data.ByteStrin...
ku-fpg/lambda-bridge
tests/rs232/Main.hs
bsd-3-clause
4,113
0
19
1,690
1,161
555
606
96
2
{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -Wall #-} -- {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- TEMP -- {-# OPTIONS_GHC -fno-warn-unused-binds #-} -- TEMP ---------------------------------------------------------------------- -- | -- Module : ReificationRules.BuildDictionary -- Copyright : (c) 2016 Conal...
conal/reification-rules
src/ReificationRules/BuildDictionary.hs
bsd-3-clause
5,128
0
18
1,157
925
498
427
-1
-1
----------------------------------------------------------------------------- -- -- Module : Modules.Compatibility -- Copyright : (c) 2011 Lars Corbijn -- License : BSD-style (see the file /LICENSE) -- -- Maintainer : -- Stability : -- Portability : -- -- | A small module adding some extra modules for ...
phaazon/OpenGLRawgen
src/Modules/Compatibility.hs
bsd-3-clause
4,200
0
20
1,000
745
370
375
64
4
{-# LANGUAGE RankNTypes #-} -- | Block verification, application, and rollback: processing of SSC-related payload. module Pos.DB.Ssc.Logic.VAR ( sscVerifyBlocks , sscApplyBlocks , sscVerifyAndApplyBlocks , sscRollbackBlocks ) where import Control.Lens ((.=), _Wra...
input-output-hk/pos-haskell-prototype
db/src/Pos/DB/Ssc/Logic/VAR.hs
mit
10,008
0
15
2,169
2,040
1,078
962
-1
-1
{-# LANGUAGE GADTs #-} module TypeChecking.Context where import Control.Monad import Syntax.Term data Ctx s f b a where Nil :: Ctx s f b b Snoc :: Ctx s f b a -> s -> f a -> Ctx s f b (Scoped a) (+++) :: Ctx s f a b -> Ctx s f b c -> Ctx s f a c ctx +++ Nil = ctx ctx +++ Snoc ctx' s t = Snoc (ctx +++ ctx'...
bitemyapp/hoq
src/TypeChecking/Context.hs
gpl-2.0
1,625
0
14
484
921
459
462
44
3
{-# LANGUAGE GeneralizedNewtypeDeriving, LambdaCase, TypeFamilies, ViewPatterns, FlexibleContexts #-} module Commands.Plugins.Spiros.Template.Types where -- import Commands.Plugins.Spiros.Extra (insertByClipboard) import Commands.Plugins.Spiros.Extra.Types import Commands.Backends.Workflow as W import Data.Monoid.Spl...
sboosali/commands-spiros
config/Commands/Plugins/Spiros/Template/Types.hs
gpl-2.0
4,410
0
11
740
468
281
187
37
2
module Boolean.Eval where -- $Id$ -- import Boolean.Data import Boolean.Op import Expression.Op import Autolib.FiniteMap import Autolib.Util.Wort import Autolib.Set import Autolib.Reporter import Autolib.ToDoc type Belegung v = FiniteMap v Bool belegungen :: Ord v => Set v -> [ Belegung v ] belegungen vs ...
Erdwolf/autotool-bonn
src/Boolean/Eval.hs
gpl-2.0
634
4
14
147
227
114
113
21
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-storagegateway/gen/Network/AWS/StorageGateway/DescribeTapes.hs
mpl-2.0
5,612
0
12
1,267
835
495
340
85
1
{- | Module : Network.MPD.Commands.Query Copyright : (c) Joachim Fasting 2012 License : MIT Maintainer : Joachim Fasting <joachifm@fastmail.fm> Stability : unstable Portability : unportable Query interface. -} module Network.MPD.Commands.Query (Query, (=?) ,(/=?), (%?), (~?), (/~?), qNot, qModSince, qF...
bens/libmpd-haskell
src/Network/MPD/Commands/Query.hs
lgpl-2.1
5,169
0
14
1,399
1,530
809
721
82
1
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="fil-PH"> <title>Pagtukoy ng teknolohiya | ZAP Extension</title> <maps> <homeID>top</homeID>...
veggiespam/zap-extensions
addOns/wappalyzer/src/main/javahelp/org/zaproxy/zap/extension/wappalyzer/resources/help_fil_PH/helpset_fil_PH.hs
apache-2.0
998
85
52
163
406
213
193
-1
-1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : Size.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:14 Warning : this file is machine generated - do not modi...
uduki/hsQt
Qth/ClassTypes/Core/Size.hs
bsd-2-clause
1,593
0
13
367
531
272
259
-1
-1
{-# OPTIONS -fno-warn-overlapping-patterns #-} -- | Optimizations to Image data-structures. Takes advantage of <http://hackage.haskell.org/package/uniplate>. module Diagrams.AST.Optimize ( optimize ) where import Diagrams.AST import Data.Generics.Uniplate.Data {- | The function 'optimize' takes an Image and returns...
sordina/Diagrams-AST
src/Diagrams/AST/Optimize.hs
bsd-3-clause
3,581
1
15
857
1,466
747
719
53
9
module CodeGen.Preprocessor(preprocess) where import Data.List import Data.Maybe import qualified AST.AST as A import qualified AST.Util as Util import qualified AST.Meta as Meta import qualified Types as Ty -- | Functions run on the entire AST before code generation. preprocess :: A.Program -> A.Program preprocess ...
Paow/encore
src/back/CodeGen/Preprocessor.hs
bsd-3-clause
3,611
0
15
843
959
493
466
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-sqs/gen/Network/AWS/SQS/GetQueueUrl.hs
mpl-2.0
4,402
0
9
968
505
308
197
62
1
module Main where import Text.PrettyPrint.HughesPJ xs :: [Doc] xs = [text "hello", nest 10 (text "world")] d1 :: Doc d1 = vcat xs d2 :: Doc d2 = foldr ($$) empty xs d3 :: Doc d3 = foldr ($+$) empty xs main :: IO () main = do print d1 print d2 print d3
beni55/pretty
tests/T3911.hs
bsd-3-clause
286
0
8
88
127
68
59
15
1
-- | Type-safe client-server communication framework for Haste. -- -- In addition to the Haste.App extras, this module exports the same API as -- "Haste", modified slightly to work better with the automatic program -- slicing Haste.App provides. This means that you should import either this -- module *or* Haste...
beni55/haste-compiler
libraries/haste-lib/src/Haste/App.hs
bsd-3-clause
1,065
0
6
184
208
141
67
23
0
{-# LANGUAGE ScopedTypeVariables, BangPatterns #-} -- K-Means sample from "Parallel and Concurrent Programming in Haskell" -- -- With three versions: -- [ kmeans_seq ] a sequential version -- [ kmeans_strat ] a parallel version using Control.Parallel.Strategies -- [ kmeans_par ] a parallel version using C...
prt2121/haskell-practice
parconc/kmeans/kmeans.hs
apache-2.0
10,152
2
19
2,672
2,861
1,457
1,404
197
6
<?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="hu-HU"> <title>Quick Start | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref...
rnehra01/zap-extensions
src/org/zaproxy/zap/extension/quickstart/resources/help_hu_HU/helpset_hu_HU.hs
apache-2.0
975
85
52
160
401
211
190
-1
-1
import qualified Data.Vector as U import Data.Bits main = print . U.minimumBy (\x y -> GT) . U.map (*2) . U.map (`shiftL` 2) $ U.replicate (100000000 :: Int) (5::Int)
phaazon/vector
old-testsuite/microsuite/minimumBy.hs
bsd-3-clause
168
1
11
30
92
51
41
3
1
{-# LANGUAGE TupleSections, OverloadedStrings #-} module Handler.Home where import Import -- This is a handler function for the GET request method on the HomeR -- resource pattern. All of your resource patterns are defined in -- config/routes -- -- The majority of the code you will write in Yesod lives in these handl...
zhy0216/haskell-learning
yosog/Handler/Home.hs
mit
1,287
0
13
303
253
130
123
27
2
{-# LANGUAGE TypeFamilies #-} module T11164a where data family T a
olsner/ghc
testsuite/tests/rename/should_compile/T11164a.hs
bsd-3-clause
68
0
3
12
10
8
2
3
0
{-# LANGUAGE Safe #-} {-# LANGUAGE FlexibleInstances #-} module SH_Overlap1_A ( C(..) ) where import SH_Overlap1_B instance {-# OVERLAPS #-} C [Int] where f _ = "[Int]"
urbanslug/ghc
testsuite/tests/safeHaskell/overlapping/SH_Overlap1_A.hs
bsd-3-clause
186
0
6
44
38
24
14
9
0
module ShouldCompile where {-| weoprjwer {- | qwoiejqwioe -}-} main = undefined
oldmanmike/ghc
testsuite/tests/haddock/should_compile_noflag_haddock/haddockC010.hs
bsd-3-clause
82
0
4
14
10
7
3
2
1
module Language.Plover.ErrorUtil where import Data.Tag import Data.List import Text.ParserCombinators.Parsec import System.IO.Error import Control.Applicative ((<$>)) showTagPositions :: Tag SourcePos -> IO String showTagPositions tag = do sls <- mapM showLineFromFile (sort $ nub $ getTags tag) return $ "Error " ...
swift-nav/plover
src/Language/Plover/ErrorUtil.hs
mit
1,173
0
14
375
328
169
159
26
2
module Main where import Control.Monad.Trans.Resource import Data.Char import Data.Conduit import qualified Data.Conduit.Combinators as CC import qualified Data.Conduit.Text as CT import qualified Data.Text as DT findWords :: Monad m => Conduit DT.Text m DT.Text findWords = dropBad >> start where dropBad = CT.d...
dancor/melang
src/Main/pull-words.hs
mit
577
0
11
130
185
103
82
20
1
module Language.RuScript.ByteCode ( ByteCode(..) , Label , initLabel , genLabel , Pos , Address ) where data ByteCode = CALL Int | INVOKE String | RET -- * Address should be `Pos` after pass one | JUMP Address | JUMPT Address | JUMPF...
izgzhen/RuScript
rusc/src/Language/RuScript/ByteCode.hs
mit
1,147
0
7
515
243
146
97
35
1
-- Tardis monad -- ref:
Airtnp/Freshman_Simple_Haskell_Lib
Idioms/Tardis-monad.hs
mit
24
0
2
5
4
3
1
1
0
module Jolly.Eval ( Value(..) , TermEnv , Interpreter , runEval , emptyTermEnv ) where import Control.Monad.Identity import qualified Data.Map.Strict as Map import Jolly.Syntax data Value = VInt Int | VBool Bool | VClosure String Expr TermEnv d...
jchildren/jolly
src/Jolly/Eval.hs
mit
1,544
0
14
514
667
325
342
57
10
{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} -- | This module captures in a typeclass the interface of concurrency -- monads. module Control.Monad.Conc.Class ( MonadConc(..) -- * Utilities , spawn , forkFinally , killT...
bitemyapp/dejafu
Control/Monad/Conc/Class.hs
mit
21,777
0
16
5,481
5,039
2,707
2,332
293
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Document.Internal where import Data.Default (def) import qualified Data.Set as S import qualified Data.Text as T import Data.Functor.Identity import qualified Data.Text.Lazy as L im...
ErinCall/bloge
src/Document/Internal.hs
mit
2,511
0
14
716
829
437
392
60
2
-- Built for xmonad v.0.13 -- Author: Martin "kluvin" Kleiven -- Licensed under MIT -- -- The following imports' documentation along with usage examples and etc -- can be looked up at http://xmonad.org/xmonad-docs/xmonad-contrib/ -- import XMonad import XMonad.StackSet as W import XMonad.Actions.Navigation2D import ...
kluvin/dotfiles
xmonad/.xmonad/xmonad.hs
mit
3,151
0
11
1,253
512
314
198
54
1
{-# LANGUAGE PackageImports #-} {-# OPTIONS_GHC -fno-warn-dodgy-exports -fno-warn-unused-imports #-} -- | Reexports "Data.Either.Compat" -- from a globally unique namespace. module Data.Either.Compat.Repl ( module Data.Either.Compat ) where import "this" Data.Either.Compat
haskell-compat/base-compat
base-compat/src/Data/Either/Compat/Repl.hs
mit
276
0
5
31
28
21
7
5
0
{-# LANGUAGE TupleSections #-} module TextlunkyParser( parseInput ) where import Data.List.Split import Control.Applicative hiding((<|>)) import Types.TextlunkyCommand import Data.Direction import Types.Synonyms import Data.Vectors(Vector3(..)) import qualified Data.Map as M import Control.Monad.Trans.Free import C...
5outh/textlunky
src/TextlunkyParser.hs
mit
9,502
0
16
3,060
2,284
1,319
965
173
4
fsfactorial n = product [1..n] {- factorial 4 product [1..4] product [1,2,3,4] 1*2*3*4 24 -} fsproduct :: Num a => [a] -> a fsproduct [] = 1 fsproduct (x:xs) = x * product xs fsfactrec :: (Num a, Eq a) => a -> a fsfactrec 0 = 1 fsfactrec n = n * fsfactrec (n - 1) {- product [1..n] == fsfactrec n product [1,2,3,...,n...
feliposz/learning-stuff
haskell/c9lectures-ch6.hs
mit
1,415
0
8
365
691
358
333
41
1
{-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} module Gen.Expr ( exprGen ) where import Gen.Core import Gen.Literal () -- | Generates expressions. exprGen :: Gen BasicExpr exprGen = sized exprGen' where exprGen' 0 = Fix <$> oneof [ liftM Literal arbitrary, ...
djeik/goto
test/Gen/Expr.hs
mit
2,431
0
18
892
419
232
187
41
2
module Main where import System.Environment import GetDocs import GetTypes main :: IO () main = do (mode:outputFormat:f:_) <- getArgs case mode of "docs" -> getDocs outputFormat f "types" -> getTypes outputFormat f _ -> putStrLn "Expected either docs or types + a filename"
deadfoxygrandpa/ElmEditorInfo
main.hs
mit
317
0
11
86
90
46
44
11
3
-- | In this module, we implement a decision procedure for observational -- equivalence of programs of a very simple language. This language allows -- programs of finitely-indexed, inductive and coinductive type. -- A program consists of a definition block and a term, where a definition block -- contains definitions of...
hbasold/Sandbox
OTTTests/DecideEquiv.hs
mit
12,536
0
16
4,127
3,417
1,755
1,662
223
8
module Ridge.Reader where import Control.Monad import qualified Data.EDN as EDN import qualified Data.ByteString.Lazy as BL import Ridge.Types readString :: BL.ByteString -> Maybe Object readString = EDN.parseMaybe >=> (return . toObject)
gfredericks/ridge
Ridge/Reader.hs
epl-1.0
240
0
7
31
65
40
25
7
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE DeriveGeneric, OverloadedStrings #-} module Buildsome.Db ( Db, with , registeredOutputsRef, leakedOutputsRef , InputDesc(..), FileDesc(..) , OutputDesc(..) , ExecutionLog(..), executionLog , FileContentDescCache(..), fileContentDescCache , Reason(..) , IRe...
sinelaw/buildsome
src/Buildsome/Db.hs
gpl-2.0
5,924
0
16
1,141
1,711
953
758
145
1
module Type.CreateSprint ( CreateSprint (..) ) where import Type.Core import Type.Team (TeamIdent) import Control.Monad.Reader (MonadReader, ask) import qualified Type.Sprint as S (Sprint (..), SprintGeneric (..), Checkmark (..)) import Database.Persist.TH (derivePersistField) data CreateSprint = CreateSprint ...
orclev/sprint-logic-rest
Type/CreateSprint.hs
gpl-3.0
1,348
0
11
264
355
203
152
-1
-1
-- Copyright (C) 2013 Che-Liang Chiou. module StringFilter ( Error(..), FilterResult, StringFilter, runFilter, withInput, ) where import Control.Monad newtype StringFilter resultType = StringFilter { run :: StringFilterState -> Either Error (StringFilterState, resultType) } newtype StringF...
clchiou/gwab
lib/StringFilter.hs
gpl-3.0
2,494
0
13
698
717
368
349
54
4
{-# LANGUAGE TypeFamilies, DeriveDataTypeable, FlexibleContexts, FlexibleInstances, TypeSynonymInstances #-} module Main where import Prelude (Int,undefined,Eq,Show,Ord,return,div) import qualified Prelude as P import Data.Typeable import Hip.HipSpec import Test.QuickCheck hiding (Prop) import Control.Applicative d...
danr/hipspec
examples/old-examples/quickspec/Lists.hs
gpl-3.0
4,754
3
18
1,589
1,769
909
860
110
1
{-| Description: Entry point for Courseography. This module implements a 'main' method which takes a command-line argument and executes the corresponding IO action. If no argument is provided, the default action is 'server', which starts the server. -} module Main where import System.IO (stderr, hPutStrLn) import Sy...
hermish/courseography
app/Main.hs
gpl-3.0
1,416
0
11
255
293
168
125
28
2
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} -- Module : Network.AWS.AutoScaling -- Copyright : (c) 2013 Brendan Hay <brendan.g.hay@gmail.com> -- License : This Source Code Form is subject to the terms of -- the Mozilla Public License...
zinfra/khan
amazonka-limited/src/Network/AWS/AutoScaling.hs
mpl-2.0
62,010
0
12
12,928
6,163
3,613
2,550
753
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/List.hs
mpl-2.0
5,366
0
17
1,277
724
426
298
101
1