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 ExistentialQuantification #-} module Undo where import Data.IORef import Control.Monad.State data Restore = forall a . Restore (IORef a) a type Undo = StateT [Restore] IO ureadIORef :: IORef a -> Undo a ureadIORef ptr = lift $ readIORef ptr unewIORef :: a -> Undo (IORef a) unewIORef v = lift $ newIOR...
frelindb/agsyHOL
Undo.hs
mit
1,011
0
11
205
428
207
221
31
1
{-# htermination inits :: [a] -> [[a]] #-} import List
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/List_inits_1.hs
mit
55
0
3
10
5
3
2
1
0
module Rebase.Data.DList ( module Data.DList ) where import Data.DList
nikita-volkov/rebase
library/Rebase/Data/DList.hs
mit
74
0
5
12
20
13
7
4
0
module MonadBot.Plugins.ListZipper ( ListZipper , forward , back ) where type ListZipper a = ([a], [a]) forward :: ListZipper a -> Maybe (ListZipper a) forward (ys, x : xs) = Just (x : ys, xs) forward _ = Nothing back :: ListZipper a -> Maybe (ListZipper a) back (y : ys, xs) = Just (ys, y ...
saevarb/Monadbot
lib/MonadBot/Plugins/ListZipper.hs
mit
354
0
8
103
157
87
70
11
1
module Language.Jass.Semantic.Variable( -- | Variable utilities Variable(..), getVarName, getVarPos, getVarConstness, getVarInitializator, getVarType, isVarArray, isGlobalVariable ) where import Language.Jass.Parser.AST -- | Variable could be global, local and as a function parameter data Variable...
NCrashed/hjass
src/library/Language/Jass/Semantic/Variable.hs
mit
1,926
0
9
325
620
328
292
39
1
module BTError where data BTError = NoParse | NoKey String | FailureReason String instance Show BTError where show NoParse = "no parse" show (NoKey s) = "no key: " ++ s show (FailureReason s) = "failure reason: " ++ s
nabilhassein/bitcurry
src/BTError.hs
mit
228
0
8
50
73
39
34
6
0
{-# LANGUAGE OverloadedStrings #-} module Network.API.Mandrill.RejectsSpec where import Test.Hspec import Test.Hspec.Expectations.Contrib import Network.API.Mandrill.Types import Network.API.Mandrill.Utils import qualified Network.API.Mandrill.Rejects as Rejects import qualified Data.Text ...
krgn/hamdrill
test/Network/API/Mandrill/RejectsSpec.hs
mit
1,353
0
14
316
309
161
148
38
1
-- ------------------------------------------------------------------------------------- -- Author: Sourabh S Joshi (cbrghostrider); Copyright - All rights reserved. -- For email, run on linux (perl v5.8.5): -- perl -e 'print pack "H*","736f75726162682e732e6a6f73686940676d61696c2e636f6d0...
cbrghostrider/Hacking
HackerRank/Algorithms/Implementation/timeInWords.hs
mit
1,457
0
14
347
370
214
156
22
5
{-# OPTIONS_HADDOCK hide #-} module Graphics.Gloss.Internals.Interface.ViewState.Reshape (callback_viewState_reshape, viewState_reshape) where import Graphics.Gloss.Internals.Interface.Callback import Graphics.Gloss.Internals.Interface.Backend import Graphics.Rendering.OpenGL (($=)) import qualified Graphics.Render...
gscalzo/HaskellTheHardWay
gloss-try/gloss-master/gloss/Graphics/Gloss/Internals/Interface/ViewState/Reshape.hs
mit
879
8
12
134
155
96
59
16
1
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Main where import Control.Monad import Control.Monad.State import Control.Applicative import Data.List import System.IO import System.Random import Data.Function (on) import AI import Types im...
artems/blockbattle
src/Main.hs
mit
2,690
0
18
663
974
501
473
82
5
{-# LANGUAGE CPP #-} module GHCJS.DOM.KeyPair ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.KeyPair #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHCJS.DOM.JSFFI.Generated.KeyPair...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/KeyPair.hs
mit
334
0
5
33
33
26
7
4
0
module Util.Server where import Control.Monad.Reader import Server.Config import Util.JWT import Servant import Servant.Server import Web.JWT requireToken :: Maybe (Token a) -> ConfigM a requireToken Nothing = errorOf err401 requireToken (Just (Token token)) = do mAuth <- token <$> asks jwtSecret case mAut...
benweitzman/PhoBuddies-Servant
src/Util/Server.hs
mit
386
0
10
81
129
65
64
14
2
import XMonad import XMonad.Config.Desktop import XMonad.Config.Gnome import XMonad.Util.EZConfig import qualified XMonad.StackSet as W import XMonad.Actions.CycleWS import XMonad.ManageHook import XMonad.Hooks.ManageDocks import XMonad.Layout.ToggleLayouts import XMonad.Hooks.DynamicLog import XMonad.Actions.GridSelec...
yjpark/dotfiles
linux/xmonad.old/xmonad_vm.hs
mit
7,141
0
19
1,949
1,537
876
661
126
5
module Lambda.IO where import Lambda.Data import Autolib.TES.Identifier import Autolib.ToDoc import Autolib.Reader import Text.ParserCombinators.Parsec ( parse ) instance ToDoc Lambda where toDocPrec p t = case t of Variable v -> toDoc v Apply {} -> let ( fun, args ) = applications...
florianpilz/autotool
src/Lambda/IO.hs
gpl-2.0
1,185
0
16
393
402
200
202
-1
-1
#!/usr/bin/env runhaskell import System.Random import System.Process import Control.Monad main :: IO () main = do a <- randomRIO (1,100) :: IO Int case ((a `mod` 5 == 0), (a `mod` 3 == 0)) of (False, False) -> click $ show a (False, True) -> click "Fizz" ...
Vigren/Russian-FizzBuzz
RussianFizzBuzz.hs
gpl-2.0
469
0
11
162
171
94
77
13
4
{- | Module : $Header$ Description : Interface for the SPASS theorem prover. Copyright : (c) Rene Wagner, Klaus Luettich, Rainer Grabbe, Uni Bremen 2005-2006 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : ne...
nevrenato/HetsAlloy
SoftFOL/ProveSPASS.hs
gpl-2.0
9,179
0
21
2,363
1,555
847
708
144
4
module ValueTrie(ValueTrie,empty,lookup,insert) where import Prelude hiding (lookup,head,tail) import Value(Value(Nil,Cons)) data ValueTrie a = ValueTrie (ValueTrie a) (ValueTrie a) (Maybe a) | Empty head Empty = Empty head (ValueTrie hd _ _) = hd tail Empty = Empty tail (ValueTrie _ tl _) = tl value Empty = Nothi...
qpliu/esolang
ph/hs/interp/ValueTrie.hs
gpl-3.0
1,325
0
13
317
561
282
279
33
2
module E2ASM.Assembler.Register ( Position(..) , Extension(..) , Register , mkRegister , r0 ) where import qualified Data.Word as W data Position = Whole | Higher | Lower | Byte deriving (Eq, Show) data Extension = Zero | Sign deriving (Eq, Show) data Register = Regist...
E2LP/e2asm
src/E2ASM/Assembler/Register.hs
gpl-3.0
664
0
9
190
216
122
94
29
2
module P19BMI where import Text.Printf (printf) import Library -- TODO: Make a GUI main :: IO () main = do u <- promptNonNegNum "Units 1. ft, in/lb; 2: in/lb; 3: kg,cm; default 2: " :: IO Integer b <- case u of 1 -> ftInInput 3 -> cmInput _ -> inInput putStrLn $ formatBMI b data H...
ciderpunx/57-exercises-for-programmers
src/P19BMI.hs
gpl-3.0
1,978
0
10
519
648
324
324
55
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeOperators #-} module Api where import Control.Monad.Reader (runReaderT) import Control.Monad.Trans.Except (ExceptT) import Network.Wai (Application) import Servant import Config (Config(..)) import Models i...
Southern-Exposure-Seed-Exchange/Order-Manager-Prototypes
servant/src/Api.hs
gpl-3.0
1,215
0
9
226
290
160
130
36
1
putStr :: String -> ()
hmemcpy/milewski-ctfp-pdf
src/content/3.5/code/haskell/snippet36.hs
gpl-3.0
22
0
6
4
12
6
6
1
0
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.People.Types.Sum -- Copyright : (c) 2015-2016 Brendan ...
rueshyna/gogol
gogol-people/gen/Network/Google/People/Types/Sum.hs
mpl-2.0
596
0
4
109
29
25
4
8
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Settings/GetAutoForwarding.hs
mpl-2.0
5,371
0
19
1,265
713
417
296
112
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/GroupItems/Delete.hs
mpl-2.0
5,959
0
17
1,345
804
472
332
116
1
module Blockchain.UI.Service.Server ( UiService(..) , newUiServiceHandle ) where import Control.Monad.IO.Class (MonadIO) import Data.IORef (readIORef) import Data.Text (Text) import Blockchain.Node.Account (Account(accountId)) import Blockchain.Node.Service (StatusMessage) import Blockchain.Node.Transaction (Ne...
carbolymer/blockchain
blockchain-ui/src/Blockchain/UI/Service/Server.hs
apache-2.0
1,220
0
14
184
345
200
145
29
1
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances, FlexibleInstances #-} module Web.Scotty.CRUD where import Web.Scotty import Data.Aeson import Data.Aeson.Parser as P import Data.Attoparsec.ByteString as Atto import qualified Data.ByteString as BS import qualified Data.ByteString...
andygill/scotty-crud
src/Web/Scotty/CRUD.hs
bsd-2-clause
11,141
0
18
3,807
2,269
1,139
1,130
165
5
module Utils.Vigilance.UtilsSpec (spec) where import Utils.Vigilance.Utils import SpecHelper spec :: Spec spec = parallel $ do describe "watchIntervalSeconds" $ do it "converts seconds" $ watchIntervalSeconds (Every 3 Seconds) `shouldBe` 3 it "converts minutes" $ watchIntervalSeconds (Every 3 Minutes) `sho...
MichaelXavier/vigilance
test/Utils/Vigilance/UtilsSpec.hs
bsd-2-clause
664
0
15
118
207
104
103
12
1
{-# LANGUAGE RankNTypes #-} module Text.SExpr.Print where import Text.SExpr.Type import Text.SExpr.Convert.Classes import Text.PrettyPrint import qualified Codec.Binary.Base64.String as B64 import Data.Char (ord, intToDigit) import Numeric (showOct) import Data.List (intersperse) import Data.Binary import Data.Binary...
mokus0/s-expression
src/Text/SExpr/Print.hs
bsd-3-clause
6,677
0
12
1,471
1,823
920
903
120
1
broken:(
bergmark/snaplet-fay
example/snaplets/fay/src/BrokenFile.hs
bsd-3-clause
10
1
3
2
5
3
2
-1
-1
{-# OPTIONS_GHC -fno-warn-orphans #-} -- Not good reasons, but shouldn't be too fatal {- Sample renderings: -- ONE MODE Program description programname [OPTIONS] FILE1 FILE2 [FILES] Program to perform some action -f --flag description Flag grouping: -a --another description -- MANY MODES WITH ONE SHOWN ...
ndmitchell/cmdargs
System/Console/CmdArgs/Explicit/Help.hs
bsd-3-clause
5,424
0
15
1,358
1,676
881
795
77
6
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts, FlexibleInstances #-} {-# LANGUAGE OverlappingInstances, UndecidableInstances, TypeSynonymInstances #-} {-# LANGUAGE RecordWildCards, NamedFieldPuns, DisambiguateRecordFields #-} {-# ...
pepeiborra/narradar
src/Narradar/Constraints/SAT/RPOAF.hs
bsd-3-clause
34,363
0
21
11,284
11,848
6,063
5,785
619
4
-- Standard semantics of While in direct style. -- We do not make any reuse. module While.DenotationalSemantics.Main0 where import qualified Prelude import Prelude hiding (Num, True, False) import While.AbstractSyntax -- Denotation types type MA = State -> Num type MB = State -> Bool type MS = State -> State -- Sta...
grammarware/slps
topics/implementation/NielsonN07/Haskell/src/While/DenotationalSemantics/Main0.hs
bsd-3-clause
1,389
0
11
394
680
348
332
35
2
module Stats where import Data.List type Series = [Double] type Statistic = Double mean :: Series -> Statistic mean xs = sum xs / genericLength xs median :: Series -> Statistic median xs | odd (length xs) = sorted !! middle_i | otherwise = (sorted !! middle_i + sorted !! (middle_i + 1) ) / 2 where middle_...
tinyrock/gr4j
src/Stats.hs
bsd-3-clause
1,017
0
11
252
456
235
221
31
1
{-# language MultiParamTypeClasses #-} module OpenCV.Internal.Core.Types.Mat.Depth ( Depth(..) , ToDepth(toDepth) , ToDepthDS(toDepthDS) , DepthT ) where import "base" Data.Int import "base" Data.Proxy import "base" Data.Word import "this" OpenCV.TypeLevel ----------------------------------------...
Cortlandd/haskell-opencv
src/OpenCV/Internal/Core/Types/Mat/Depth.hs
bsd-3-clause
2,420
0
10
419
716
379
337
-1
-1
module Tinc.SetupSpec (spec) where import Prelude () import Prelude.Compat import Test.Hspec import Test.Mockery.Directory import System.Directory import System.FilePath import Tinc.Types import Tinc.GhcInfo import Tinc.Setup ...
beni55/tinc
test/Tinc/SetupSpec.hs
bsd-3-clause
894
0
19
282
218
112
106
25
1
module Char8ProllyNotWhatYouWant where import qualified Data.Text as T import qualified Data.Text.Encoding as TE import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as B8 -- utf8-string import qualified Data.ByteString.UTF8 as UTF8 -- Manual unicode encoding of japanese text -- GHC Haskell a...
dmvianna/strict
src/char8.hs
bsd-3-clause
926
0
8
128
198
116
82
22
1
module MIX.Assembler.MIXWord ( MIXWord , wordMask , getByte , storeInField , storeManyInField , toWord , wordToInteger , setNegative , clearNegative , clearByte , addWord , subWord , multWord , divWord , isNegative , bitsPerByte , bytesPerWord ) ...
jtdaugherty/mix-assembler
src/MIX/Assembler/MIXWord.hs
bsd-3-clause
3,680
0
13
994
1,259
681
578
97
2
---------------------------------------------------------------------------- -- | -- Module : Language.Core.Interpreter.Structures -- Copyright : (c) Carlos López-Camey, University of Freiburg -- License : BSD-3 -- -- Maintainer : c.lopez@kmels.net -- Stability : stable -- -- -- Defines fundamental s...
kmels/dart-haskell
src/Language/Core/Interpreter/Structures.hs
bsd-3-clause
13,071
0
14
2,765
2,754
1,518
1,236
197
2
module Boilerplater where import Data.Char import Data.List import Data.List.Split import Data.Maybe import Language.Haskell.TH import Debug.Trace testProperties :: Q [Dec] -> Q Exp testProperties mdecs = do decs <- mdecs -- NB: the use of mkName here ensures we do late binding to the testProperty function...
batterseapower/hashtables
tests/Boilerplater.hs
bsd-3-clause
2,104
0
15
484
486
245
241
-1
-1
module HaskellCI.ShVersionRange ( compilerVersionPredicate, compilerVersionArithPredicate, ) where import HaskellCI.Prelude import Algebra.Lattice (joins) import Algebra.Heyting.Free (Free (..)) import qualified Algebra.Heyting.Free as F import qualified Data.Set as S import qualified Distrib...
hvr/multi-ghc-travis
src/HaskellCI/ShVersionRange.hs
bsd-3-clause
7,849
0
13
2,032
2,599
1,301
1,298
-1
-1
{-# LANGUAGE TypeFamilies, ExistentialQuantification, FlexibleInstances, UndecidableInstances, FlexibleContexts, DeriveDataTypeable, ScopedTypeVariables, MultiParamTypeClasses, FunctionalDependencies,ParallelListComp, EmptyDataDecls, TypeSynonymInstances, TypeOperators, TemplateHaskell #-} -- | KansasLava is desig...
andygill/kansas-lava
Language/KansasLava/Rep.hs
bsd-3-clause
13,705
35
21
3,886
5,158
2,621
2,537
246
2
{-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} module Reflex.Model where import Control.Monad import Data.Functor.Misc import Data.Maybe (fromJust, isJ...
jeffreyrosenbluth/reflex-semantics
src/Model.hs
bsd-3-clause
2,270
0
17
632
1,021
526
495
-1
-1
-- | This simply re-exports some commonly-used modules. module Data.Thyme ( module Data.Thyme.Calendar , module Data.Thyme.Clock , module Data.Thyme.Format , module Data.Thyme.LocalTime ) where import Data.Thyme.Calendar import Data.Thyme.Clock import Data.Thyme.Format import Data.Thyme.LocalTime
liyang/thyme
src/Data/Thyme.hs
bsd-3-clause
319
0
5
53
61
42
19
9
0
module Rumpus.Systems.Hands where import Rumpus.Systems.Controls import Rumpus.Systems.Physics import Rumpus.Systems.Collisions import Rumpus.Systems.Shared import Rumpus.Systems.Attachment import PreludeExtra import RumpusLib type HandEntityID = EntityID data HandsSystem = HandsSystem { _hndLeftHand :: HandEnti...
lukexi/rumpus
src/Rumpus/Systems/Hands.hs
bsd-3-clause
4,703
0
18
1,172
1,348
668
680
-1
-1
; ; HSP help manager—p HELPƒ\[ƒXƒtƒ@ƒCƒ‹ ; (æ“ª‚ªu;v‚̍s‚̓Rƒƒ“ƒg‚Æ‚µ‚ďˆ—‚³‚ê‚Ü‚·) ; %type Šg’£–½—ß %ver 3.3 %note llmod3.hsp‚ðƒCƒ“ƒNƒ‹[ƒh‚·‚éB•K—v‚ɉž‚¶‚Äabout.hsp,msgdlg.hsp,multiopen.hsp,console.hsp,unicode.hsp,dragdrop.hsp,input.hsp‚ðƒCƒ“ƒNƒ‹[ƒh‚·‚é %date 2009/08/01 %author tom %dll llm...
zakki/openhsp
package/hsphelp/llmod3_stdio.hs
bsd-3-clause
11,627
2,699
14
1,711
4,064
3,363
701
-1
-1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} module System.IO.Streams.Network.HAProxy.Tests (tests) where ------------------------------------------------------------------------...
23Skidoo/io-streams-haproxy
test/System/IO/Streams/Network/HAProxy/Tests.hs
bsd-3-clause
25,160
0
20
8,316
5,364
2,623
2,741
450
3
{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses, OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module GTFS.Realtime.Internal.Com.Google.Transit.Realtime.TripDescriptor.ScheduleRelationship (ScheduleRelationship(..)) where import Prelude ((+), ...
romanofski/gtfsbrisbane
src/GTFS/Realtime/Internal/Com/Google/Transit/Realtime/TripDescriptor/ScheduleRelationship.hs
bsd-3-clause
3,453
0
11
609
776
431
345
72
1
{-# LANGUAGE DeriveGeneric, DeriveAnyClass #-} module Data where import Flat ggg = encode (Uno,Due,Tre) {- (One Two) Three (Four Five) Four = 110 = 6 -} data Numero = Uno | Due | Tre | Quattro deriving (Eq,Show,Generic,Flat) -- chkSize 9 >> unsafeEnc 1 >> -- chkSize 3 >> Bit8...
tittoassini/flat
benchmarks/Data.hs
bsd-3-clause
524
0
6
136
159
93
66
12
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RecordWildCards, FlexibleInstances, DefaultSignatures #-} ------------------------------------------------------------------------------ -- | -- Module: Database.PostgreSQL.Simple.FromRow -- Copyright: (c) 2012 Leon P Smith -- License: BSD3 -- Maintainer: Leo...
timmytofu/postgresql-simple
src/Database/PostgreSQL/Simple/FromRow.hs
bsd-3-clause
10,591
0
22
2,628
3,475
1,890
1,585
-1
-1
-- | Select the specific media header from the 'HandlerType' module Data.ByteString.IsoBaseFileFormat.Boxes.SpecificMediaHeader where -- -- import Data.ByteString.IsoBaseFileFormat.Boxes.VideoMediaHeader import Data.ByteString.IsoBaseFileFormat.Boxes.Handler -- -- | An open type family to select the specific media he...
sheyll/isobmff-builder
src/Data/ByteString/IsoBaseFileFormat/Boxes/SpecificMediaHeader.hs
bsd-3-clause
397
0
6
44
35
27
8
-1
-1
----------------------------------------------------------------------------- -- | -- Module : Examples.CRC.USB5 -- Copyright : (c) Levent Erkok -- License : BSD3 -- Maintainer : erkokl@gmail.com -- Stability : experimental -- -- The USB5 CRC implementation -------------------------------------------...
Copilot-Language/sbv-for-copilot
SBVUnitTest/Examples/CRC/USB5.hs
bsd-3-clause
1,586
0
11
344
384
205
179
28
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings...
yesodweb/persistent
persistent-mysql/test/JSONTest.hs
mit
1,137
0
19
171
200
119
81
29
1
-- -- -- ----------------- -- Exercise 7.27. ----------------- -- -- -- module E'7'27 where import Prelude hiding ( getLine ) -- Subchapter 7.6 (relevant definitions of it): type Word = String type Line = [Word] getLine :: Int -> [Word] -> Line -- Use "import Prelude hiding (getLine)" to avoid an ambiguous oc...
pascal-knodel/haskell-craft
_/links/E'7'27.hs
mit
1,815
0
9
385
296
170
126
26
1
{- | Module : $Header$ Description : termination proofs for equation systems, using AProVE Copyright : (c) Mingyi Liu and Till Mossakowski and Uni Bremen 2004-2005 License : GPLv2 or higher, see LICENSE.txt Maintainer : xinga@informatik.uni-bremen.de Stability : provisional Portability : portable ...
keithodulaigh/Hets
CASL/CCC/TerminationProof.hs
gpl-2.0
8,358
45
36
2,172
2,566
1,285
1,281
181
13
{-# LANGUAGE BangPatterns #-} {-# OPTIONS_HADDOCK hide, prune #-} -- | -- Module : Data.ByteString.Search.Internal.BoyerMoore -- Copyright : Daniel Fischer -- Chris Kuklewicz -- Licence : BSD3 -- Maintainer : Daniel Fischer <daniel.is.fischer@googlemail.com> -- Stability : ...
seereason/stringsearch
Data/ByteString/Search/Internal/BoyerMoore.hs
bsd-3-clause
22,290
0
21
6,982
2,840
1,544
1,296
225
9
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Yi.Keymap.Vim.NormalOperatorPendingMap -- License : GPL-2 -- Maintainer : yi-devel@googlegroups.com -- Stability : experimental -- Portability : portable module Yi.Keymap.Vim.NormalOperatorPendingMap (d...
yi-editor/yi
yi-keymap-vim/src/Yi/Keymap/Vim/NormalOperatorPendingMap.hs
gpl-2.0
7,294
0
25
2,456
1,914
972
942
145
9
{-# LANGUAGE DataKinds, TypeOperators, OverloadedStrings #-} module CoinBias20 where import Prelude (print, length, IO) import Language.Hakaru.Syntax.Prelude import Language.Hakaru.Disintegrate import Language.Hakaru.Syntax.ABT import Language.Hakaru.Syntax.AST import Language.Hakaru.Types.DataKind import Language.Ha...
zaxtax/hakaru
haskell/Tests/Unroll/CoinBias20.hs
bsd-3-clause
3,050
0
87
1,436
756
393
363
77
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE NondecreasingIndentation #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE ViewPatterns #-} {-# OPTIONS -f...
GaloisInc/halvm-ghc
ghc/GHCi/UI.hs
bsd-3-clause
141,934
11
104
40,582
34,741
17,308
17,433
-1
-1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} module Tinc.RecentCheck ( isRecent , markRecent , tincEnvCreationTime ) where import Data.Maybe import Data.Time import System.Directory import System.FilePath import Tinc.Facts import Tinc.Nix i...
haskell-tinc/tinc
src/Tinc/RecentCheck.hs
bsd-3-clause
1,741
0
19
351
443
226
217
45
3
----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Haddock -- Copyright : Isaac Jones 2003-2005 -- License : BSD3 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- This module deals with the @haddock@ and @hscolour...
corngood/cabal
Cabal/Distribution/Simple/Haddock.hs
bsd-3-clause
32,693
0
26
9,908
7,351
3,864
3,487
605
7
{-# LANGUAGE CPP, MagicHash, UnboxedTuples #-} -- | -- Module : Data.Text.Unsafe -- Copyright : (c) 2009, 2010, 2011 Bryan O'Sullivan -- License : BSD-style -- Maintainer : bos@serpentine.com, rtomharper@googlemail.com, -- duncan@haskell.org -- Stability : experimental -- Portability : porta...
ssaavedra/liquidhaskell
benchmarks/text-0.11.2.3/Data/Text/Unsafe.hs
bsd-3-clause
6,469
0
11
1,978
920
517
403
70
1
a = b b = a main :: IO () main = return ()
hvr/jhc
regress/tests/0_parse/2_pass/Recursive2.hs
mit
45
2
6
16
37
16
21
4
1
{-# LANGUAGE DeriveDataTypeable #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Util.Replace -- Copyright : (c) Jan Vornberger 2009 -- License : BSD3-style (see LICENSE) -- -- Maintainer : Adam Vogt <vogt.adam@gmail.com> -- Stability : unstabl...
markus1189/xmonad-contrib-710
XMonad/Util/Replace.hs
bsd-3-clause
4,020
0
19
933
448
244
204
35
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | An abstraction for re-running actions if values or files have changed. -- -- This is not a full-blown make-style incremental build system, it's a bit -- more ad-hoc than that, but it's easier to integrate with existing code. -- -- It's a convenient interface to the "Dis...
mydaum/cabal
cabal-install/Distribution/Client/RebuildMonad.hs
bsd-3-clause
8,448
0
17
1,928
1,519
807
712
149
5
{-# OPTIONS_GHC -fprof-auto #-} module B where plus_noinline :: Integer -> Integer -> Integer plus_noinline x y = x + y {-# NOINLINE plus_noinline #-} -- | This is the key function. We do not want this to be inlined into bar, but -- we DO want it to be inlined into main (in A.hs). Moreover, when it is inlined -- into...
ezyang/ghc
testsuite/tests/profiling/should_compile/T5889/B.hs
bsd-3-clause
2,438
0
8
688
193
110
83
12
2
module Q where q = "I AM THE ONE"
mydaum/cabal
cabal-testsuite/PackageTests/InternalLibraries/p/q/Q.hs
bsd-3-clause
34
0
4
9
9
6
3
2
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeOperators #-} {- Exercising avoidance of known landmines. We need one each of PostTc id Kind PostTc id Type PostRn id Fixity PostRn id NameSet -} module MineType where foo = undefined
urbanslug/ghc
testsuite/tests/ghc-api/landmines/MineType.hs
bsd-3-clause
298
0
4
61
14
11
3
6
1
{-# OPTIONS -XRecursiveDo -XScopedTypeVariables #-} module Main(main) where import Control.Monad.Fix import Data.Array.IO import Control.Monad norm a = mdo (_, sz) <- getBounds a s <- ioaA 1 s sz 0 return () where ioaA i s sz acc | i > sz = return acc | True = do v <- readArray a i ...
siddhanathan/ghc
testsuite/tests/mdo/should_run/mdorun001.hs
bsd-3-clause
740
4
12
223
342
166
176
-1
-1
{-# LANGUAGE NoMonomorphismRestriction #-} module Plugins.Gallery.Gallery.Manual17 where import Diagrams.Prelude example = position (zip (map mkPoint [-3, -2.8 .. 3]) (repeat dot)) where dot = circle 0.2 # fc black mkPoint x = p2 (x,x^2)
andrey013/pluginstest
Plugins/Gallery/Gallery/Manual17.hs
mit
266
0
11
62
95
52
43
6
1
import Test.HUnit foo x = x --test1 = TestCase (assertEqual "for (foo 3)," (1,2) (foo 3)) return' a = a >> a
RAFIRAF/HASKELL
test.hs
mit
113
2
6
25
30
14
16
-1
-1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeSynonymInstances #-} module IHaskell.Display.Widgets.Selection.RadioButtons ( -- * The RadioButtons Widget RadioButtons, -- * Constructor mkRadioButtons) where -- To keep `cab...
sumitsahrawat/IHaskell
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Selection/RadioButtons.hs
mit
2,234
0
17
552
454
234
220
50
1
module Rebase.Data.ByteString.Builder.Scientific ( module Data.ByteString.Builder.Scientific ) where import Data.ByteString.Builder.Scientific
nikita-volkov/rebase
library/Rebase/Data/ByteString/Builder/Scientific.hs
mit
146
0
5
12
26
19
7
4
0
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.SVGFETileElement (getIn1, SVGFETileElement(..), gTypeSVGFETileElement) where import Prelude ((.), (==), (>>=), re...
ghcjs/jsaddle-dom
src/JSDOM/Generated/SVGFETileElement.hs
mit
1,275
0
10
136
345
224
121
20
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE DeriveDataTypeable #-} module SharedTypes where import Prelude import Data.Data import Fay.Yesod import Data.Text (Text) data Command = AModel (Text) (Returns [(Text, Int)]) | AAge (Text) (Returns [(Text, Int)]) | AGen (Text,Text) (Returns ...
swamp-agr/carbuyer-advisor
fay-shared/SharedTypes.hs
mit
1,423
0
11
432
492
287
205
34
0
module Hoton.VectorSpec (spec) where import Test.Hspec import Test.QuickCheck import Control.Exception import Hoton.TestUtils import Hoton.Types import Hoton.Vector t2cart (x1,x2,x3) = Cartesian x1 x2 x3 spec :: Spec spec = do describe "Hoton.Vector.scalar" $ do it "returns 0 for perpendicular vectors"...
woufrous/hoton
test/Hoton/VectorSpec.hs
mit
2,294
0
20
612
838
431
407
43
1
main = print(sum [x | x <- [1..1000], mod x 3 == 0 || mod x 5 == 0])
mhseiden/euler-haskell
src/p1.hs
mit
70
0
13
20
57
28
29
1
1
-- | -- The 'FP15.Compiler.Syntax' module contains FP15-specific parsing logic for -- syntactic sugars. module FP15.Compiler.Syntax ( module FP15.Compiler.Syntax.SmartSplit , module FP15.Compiler.Syntax.Precedence , module FP15.Compiler.Syntax.CommaNotation ) where import FP15.Compiler.Syntax.SmartSplit import FP15.C...
Ming-Tang/FP15
src/FP15/Compiler/Syntax.hs
mit
451
0
5
45
58
43
15
8
0
-- | Canon representation of linear program module Numeric.Limp.Canon.Program where import Numeric.Limp.Canon.Linear import Numeric.Limp.Canon.Constraint import Numeric.Limp.Rep import Data.Map (Map) import qualified Data.Map as M import Data.Set (Set) import qualified Data.Set as S -- | A program represented by obj...
amosr/limp
src/Numeric/Limp/Canon/Program.hs
mit
1,843
0
13
456
726
386
340
44
4
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TypeFamilies #-} {- |Implementation of a connection using WebSockets. -} module WsConnection (WsConnection(..)) where import App.ConnectionMgnt import ClassyPrelude import qualified Data.Aeson as Aeson import qualified Network.WebSockets...
Haskell-Praxis/core-catcher
app/WsConnection.hs
mit
731
0
10
164
146
81
65
17
0
{-# LANGUAGE DeriveDataTypeable #-} module Template.Module ( moduleXml, configXml ) where import Template (render) import Data.Data (Data, Typeable) data ModuleTemplate = ModuleTemplate { codepool :: String, fullModuleName :: String } deriving (Data, Typeable) moduleXml :: String -> String -> IO Str...
prasmussen/magmod
Template/Module.hs
mit
559
0
8
93
140
77
63
16
1
import SudokuGen import SudokuSorted import SudokuHelper main = do puzzle <- sudokuGen putStrLn (pretty $ puzzle) putStrLn (pretty $ solveStr puzzle)
ztuowen/sudoku
sgen.hs
mit
163
0
10
34
51
25
26
7
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-attributedef.html module Stratosphere.ResourceProperties.DynamoDBTableAttributeDefinition where imp...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/DynamoDBTableAttributeDefinition.hs
mit
2,339
0
13
221
270
154
116
30
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobdefinition.html module Stratosphere.Resources.BatchJobDefinition where import Stratosphere.ResourceIm...
frontrowed/stratosphere
library-gen/Stratosphere/Resources/BatchJobDefinition.hs
mit
4,874
0
15
506
698
401
297
59
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-maintenancewindowtask-maintenancewindowlambdaparameters.html module Stratosphere.ResourceProperties.SSMMa...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/SSMMaintenanceWindowTaskMaintenanceWindowLambdaParameters.hs
mit
3,719
0
12
256
358
205
153
32
1
-- Top-level functions: -- * reading/writing morphology databases -- * writing Lexicon, Tables, GF, XFST, Latex -- * analysis/synthesis (Trie) module GeneralIO where import Print import General import Dictionary import Trie import IO import Map import Frontend import List (nub) import Maybe(fromJust) import ErrM t...
icemorph/icemorph
bin/FM/lib/GeneralIO.hs
cc0-1.0
6,102
68
21
1,632
1,798
922
876
121
7
{- | Module : $Header$ Description : Parser for basic specs Copyright : (c) Dominik Luecke, Uni Bremen 2007 License : GPLv2 or higher, see LICENSE.txt Maintainer : luecke@informatik.uni-bremen.de Stability : experimental Portability : portable Parser for abstract syntax for propositional logic ...
nevrenato/HetsAlloy
Propositional/Parse_AS_Basic.hs
gpl-2.0
6,706
0
17
1,700
1,788
921
867
139
3
-- OmegaGB Copyright 2007 Bit Connor -- This program is distributed under the terms of the GNU General Public License ----------------------------------------------------------------------------- -- | -- Module : Prerequisites -- Copyright : (c) Bit Connor 2007 <bit@mutantlemon.com> -- License : GPL -- Ma...
bitc/omegagb
src/Prerequisites.hs
gpl-2.0
1,332
0
4
333
32
27
5
3
0
module Expr where -- -- datatypes and expressions -- and some functions to parse and output them -- import Lexer import Types import ApplicativeParsec hiding (SourcePos) import Text.ParserCombinators.Parsec.Expr table :: OperatorTable Char st Expression table = [ [prefix "+", prefix "-"], [b...
Jem777/deepthought
src/Expr.hs
gpl-3.0
4,293
200
17
985
1,481
781
700
94
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UnicodeSyntax #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : HBooru.Parsers.Konachan -- Copyright : (c) Mateusz Kowalczyk 2013-2014 -- License : GPL-3 -- -- Maintainer : fuuzetsu@f...
Fuuzetsu/h-booru
src/HBooru/Parsers/Konachan.hs
gpl-3.0
2,812
0
39
568
569
316
253
72
1
-- | Handling of the configuration file. {-# LANGUAGE TemplateHaskell, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, UndecidableInstances #-} module Adam.FeedTorrent.Config where import Data.Generics.SYB.WithClass.Derive import Text.RJson import Adam.FeedTorrent.Imports import Adam.FeedTorrent.Data --...
bergmark/feedtorrent
Adam/FeedTorrent/Config.hs
gpl-3.0
2,118
0
9
451
376
209
167
35
1
{-# LANGUAGE OverloadedStrings #-} {- vim: set foldmethod=marker : -} module Main where -- Imports ------------------------------------------------------------{{{ import Control.Monad (liftM, when, join) import Control.Monad.IO.Class (MonadIO) import Control.Monad.Except (lift...
xelxebar/xmppcat
src/Main.hs
gpl-3.0
8,873
0
20
3,482
2,068
1,123
945
185
4
import Control.Monad (when) import System.Exit (exitFailure) import Test.QuickCheck (quickCheckResult) import Test.QuickCheck.Test (isSuccess) import Data.Array.Accelerate hiding (all, not, length) import Prelude hiding (zipWith) -- import Data.Array.Accelerate.Interpreter as I import Data.Array.Accelerate.CUDA as ...
kathawala/symdiff
tests/Test.hs
gpl-3.0
2,277
0
18
408
1,111
621
490
38
1
module ExpectationsAnalyzerSpec(spec) where import Language.Mulang import Language.Mulang.Analyzer hiding (result, spec) import Test.Hspec result expectationResults smells = emptyCompletedAnalysisResult { expectationResults = expectationResults, smells = smells } run language content ...
mumuki/mulang
spec/ExpectationsAnalyzerSpec.hs
gpl-3.0
9,897
0
15
2,012
2,884
1,414
1,470
139
1
// In Haskell, a function type is constructed using the arrow type constructor (->) // which takes two types: // the argument type and the result type. // You’ve already seen it in infix form, a->b, // but it can equally well be used in prefix form, when parenthesized: (->) a b // // Another explanation: // (->) is ...
sujeet4github/MyLangUtils
CategoryTheory_BartoszMilewsky/PI_07_Functors/Reader_Functor.hs
gpl-3.0
915
63
9
195
448
223
225
2
0
{- ============================================================================ | Copyright 2011 Matthew D. Steele <mdsteele@alum.mit.edu> | | | | This file is part of Fallback. | ...
mdsteele/fallback
src/Fallback/Constants.hs
gpl-3.0
5,944
0
9
1,328
787
448
339
92
1
module CFrac where { -- This module defines a Style for the display of a continued fraction (whose coefficients -- are defined as a list of numbers). -- Limitations: -- At present, the size is hardwired into the function. It should be a -- parameter. Ideally it should make use of the primitive -- fontS...
ckaestne/CIDE
CIDE_Language_Haskell/test/fromviral/CFrac.hs
gpl-3.0
1,333
0
12
351
357
206
151
21
1
{-# LANGUAGE DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses, UndecidableInstances, DeriveDataTypeable, TemplateHaskell #-} module Language.Subleq.Configure where -- import Language.Subleq.Model.Prim import qualified Language.Subleq.Model.Memory as Mem -- import Language.Subleq.Model.Architecture.IntMachi...
Hara-Laboratory/subleq-toolchain
Language/Subleq/Configure.hs
gpl-3.0
5,596
0
13
2,951
1,147
690
457
-1
-1
module Triplet (isPythagorean, mkTriplet, pythagoreanTriplets) where import Data.List (sort) isPythagorean :: (Int, Int, Int) -> Bool isPythagorean (a', b', c') = a * a + b * b == c * c where [a, b, c] = sort [a', b', c'] mkTriplet :: Int -> Int -> Int -> (Int, Int, Int) mkTriplet a' b' c' = (a, b, c) where ...
daewon/til
exercism/haskell/pythagorean-triplet/src/Triplet.hs
mpl-2.0
533
0
9
118
285
163
122
11
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-datafusion/gen/Network/Google/Resource/DataFusion/Projects/Locations/Operations/Cancel.hs
mpl-2.0
6,638
0
16
1,357
794
470
324
115
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/DicomStores/TestIAMPermissions.hs
mpl-2.0
7,439
0
16
1,444
791
467
324
126
1