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 #-} module Site.Blog ( rules ) where import Control.Monad import Data.Monoid import Hakyll import System.FilePath import Site.Config import Site.Compilers -- | Blog post page blogPostPage :: Tags -> Pipeline String String blogPostPage tags = prePandoc >=> pandoc ...
piyush-kurur-pages/website
Site/Blog.hs
bsd-3-clause
3,238
0
16
906
696
338
358
67
1
----------------------------------------------------------------------------- -- | -- Module : Data.Permute.IO -- Copyright : Copyright (c) , Patrick Perry <patperry@stanford.edu> -- License : BSD3 -- Maintainer : Patrick Perry <patperry@stanford.edu> -- Stability : experimental -- -- Mutable permutations in t...
patperry/permutation
lib/Data/Permute/IO.hs
bsd-3-clause
568
0
5
97
47
35
12
5
0
-- Copyright (c) 2015-2020 Rudy Matela. -- Distributed under the 3-Clause BSD licence (see the file LICENSE). {-# LANGUAGE TemplateHaskell, CPP #-} import Test -- import Test.LeanCheck -- already exported by Test import Test.LeanCheck.Derive import System.Exit (exitFailure) import Data.List (elemIndices,sort) import Te...
rudymatela/leancheck
test/derive.hs
bsd-3-clause
4,696
0
15
1,215
1,909
1,031
878
-1
-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="ur-PK"> <title>Plug-n-Hack | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref ...
thc202/zap-extensions
addOns/plugnhack/src/main/javahelp/org/zaproxy/zap/extension/plugnhack/resources/help_ur_PK/helpset_ur_PK.hs
apache-2.0
972
78
68
158
419
212
207
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE ViewPatterns #-} module Stack.Types.Compiler where import Control.DeepSeq import Control.DeepSeq.Generics (genericRnf) import Data.Aeson import Data.Binary (Binary) import Data.Monoid ((<>)...
akhileshs/stack
src/Stack/Types/Compiler.hs
bsd-3-clause
2,898
0
11
565
673
349
324
62
1
module E.Eta( ArityType(ATop,ABottom), etaExpandAp, annotateArity, deleteArity, etaExpandDef, etaExpandDef', etaExpandProgram, getArityInfo, etaAnnotateProgram, etaReduce ) where import Control.Monad.Identity import Control.Monad.State import Control.Monad.Writer import Data...
m-alvarez/jhc
src/E/Eta.hs
mit
7,993
12
16
2,189
2,373
1,206
1,167
-1
-1
module LiftOneLevel.LetIn1 where --A definition can be lifted from a where or let into the surronding binding group. --Lifting a definition widens the scope of the definition. --In this example, lift 'sq' in 'sumSquares' --This example aims to test lifting a definition from a let clause to a where clause, --and the e...
RefactoringTools/HaRe
test/testdata/LiftOneLevel/LetIn1.hs
bsd-3-clause
536
0
9
158
91
47
44
7
2
{-# LANGUAGE PatternGuards #-} module Idris.Elab.Transform where import Idris.AbsSyntax import Idris.ASTUtils import Idris.DSL import Idris.Error import Idris.Delaborate import Idris.Imports import Idris.Coverage import Idris.DataOpts import Idris.Providers import Idris.Primitives import Idris.Inliner import Idris.Par...
osa1/Idris-dev
src/Idris/Elab/Transform.hs
bsd-3-clause
4,686
0
19
1,319
1,439
742
697
97
6
{- | Module : Orville.PostgreSQL.Internal.EntityOperations Copyright : Flipstone Technology Partners 2021 License : MIT -} module Orville.PostgreSQL.Internal.EntityOperations ( insertEntity, insertAndReturnEntity, insertEntities, insertAndReturnEntities, updateEntity, updateAndReturnEntity, ...
flipstone/orville
orville-postgresql-libpq/src/Orville/PostgreSQL/Internal/EntityOperations.hs
mit
6,679
0
13
1,084
1,060
563
497
124
2
import qualified Data.Array.Unboxed as A import Data.Char ones :: A.Array Int String ones = A.listArray (0,9) ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"] tens :: A.Array Int String tens = A.listArray (1,9) ["ten", "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty",...
jwtouron/haskell-play
ProjectEuler/Problem17.hs
mit
1,455
0
14
491
573
302
271
26
2
module MyHttp (RequestType (..), Request(..), Response(..), Context(..), ServerPart, choose) where --import Control.Monad --import Control.Applicative data RequestType = Get | Post deriving (Eq) data Request = Request { route :: String , reqtype :: RequestType } data Response = Response { content :...
nicolocodev/learnhappstack
4_Filters/MyHttp.hs
mit
845
0
10
189
250
143
107
21
2
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections #-} {- | Module : Database.Couch.Explicit.Database Description : Database-oriented requests to CouchDB, with explicit parameters Copyright : Copyright (c) 2015, Michael Alan Dorman License : MIT Maintainer ...
mdorman/couch-simple
src/lib/Database/Couch/Explicit/Database.hs
mit
19,367
0
20
4,913
2,234
1,158
1,076
266
3
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings, ScopedTypeVariables #-} module Main (main) where import ClassyPrelude import Network.HTTP.Types (status400) import Network.Wai (Application, responseLBS) import Network.Wai.Handler.Warp (run) import Network.Wai.Handler.WebSockets (websocketsOr) import qualified Contr...
palkan/websocket-shootout
haskell/warp/Main.hs
mit
1,672
0
16
317
523
264
259
42
3
{-# LANGUAGE DeriveLift #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-missing-fields #-} module Luck.Template ( mkGenQ , TProxy (..) , tProxy1 , tProxy2 , tProxy3 , Flags (..) , defFlags ) where import Common.SrcLoc (SrcLoc(..)) import Common.Types ...
QuickChick/Luck
luck/src/Luck/Template.hs
mit
2,723
0
11
510
624
367
257
53
1
module Parse ( program , expr ) where import Control.Applicative hiding (many, (<|>)) import Data.Char import Text.ParserCombinators.Parsec import qualified PowAST as Ast -- We have many fun !! program :: Parser Ast.Program program = do funs <- many fun _ <- eof return funs fun :: Parser Ast.Fun fun = do ...
rloewe/petulant-octo-wallhack
Parse.hs
mit
4,931
0
17
1,464
1,636
776
860
156
1
{-# LANGUAGE Arrows, NoMonomorphismRestriction #-} {- -} module Main ( main ) where {- Standard Library Modules Imported -} import qualified Control.Monad.Trans as Monad.Trans import Data.Char ( isSpace ) import qualified Data.Maybe as Maybe import Data.Maybe ( mapMaybe , isJust ) import System.FilePath ...
allanderek/ipclib
web/interface/IpcWeb.hs
gpl-2.0
47,248
0
13
14,152
6,462
3,528
2,934
679
9
{-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} import Control.Monad.Free import System.IO ---------- type Name = String data DialogueF a where AskName :: String -> (Name -> a) -> DialogueF a SayHello :: String -> (() -> a) -> DialogueF a instance Functor DialogueF where fmap f = \case AskName s g -> ...
artuuge/free-running
helloFree.hs
gpl-2.0
1,231
0
16
340
429
213
216
41
3
-- This file is part of KSQuant2. -- Copyright (c) 2010 - 2011, Kilian Sprotte. All rights reserved. -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (...
kisp/ksquant2
Main.hs
gpl-3.0
8,618
0
14
2,447
2,094
1,088
1,006
176
3
-- | Tests for the persistence layer module Tweet.Test.Store ( testToken , testUser , testTweet , testMark ) where {- - Warning to future generations: - testing DB functionality with QuickCheck was not necessarily a good idea. - Should add some HUnit tests here. -} import Control.Monad import Control.Monad.Reader...
cbowdon/TweetFilter
Tweet/Test/Store.hs
gpl-3.0
2,256
0
12
495
782
398
384
53
2
{-# LANGUAGE BangPatterns, OverloadedStrings #-} {- | Module : Milkman.IO.Burmeister License : GPL-3 Stability : experimental Portability : unknown I/O for the burmeister context format -} module Milkman.IO.Burmeister ( parseBurmeister , showBurmeister ...
mmarx/milkman
src/Milkman/IO/Burmeister.hs
gpl-3.0
2,467
0
13
877
656
337
319
66
3
-- Copyright 2016, 2017 Robin Raymond -- -- This file is part of Purple Muon -- -- Purple Muon 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) an...
r-raymond/purple-muon
src/PurpleMuon/Input/Util.hs
gpl-3.0
2,081
0
11
471
350
205
145
-1
-1
-- Author: Viacheslav Lotsmanov -- License: GPLv3 https://raw.githubusercontent.com/unclechu/xmonadrc/master/LICENSE {-# LANGUAGE PackageImports #-} module FocusHook (focusManageHook) where import "xmonad" XMonad ( className, title , (-->), (=?), (<&&>) , ManageHook ...
unclechu/xmonadrc
xmonad/src/FocusHook.hs
gpl-3.0
3,113
0
13
1,277
533
310
223
60
1
{-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} module HsPre...
jacekm-git/HsPredictor
library/HsPredictor/SQL/Models/League.hs
gpl-3.0
950
0
7
266
64
43
21
11
0
{-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TemplateHaskell #-} {-| Module : Database/Hedsql/TH/Instances.hs Description : Template haskell instances generator. Copyright : (c) Leonard Monnier, 2016 License : GPL-3 Maintainer : leonard.monnier@gmail.c...
momomimachli/Hedsql
src/Database/Hedsql/TH/Instances.hs
gpl-3.0
4,775
0
11
1,238
715
394
321
85
1
{-# LANGUAGE GeneralizedNewtypeDeriving, RankNTypes #-} -- |This module is the one to use when you want to use XCP over ethernet. -- Usage goes somewhat like this: -- -- @ -- import Network.XcpEth -- import Data.Int -- -- main = do -- am <- loadAddressMap "myAddresses" -- a <- runXcpEth $ do -- ...
cgo/xcp
Network/XcpEth.hs
gpl-3.0
10,963
0
17
3,258
2,482
1,295
1,187
191
17
module XMonad.Hooks.Fizzixnerd where import XMonad import XMonad.Hooks.DynamicLog import XMonad.Hooks.ManageDocks import XMonad.Hooks.ManageHelpers import XMonad.Hooks.UrgencyHook import XMonad.Hooks.FadeInactive import XMonad.Hooks.EwmhDesktops import XMonad.Layout.BoringWindows import XMonad.Layout.Minimize import...
Fizzixnerd/xmonad-config
site-haskell/src/XMonad/Hooks/Fizzixnerd.hs
gpl-3.0
2,353
0
12
531
415
233
182
57
1
{-# LANGUAGE OverloadedStrings #-} import qualified Data.Text as T import qualified Data.Text.IO import qualified Data.Attoparsec.Text as AT import qualified Data.Attoparsec.Combinator as ATC --import Control.Monad import Control.Applicative ((<*)) --import Data.DateTime as D readValue :: AT.Parser T.Text readValue ...
kgadek/mbank_analyser
test.hs
gpl-3.0
3,226
0
11
868
613
315
298
49
1
import System.Environment determineRes :: String -> String determineRes "mlaptop" = "1440x900" determineRes "house_pc" = "1280x1024" determineRes "maths_laptop" = "1280x800" determineRes "house_laptop" = "1366x768" determineRes "home_pc" = "1680x1050" determineRes "small" = "650x650" determineRes "art_laptop" = "1536x...
zackp30/dotfiles
home/bin/exp-screenres.hs
gpl-3.0
564
0
8
75
132
65
67
16
1
module Pfds.Ch05.Dequeue where import Prelude hiding (head, tail, last, init) class Dequeue q where empty :: q a isEmpty :: q a -> Bool cons :: a -> q a -> q a head :: q a -> a tail :: q a -> q a snoc :: q a -> a -> q a last :: q a -> a init :: q a -> q a data BatchedDequeue a = BD [a] [a] deriv...
heyduck/pfds
src/Pfds/Ch05/Dequeue.hs
gpl-3.0
1,334
0
12
397
862
439
423
43
1
module Main where import Data.Word import Data.Char import Test.Hspec import Test.QuickCheck import Brnfckr.Parse import Brnfckr.Eval import Paths_brnfckr helloWorld, loop, singleOp :: String loop = "[>.<],[>.<-]" singleOp = ",.-+><" helloWorld = "++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++....
johntyree/brnfckr
src/tests/TestMain.hs
gpl-3.0
3,402
0
23
618
861
430
431
45
1
-- This Source Code Form is subject to the terms of the Mozilla Public -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. module Main where import Test.Tasty import qualified Tests.Wai.Route as WaiRoute main :: IO () main = defaultMain $...
twittner/wai-routing
test/TestSuite.hs
mpl-2.0
358
0
8
63
50
31
19
5
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.GamesManagement.Types -- Copyright : (c) 2015-2016 Bre...
rueshyna/gogol
gogol-games-management/gen/Network/Google/GamesManagement/Types.hs
mpl-2.0
4,106
0
7
902
382
262
120
105
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/Resource/Content/Accounttax/Custombatch.hs
mpl-2.0
4,946
0
18
1,153
713
416
297
106
1
-- -*-haskell-*- -- GIMP Toolkit (GTK) Widget SourceView -- -- Author : Peter Gavin -- derived from sourceview bindings by Axel Simon and Duncan Coutts -- -- Created: 18 December 2008 -- -- Copyright (C) 2004-2008 Peter Gavin, Duncan Coutts, Axel Simon -- -- This library is free software; you can redistribute it ...
thiagoarrais/gtk2hs
gtksourceview2/Graphics/UI/Gtk/SourceView/SourceStyle.hs
lgpl-2.1
1,350
0
9
270
116
79
37
11
0
{-# LANGUAGE MultiParamTypeClasses, UnboxedTuples #-} module Math.Topology.KnotTh.Knotted.Crossings.Projection ( ProjectionCrossing(..) , projection ) where import Control.DeepSeq import Data.Bits ((.&.)) import Math.Topology.KnotTh.Algebra.Dihedral.D4 import Math.Topology.KnotTh.Knotted import Math.Topolo...
mishun/tangles
src/Math/Topology/KnotTh/Knotted/Crossings/Projection.hs
lgpl-3.0
1,240
0
8
214
315
175
140
32
1
module Cal where import Data.List import Data.Time import Data.Time.Calendar import Data.Time.Calendar.WeekDate import Control.Monad data DayOfWeek = Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday deriving (Show, Enum, Bounded) data Month = January | February | March | April | May | June | July ...
blouerat/cal
Cal.hs
unlicense
2,599
0
12
632
1,014
536
478
56
2
module HelperSequences.A000037Spec (main, spec) where import Test.Hspec import HelperSequences.A000037 (a000037) main :: IO () main = hspec spec spec :: Spec spec = describe "A000037" $ it "correctly computes the first 20 elements" $ take 20 (map a000037 [1..]) `shouldBe` expectedValue where expectedValue...
peterokagey/haskellOEIS
test/HelperSequences/A000037Spec.hs
apache-2.0
379
0
10
59
160
95
65
10
1
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-} module Language.C.Obfuscate.CPS where import Data.Char import Data.List (nubBy) import Data.Maybe import qualified Data.Map as M import qualified Data.Set as S import qualified Language.C.Syntax.AST as AST import qualified Languag...
luzhuomi/cpp-obs
Language/C/Obfuscate/CPS_old.hs
apache-2.0
58,743
803
20
16,794
12,515
7,063
5,452
542
14
module HERMIT.Set.Life where import Data.Set as Set import Data.List as List (nub,(\\)) import Life.Types -- Standard implementation type Board = LifeBoard Config [Pos] -- The new data structure to be used in the implementation type Board' = LifeBoard Config (Set Pos) -- Transformations required by hermit for work...
ku-fpg/better-life
HERMIT/Set/Life.hs
bsd-2-clause
2,793
0
9
580
773
414
359
-1
-1
{-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | Computations in logarithmic scale. module NLP.Nerf2.LogReal ( LogReal , fromLogReal , logToLogReal , logFromLogReal ) where import Prelude hiding (sum, product) import Data.Vector.Generic.Base import Data.Vector.Generic.Mutabl...
kawu/nerf-proto
src/NLP/Nerf2/LogReal.hs
bsd-2-clause
2,300
0
12
546
602
311
291
49
1
----------------------------------------------------------------------------- -- | -- Module : ByteFields -- Copyright : (c) Conrad Parker 2006 -- License : BSD-style -- -- Maintainer : conradp@cse.unsw.edu.au -- Stability : experimental -- Portability : portable -- -- Utilities for handling byte-a...
kfish/hogg
Codec/Container/Ogg/ByteFields.hs
bsd-3-clause
2,417
6
13
528
839
441
398
55
2
{-# LANGUAGE CPP #-} {- Copyright (c) 2008 David Roundy 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...
droundy/franchise
Distribution/Franchise/Buildable.hs
bsd-3-clause
26,012
0
28
10,619
6,621
3,258
3,363
460
15
-- | Defines various function in the context of user interaction, -- most importantly the verbosity settings and logging mechanism module Language.Java.Paragon.Interaction (setVerbosity, getVerbosity, verbosePrint, --enableXmlOutput, getXmlOutput, -- Not used right now setCheckNull, checkNull, normal...
bvdelft/parac2
src/Language/Java/Paragon/Interaction.hs
bsd-3-clause
4,416
0
11
836
587
336
251
54
2
module Sexy.Instances.Cons () where import Sexy.Instances.Cons.List ()
DanBurton/sexy
src/Sexy/Instances/Cons.hs
bsd-3-clause
72
0
4
8
20
14
6
2
0
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} module Duckling.Duration.FR.Rules ( rules ) where i...
facebookincubator/duckling
Duckling/Duration/FR/Rules.hs
bsd-3-clause
2,562
0
18
591
635
361
274
72
4
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} module Main where import Control.Monad.Trans.Either (EitherT) import Network.Wai (Application) import Network.Wai.Handler.Warp (run) import Network.Wai.Middleware.RequestLogger (logStdoutDev) import Servant ( (:>), Get, Capture, JSON, Proxy(..), ServantErr...
zekna/toy-haskell
echo.hs
bsd-3-clause
683
0
10
108
217
125
92
18
1
{-# LANGUAGE OverloadedStrings #-} module Xlsx.SimpleSpec (main, spec) where import Test.Hspec import Xlsx.Simple import Codec.Xlsx import Xlsx.Simple.Internal import Codec.Xlsx.Writer import Data.Time import Data.Time.LocalTime import Control.Applicative testFileName = "testD.xlsx" testSheetName = "testSheet" t...
plow-technologies/xlsx-simple
test/Xlsx/SimpleSpec.hs
bsd-3-clause
4,502
0
22
1,931
753
434
319
133
1
module WhileAS where type VarIdent = String type Label = Int -- type Selector = String type Prog = Stat -- type Prog = Prog [Dec] [Stat] -- Contains name, a list of input vars, output var, body respectively and of course -- the two labels ln and lx data Dec = Proc [VarIdent] VarIdent VarIdent Label Stat Label ...
FranklinChen/hugs98-plus-Sep2006
packages/parsec/examples/while/WhileAS.hs
bsd-3-clause
871
0
7
205
192
114
78
24
0
{-# LANGUAGE TemplateHaskell, TypeOperators #-} -- | For more information: http://www.ietf.org/rfc/rfc2109.txt module Network.Protocol.Cookie {- todo: test please -} ( -- * Cookie datatype. Cookie (Cookie) , empty , cookie , setCookie -- * Accessing cookies. , name , value , comment , commentURL , discard , domain ...
sebastiaanvisser/salvia-protocol
src/Network/Protocol/Cookie.hs
bsd-3-clause
6,411
0
17
1,769
1,829
972
857
149
4
module MonadLoopsExample where import Control.Monad (liftM) import Control.Monad.Loops (whileM_, unfoldM) -- | Print prompt and read lines with retry prompts until the password -- is correctly entered, then print congratulations. logIn :: IO () logIn = do putStrLn "% Enter password:" go putStrLn "$ Congratulati...
FranklinChen/twenty-four-days2015-of-hackage
src/MonadLoopsExample.hs
bsd-3-clause
2,428
0
14
662
585
283
302
73
2
{-# LANGUAGE ViewPatterns #-} {-# LANGUAGE DataKinds #-} module Lib where import Types import Network.Label import Text.Read as T import System.FilePath.Posix import Numeric import Data.List divs :: Integral a => a -> a -> Bool a `divs` b = b `mod` a == 0 count :: (a -> Bool) -> [a] -> Int count p = length . filter...
jonascarpay/visor
src/Lib.hs
bsd-3-clause
1,638
0
12
505
706
369
337
50
2
-- | Accessors (lenses and functions) to operate on the 'PostFiltset' of a -- clatch-like type. module Penny.Clatch.Access.PostFiltset where import Control.Lens (Lens', _2, _1) import Penny.Clatch.Types -- | Operate on the 'PostFiltset'. -- -- @ -- 'postFiltset' :: 'Lens'' 'Clatch' 'PostFiltset' -- @ postFiltset :: ...
massysett/penny
penny/lib/Penny/Clatch/Access/PostFiltset.hs
bsd-3-clause
433
0
12
74
118
75
43
5
1
-- | A pure implementation of the emulator {-# LANGUAGE GeneralizedNewtypeDeriving, Rank2Types #-} module Emulator.Monad.ST ( STEmulator , runSTEmulator ) where import Control.Monad.Reader (ReaderT, ask, runReaderT) import Control.Monad.ST (ST, runST) import Control.Monad.Trans (lift) import Emulator.Mona...
jaspervdj/dcpu16-hs
src/Emulator/Monad/ST.hs
bsd-3-clause
1,033
0
11
247
305
163
142
27
1
{-# language CPP #-} -- | = Name -- -- VK_KHR_swapchain - device extension -- -- == VK_KHR_swapchain -- -- [__Name String__] -- @VK_KHR_swapchain@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] -- 2 -- -- [__Revision__] -- 70 -- -- [__Extension and Version Depende...
expipiplus1/vulkan
src/Vulkan/Extensions/VK_KHR_swapchain.hs
bsd-3-clause
179,999
2
22
33,062
17,875
10,834
7,041
-1
-1
module Text.Highlighter.Lexers.Boo (lexer) where import Text.Regex.PCRE.Light import Text.Highlighter.Types lexer :: Lexer lexer = Lexer { lName = "Boo" , lAliases = ["boo"] , lExtensions = [".boo"] , lMimetypes = ["text/x-boo"] , lStart = root' , lFlags = [multiline] } comment' :: TokenM...
chemist/highlighter
src/Text/Highlighter/Lexers/Boo.hs
bsd-3-clause
3,659
0
11
543
925
468
457
54
1
{-# LANGUAGE ForeignFunctionInterface #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Elem.LAPACK.Double -- Copyright : Copyright (c) , Patrick Perry <patperry@stanford.edu> -- License : BSD3 -- Maintainer : Patrick Perry <patperry@stanford.edu> -- Stabili...
patperry/lapack
lib/Data/Elem/LAPACK/Double.hs
bsd-3-clause
1,270
0
18
259
340
172
168
16
0
{-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} -- -- Copyright (c) 200...
emwap/feldspar-language
src/Feldspar/Core/Constructs/Integral.hs
bsd-3-clause
7,822
0
15
2,016
2,001
1,007
994
109
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE Rank2Types #-} module Hmlk.DataSet where import Debug.Trace import Data.IntMap (IntMap, fromList, elems, size, toList) import Data.Monoid import Data.MultiSet (findMax, insert, empty) import Data.List (maximumBy, elemIndex) import Data.Function (on) import Control.Lens hi...
rednum/hmlk
Hmlk/DataSet.hs
bsd-3-clause
4,739
0
17
1,250
2,000
1,057
943
-1
-1
{-# LANGUAGE CPP, ScopedTypeVariables, MagicHash, UnboxedTuples #-} ----------------------------------------------------------------------------- -- -- GHC Interactive support for inspecting arbitrary closures at runtime -- -- Pepe Iborra (supported by Google SoC) 2006 -- ----------------------------------------------...
spacekitteh/smcghc
compiler/ghci/RtClosureInspect.hs
bsd-3-clause
52,399
12
27
16,035
12,179
6,184
5,995
-1
-1
module Math.Misc.Parity where import Prelude hiding (fromIntegral) import Math.Algebra.Monoid import Math.Algebra.AbelianMonoid import Data.List import Data.Hashable data Parity = Odd | Even deriving (Eq, Show) instance Hashable Parity where hash Even = 0 hash Odd = 1 opposite :: Parity -> Par...
michiexile/hplex
pershom/src/Math/Misc/Parity.hs
bsd-3-clause
949
0
9
232
327
171
156
35
1
---------------------------------------------------------------------------- -- | -- Module : ModuleWithoutImportList -- Copyright : (c) Sergey Vinokurov 2016 -- License : BSD3-style (see LICENSE) -- Maintainer : serg.foo@gmail.com -- Created : Thursday, 20 October 2016 ----------------------------...
sergv/tags-server
test-data/0006export_pattern_with_type_ghc8.0/ModuleWithoutImportList.hs
bsd-3-clause
440
0
3
60
15
13
2
2
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} module ML.Vec where import ML.Nat import Control.Applicative ((<$>)) data Vec (n :: Nat) (a :: *) where Nil :: Vec Z a (:-) :: a -> Vec n a -> Vec (S n) a instance Functor (Vec n) where ...
ralphmorton/ml
src/ML/Vec.hs
bsd-3-clause
1,319
0
10
383
767
394
373
42
1
module Data.Torrent.Types ( BEncodedT(..) , mkBString , beList , beDictUTF8L , beDictUTF8 , beDict , beDictLookup , parseBencoded , ClientHandshake(..) , parseClientHandshake , randomPeerId , PeerMessage(..) , parseW8RunLength ...
alios/lcars2
Data/Torrent/Types.hs
bsd-3-clause
8,746
0
17
1,984
2,284
1,156
1,128
226
10
module YampaSDL where import Data.IORef import FRP.Yampa as Yampa import Graphics.UI.SDL as SDL type TimeRef = IORef Int yampaSDLTimeInit :: IO TimeRef yampaSDLTimeInit = do timeRef <- newIORef (0 :: Int) _ <- yampaSDLTimeSense timeRef _ <- yampaSDLTimeSense timeRef _ <- yampaSDLTimeS...
ivanperez-keera/Yampa
yampa/examples/yampa-game/YampaSDL.hs
bsd-3-clause
907
0
11
195
244
117
127
24
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE EmptyDataDecls #-} -- TODO: This is a hot-spot for generating user-unfriendly error messages. It ...
spinda/liquidhaskell
src/Language/Haskell/Liquid/Spec/CoreToLogic.hs
bsd-3-clause
13,772
0
15
3,988
5,445
2,744
2,701
296
6
{- let s = "s" createSparkSessionDef $ defaultConf { confRequestedSessionName = Data.Text.pack s } execStateDef (checkDataStamps [HdfsPath (Data.Text.pack "/tmp/")]) -} module Spark.IO.StampSpec where import Test.Hspec -- import Spark.Core.Context -- import Spark.Core.Types -- import Spark.Core.Row -- import Spar...
krapsh/kraps-haskell
test-integration/Spark/IO/StampSpec.hs
apache-2.0
600
0
15
100
82
48
34
9
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} -- | Provides functions for manipulating parts. module Music.Score.Part ( -- ** Articulation type functions Part, SetPart, -- ** Accessing parts H...
music-suite/music-score
src/Music/Score/Part.hs
bsd-3-clause
9,902
0
11
2,666
3,867
2,080
1,787
-1
-1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANG...
AndreasPK/stack
src/Stack/Fetch.hs
bsd-3-clause
31,472
0
30
11,418
7,012
3,608
3,404
594
11
{-# LANGUAGE OverloadedStrings #-} module Css.Graph (graphStyles) where import Clay import Prelude hiding ((**)) import Data.Monoid import Css.Constants {- graphStyles - Generates all CSS for the graph page. -} graphStyles :: Css graphStyles = do graphContainer sidebarCSS nodeCSS pathCSS res...
bell-kelly/courseography
app/Css/Graph.hs
gpl-3.0
11,406
0
22
4,794
2,975
1,225
1,750
407
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-iam/gen/Network/AWS/IAM/ListUserPolicies.hs
mpl-2.0
6,224
0
14
1,308
802
476
326
82
1
{-# LANGUAGE CPP, QuasiQuotes, TemplateHaskell, TypeFamilies #-} module Settings.StaticFiles where import Yesod.Static import qualified Yesod.Static as Static static :: FilePath -> IO Static #ifdef PRODUCTION static = Static.static #else static = Static.staticDevel #endif -- | This generates easy references to file...
samstokes/yesodoro
Settings/StaticFiles.hs
bsd-2-clause
644
0
7
103
56
35
21
7
1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} module T15437A where import Language.Haskell.TH.Syntax (Q, TExp) get :: forall a. Int get = 1 foo :: forall a. Q (TExp Int) foo = [|| get @a ||]
sdiehl/ghc
testsuite/tests/th/T15437A.hs
bsd-3-clause
252
2
9
43
72
45
27
-1
-1
{- Copyright 2016 The CodeWorld Authors. All rights reserved. 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/LICENSE-2.0 Unless required by applicab...
nomeata/codeworld
codeworld-server/Setup.hs
apache-2.0
657
0
4
121
12
7
5
2
1
{-# LANGUAGE QuasiQuotes #-} module Lib where import QQ val = [myq|hello|]
themoritz/cabal
cabal-testsuite/PackageTests/QuasiQuotes/vanilla/Lib.hs
bsd-3-clause
77
0
4
14
17
13
4
4
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE TupleSections #-} -- | Code generation for server executables. module Futhark.CodeGen.Backends.Generi...
HIPERFIT/futhark
src/Futhark/CodeGen/Backends/GenericC/Server.hs
isc
11,971
0
13
3,578
1,554
918
636
153
4
{-# LANGUAGE RankNTypes #-} module Rx.Scheduler.SingleThread where import Control.Monad (join, forever) import Control.Concurrent (ThreadId, forkIO, forkOS, killThread, threadDelay, yield) import Control.Concurrent.STM (atomically) import qualified Control.Concurrent.STM.TChan as TChan import Tiempo (toMicroSeconds) ...
roman/Haskell-Reactive-Extensions
rx-scheduler/src/Rx/Scheduler/SingleThread.hs
mit
2,507
0
21
452
470
257
213
44
1
-- Arithmetic List! -- http://www.codewars.com/kata/541da001259d9ca85d000688 module SeqList where seqlist :: Int -> Int -> Int -> [Int] seqlist f c l = take l [f, f+c ..]
gafiatulin/codewars
src/7 kyu/SeqList.hs
mit
173
0
8
29
54
31
23
3
1
module Web.Twitter.LtxBot.Types where import Control.Monad.Reader (ReaderT) import Network.HTTP.Conduit (Manager) import Web.Twitter.Conduit (TWInfo) import Web.Twitter.Types (UserId) data LtxbotEnv = LtxbotEnv { envUserId :: UserId , envTwInfo :: TWInfo , envMana...
passy/ltxbot
src/Web/Twitter/LtxBot/Types.hs
mit
372
0
8
96
91
58
33
9
0
{-# LANGUAGE FlexibleInstances #-} {-| Module : Hate.Math Description : Hate mathematical utilities License : MIT Maintainer : bananu7@o2.pl Stability : provisional Portability : full This module mostly works with primitives from @Data.Vect@, adding some utilities useful in rendering and OpenGL...
maque/Hate
src/Hate/Math.hs
mit
580
0
5
125
59
41
18
9
0
module ParserSpec where import Test.Hspec import Control.Arrow (left) import Text.ParserCombinators.Parsec (Parser) import Parser import VM spec :: Spec spec = describe "instructionsParser" $ do context "with normalInstructionsString" $ it "parses" $ parseTest instruct...
taiki45/hs-vm
test/ParserSpec.hs
mit
1,209
0
11
345
263
135
128
28
1
{-# LANGUAGE CPP #-} module GHCJS.DOM.Notification ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.Notification #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHCJS.DOM.JSFFI.Generat...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/Notification.hs
mit
349
0
5
33
33
26
7
4
0
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Risk where import Control.Monad.Random import Control.Monad import Data.List (sort) ------------------------------------------------------------ -- Die values newtype DieValue = DV { unDV :: Int } deriving (Eq, Ord, Show, Num) first :: (a -> b) -> (a, c) -> (b,...
tomwadeson/cis194
week12/Risk.hs
mit
2,137
0
14
490
814
437
377
44
2
{-# LANGUAGE Strict #-} {-# LANGUAGE RecordWildCards #-} module WordEmbedding.HasText.Internal.Strict.Model ( binaryLogistic , computeHidden , getmWI ) where import Control.Monad.Reader import Control.Concurrent import qualified Data.Text as T import ...
Nnwww/hastext
src/WordEmbedding/HasText/Internal/Strict/Model.hs
mit
2,464
0
16
774
611
331
280
53
2
{-# LANGUAGE RecordWildCards, NamedFieldPuns #-} module HCraft.World.Camera ( module HCraft.World.Camera.Camera , updateCamera , getCameraVolume ) where import Control.Applicative import Control.Monad import Control.Monad.Error import Control.Monad.Reader import Data.Bits import Data.List import Graphics.UI.GL...
nandor/hcraft
HCraft/World/Camera.hs
mit
4,295
0
22
1,450
1,873
982
891
97
3
module Main where import Test.DocTest import System.Process main :: IO () main = do files <- lines <$> readProcess "find" ["src", "-type", "f", "-name", "*.hs"] [] doctest $ [] ++ files
namikingsoft/nlp100knock
test/DocTest.hs
mit
192
0
10
37
77
42
35
7
1
import System.Environment (getArgs) import System.Exit (exitFailure) import System.Cmd (system) import AbsMini import LexMini import ParMini import ErrM import AnnotatingTypeChecker import Compiler -- driver comp :: String -> String -> IO () comp name s = case pProgram (myLexer s) of Bad err -> do pu...
izimbra/PLT2014
mini/haskell/compilemini.hs
gpl-2.0
1,207
0
16
551
287
135
152
31
3
-------------------------------------------------------------------------------- -- This file is part of diplomarbeit ("Diplomarbeit Johannes Weiß"). -- -- -- -- diplomarbeit is free software: you can redistribute it and/or modify ...
weissi/diplomarbeit
lib/Math/FiniteFields/F2Pow256.hs
gpl-3.0
4,612
0
19
1,373
830
462
368
70
1
{-# LANGUAGE NoImplicitPrelude #-} module Lamdu.Infer.Load ( Loader(..) , loadInfer ) where import Prelude.Compat import Control.Lens.Operators import qualified Data.Map as Map import qualified Data.Set as Set import qualified Data.Traversable as Traversable import Lamdu.Expr...
da-x/Algorithm-W-Step-By-Step
Lamdu/Infer/Load.hs
gpl-3.0
1,217
0
14
289
380
216
164
29
1
-- decode a run-length output from p11 data RL a = Single a | Multiple Int a deriving (Show) p12 :: [RL a] -> [a] p12 xs = concat $ map conv xs where conv (Single x) = [x] conv (Multiple n x) = take n (repeat x)
yalpul/CENG242
H99/11-20/p12.hs
gpl-3.0
230
0
9
65
107
56
51
5
2
{-# LANGUAGE BangPatterns, OverloadedStrings #-} -- | The functions in this modules defines are used to generate user avatars, -- to resize uploaded images, to add and remove avatars in the database and to -- get paths and routes to avatar files. module Account.Avatar ( AvatarImage, ImageHash (..), aiImage, aiGen...
RaphaelJ/getwebb.org
Account/Avatar.hs
gpl-3.0
8,324
0
17
2,156
2,240
1,190
1,050
-1
-1
module Hob.UiSpec (main, spec) where import Graphics.UI.Gtk import qualified Hob.Context as HC import qualified Hob.Context.UiContext as HC import Test.Hspec import HobTest.Context.Default main :: IO () main = hspec spec spec :: Spec spec = describe "mainWindow" $ it "is named" $ do ctx <- l...
svalaskevicius/hob
test/Hob/UiSpec.hs
gpl-3.0
438
0
12
97
129
73
56
15
1
{-# LANGUAGE NoMonomorphismRestriction, QuasiQuotes #-} import Text.Printf.TH emitBox w h x y = [s|\\draw (%?,%?) -- (%?,%?) -- (%?,%?) -- (%?,%?)-- (%?,%?);|] x y (x+w) y (x+w) (y-h) x (y-h) x y memBox x y addr str = concat [box, text, addrLabel, line] where box = emitBox 9.1 h1 x y text = [s|\\draw (%?,%?) ...
aweinstock314/sheedb_weinsa_crypto2015_project
writeups/GenerateStackDiagram.hs
agpl-3.0
3,295
0
10
816
1,122
625
497
60
1
{-# LANGUAGE TypeFamilies, ExistentialQuantification, GADTs #-} {-# OPTIONS_GHC -Wall #-} ---------------------------------------------------------------------- -- | -- Module : Shady.Attribute -- Copyright : (c) Conal Elliott 2009 -- License : AGPLv3 -- -- Maintainer : conal@conal.net -- Stability :...
conal/shady-render
src/Shady/Attribute.hs
agpl-3.0
3,619
0
14
705
1,053
562
491
52
3
{-| Module : Reflex.WX.Controls Description : This module contains wrappers for the functions in Graphics.UI.WX.Controls. License : wxWindows Library License Maintainer : joshuabrot@gmail.com Stability : Experimental -} {-# LANGUAGE DeriveDataTypeable, FlexibleContexts, FlexibleInstances #-} {...
Pamelloes/reflex-wx
src/main/Reflex/WX/Controls.hs
lgpl-2.1
9,440
0
21
2,999
3,451
1,761
1,690
224
1
import Data.List dupli x = concat [[x, x] | x <- x]
nstarke/icc13-introduction-to-haskell
ex14.hs
lgpl-3.0
52
0
8
12
34
18
16
2
1
module Graphics.UI.SDL.RWOps.PhysFS (fromPhysFile, tryFromPhysFile, withPhys) where import Control.Arrow import Control.Exception import Foreign (Ptr, maybePeek) import Graphics.UI.SDL.General (unwrapMaybe) import Graphics.UI.SDL.RWOps import Graphics.UI.SDL.Types (RWops, RWopsStruct) import System.IO.PhysFS import S...
d3tucker/physfs
src/Graphics/UI/SDL/RWOps/PhysFS.hs
lgpl-3.0
1,567
0
10
299
277
157
120
23
1
data Fruit = Apple | Orange apple :: String apple = "apple" orange :: String orange = "orange" whichFrucit :: String -> Fruit --whichFrucit f = case f of -- apple -> Apple -- orange -> Orange -- --whichFrucit apple = Apple --whichFrucit orange = Orange whichFrucit "apple" = Appl...
EricYT/real-world
src/chapter-3/BogusPattern.hs
apache-2.0
352
0
5
95
62
37
25
8
1
-- This is the main configuration file for Propellor, and is used to build -- the propellor program. import Propellor import Propellor.CmdLine import Propellor.Property.Scheduled import qualified Propellor.Property.File as File import qualified Propellor.Property.Apt as Apt import qualified Propellor.Property.Network ...
sjfloat/propellor
config-simple.hs
bsd-2-clause
1,630
4
22
224
333
187
146
32
1
{-# LANGUAGE DeriveDataTypeable #-} module HEP.Parser.StdHep.ProgType where import System.Console.CmdArgs data HsStdHep = Test deriving (Show,Data,Typeable) test :: HsStdHep test = Test mode = modes [test]
wavewave/HsStdHep
lib/HEP/Parser/StdHep/ProgType.hs
bsd-2-clause
229
0
6
48
58
35
23
8
1
{-# LANGUAGE PackageImports #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleInstances #-} module Propellor.Types.Core where import Propellor.Types.Info import Propellor.Types.OS import Propellor.Types.Result import Data.Monoid import "mtl" Control.Monad.RWS.St...
ArchiveTeam/glowing-computing-machine
src/Propellor/Types/Core.hs
bsd-2-clause
3,285
14
15
616
738
403
335
69
0