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 FlexibleContexts #-} -- | Common pitch. module Music.Pitch.Common.Pitch ( -- * Accidentals Accidental, natural, flat, sharp, doubleFlat, doubleSharp, -- ** Inspecting accidentals isNatural, isFlattened, isSharpened, ...
music-suite/music-pitch
src/Music/Pitch/Common/Pitch.hs
bsd-3-clause
6,271
0
13
1,609
1,558
858
700
126
1
module DocgenSpec where import qualified Pact.Docgen as Docgen import Test.Hspec spec :: Spec spec = runIO Docgen.main
kadena-io/pact
tests/DocgenSpec.hs
bsd-3-clause
131
0
6
29
32
20
12
5
1
{- DATX02-17-26, automated assessment of imperative programs. - Copyright, 2017, see AUTHORS.md. - - 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 2 - of the License, or (at...
DATX02-17-26/DATX02-17-26
libsrc/Norm/NormCS.hs
gpl-2.0
1,570
0
5
301
83
57
26
12
0
{-# LANGUAGE OverloadedStrings #-} module DetailedTx where import Data.Aeson hiding (decode') import Data.Aeson.Types (Pair) import qualified Data.ByteString.Lazy as LBS import qualified Data.Text as T import Network.Haskoin.Crypto (pubKeyAddr,addrToBase58,derivePubKey,toWif) import Network.Haskoin.Transaction (txHas...
haskoin/hx
DetailedTx.hs
gpl-3.0
3,195
0
14
945
864
478
386
74
1
main = f "abc\ndef" f "abc\ndef" = 3
roberth/uu-helium
test/correct/EscapeInString.hs
gpl-3.0
38
0
5
9
17
8
9
2
1
{- Copyright 2012-2013 Google Inc. 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 applicable law or agreed t...
mzero/plush
src/Plush/Run/Posix/Utilities.hs
apache-2.0
6,077
0
12
1,235
1,361
751
610
97
5
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section{@Vars@: Variables} -} {-# LANGUAGE CPP, DeriveDataTypeable #-} -- | -- #name_types# -- GHC uses several kinds of name internally: -- -- * 'OccName.OccName': see "OccName#name_types" -- -- * 'RdrName.RdrName': see ...
rahulmutt/ghcvm
compiler/Eta/BasicTypes/Var.hs
bsd-3-clause
15,903
0
11
4,343
2,611
1,469
1,142
215
1
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} module Snap.Snaplet.Config where ------------------------------------------------------------------------------ import Data.Function (on) import Data.Maybe (fromMaybe) i...
sopvop/snap
src/Snap/Snaplet/Config.hs
bsd-3-clause
3,302
0
13
726
474
270
204
39
1
{-# LANGUAGE Unsafe #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE UnboxedTuples #-} ----------------------------------------------------------------------------- -- | -- Module : Debug.Trace -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the...
alexander-at-github/eta
libraries/base/Debug/Trace.hs
bsd-3-clause
9,371
0
17
1,898
615
401
214
50
1
module Card.Json where import Data.Aeson import Data.Maybe import qualified Network.Wreq as W import Control.Monad.Ether.Implicit import Control.Monad.Trans import Control.Lens import Config import Card.Type import qualified Data.ByteString.Lazy as BS import System.Log.Logger import Control.Concurrent.STM import Syste...
hithroc/hsvkbot
src/Card/Json.hs
bsd-3-clause
1,502
0
14
307
514
263
251
-1
-1
-- Simple data type to keep track of character positions -- within a text file or other text stream. module Pos where -- Basic position indicator data type: filename, line number, column number. data Pos = Pos { posFile :: !String, posLine :: !Int, posCol :: !Int } -- Incrementally compute the next position i...
YoshikuniJujo/lojbanXiragan
src/Pos.hs
bsd-3-clause
1,572
36
15
351
451
236
215
29
3
{-# LANGUAGE CPP #-} -- | This module provides an interface for typechecker plugins to -- access select functions of the 'TcM', principally those to do with -- reading parts of the state. module TcPluginM ( #ifdef GHCI -- * Basic TcPluginM functionality TcPluginM, tcPluginIO, tcPluginTra...
GaloisInc/halvm-ghc
compiler/typecheck/TcPluginM.hs
bsd-3-clause
5,886
0
10
1,208
1,140
641
499
2
0
module Language.Lua.Parser ( A.parseText , A.parseNamedText , parseFile , A.parseTokens , stat , exp , chunk ) where import Control.Monad (liftM) import Prelude hiding (exp) import qualified Language.Lua.Annotated.Parser as A import ...
yav/language-lua
src/Language/Lua/Parser.hs
bsd-3-clause
710
0
9
195
202
117
85
22
1
-- | Tools for parsing a SGF string. module Sgf ( parseSgf ) where import Control.Applicative import Data.Attoparsec.Combinator import Data.Attoparsec.Text import Data.Char (isUpper, isSpace) import Data.Map (Map) import qualified Data.Map as Map import D...
pminten/xhaskell
sgf-parsing/example.hs
mit
2,237
0
16
607
547
293
254
36
5
{-# LANGUAGE FlexibleContexts #-} module Control.Search.Combinator.Until (until,limit,glimit) where import Prelude hiding (until) import Data.Int import Control.Search.Language import Control.Search.GeneratorInfo import Control.Search.MemoReader import Control.Search.Generator import Control.Search.Combinator.Failur...
neothemachine/monadiccp
src/Control/Search/Combinator/Until.hs
bsd-3-clause
12,045
25
32
5,636
3,358
1,767
1,591
146
7
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-missing-fields #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -------------------...
getyourguide/fbthrift
thrift/compiler/test/fixtures/service-fuzzer/gen-hs/TestService_Iface.hs
apache-2.0
2,451
0
25
448
540
364
176
41
0
import StackTest main :: IO () main = do removeFileIgnore "stack.yaml" removeFileIgnore "issue3397.cabal" stack ["init", "--solver", "--resolver", "ghc-8.0.2"] stack ["solver", "--update-config"]
anton-dessiatov/stack
test/integration/tests/3397-ghc-solver/Main.hs
bsd-3-clause
205
0
8
30
61
30
31
7
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP , NoImplicitPrelude , MagicHash , UnboxedTuples #-} {-# LANGUAGE CApiFFI #-} -- We believe we could deorphan this module, by moving lots of things -- around, but we haven't got there yet: {-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_HADDOC...
tolysz/prepare-ghcjs
spec-lts8/base/GHC/Float.hs
bsd-3-clause
48,135
29
29
16,112
10,847
5,751
5,096
-1
-1
{-# LANGUAGE TemplateHaskell, FunctionalDependencies #-} {-| Implementation of the Ganeti Instance config object. -} {- Copyright (C) 2014 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: ...
andir/ganeti
src/Ganeti/Objects/Nic.hs
bsd-2-clause
2,083
0
11
337
196
120
76
19
0
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable, DeriveGeneric #-} {-# OPTIONS_GHC -Wall #-} import Control.Distributed.Process hiding (Message) import Control.Distributed.Process.Closure import Control.Monad import Text.Printf import GHC.Generics (Generic) import Data.Binary import Data.Typeable import DistribUtils...
prt2121/haskell-practice
parconc/distrib-ping/ping-tc-merge.hs
apache-2.0
1,443
0
15
292
446
224
222
41
1
{-# LANGUAGE TypeFamilies #-} module T4093a where type family Foo x type instance Foo () = Maybe () hang :: (Foo e ~ Maybe e) => Foo e hang = Just () -- Type is not ambiguous; should get a complaint -- for (e ~ ()) arising from the Just () {- Ambiguity check [G] Foo e ~ Maybe e [W] Foo e ~ Foo e0 [W] Foo e0 ~ M...
urbanslug/ghc
testsuite/tests/indexed-types/should_fail/T4093a.hs
bsd-3-clause
872
0
8
239
66
37
29
6
1
{-# LANGUAGE MagicHash , UnboxedTuples #-} module T8598(fun) where import GHC.Float (Double(..)) import GHC.Integer (decodeDoubleInteger, encodeDoubleInteger) -- Float.scaleFloat for Doubles, slightly simplified fun :: Double -> Double fun x | isFix = x | otherwise = case x of (D# x#...
urbanslug/ghc
testsuite/tests/stranal/sigs/T8598.hs
bsd-3-clause
529
0
14
125
147
79
68
11
1
{-# OPTIONS_HADDOCK hide #-} module BlasCTypes (BlasInt, BlasIndex) where import Prelude () import Foreign.C.Types (CInt, CSize) -- Here, we define some aliases for the C types in case the Blas -- implementation decides to use some non-standard types. -- This is the main integral type used by the CBlas interface. Us...
Rufflewind/blas-hs
src/BlasCTypes.hs
mit
709
0
5
121
53
38
15
6
0
module Colin.Resource.Load.Texture (loadTexture, readTexture) where import Graphics.Rendering.OpenGL import Foreign.ForeignPtr (withForeignPtr) import Data.ByteString (ByteString) import qualified Data.ByteString.Lazy as L (ByteString) import Codec.Picture.Repa import Data.Array.Repa (extent) import Data.Array.Repa.In...
scan/Colin
src/Colin/Resource/Load/Texture.hs
mit
1,313
0
13
285
476
244
232
31
2
module Models.ColumnTypes where import ClassyPrelude.Yesod data ReadableType = Book | Paper deriving (Show, Read, Eq) data ReadingStatus = Unread | ToRead | Reading | DoneReading deriving (Show, Read, ...
darthdeus/reedink
Models/ColumnTypes.hs
mit
823
0
9
291
197
97
100
-1
-1
module CombineSpec where import Test.Hspec import Combine main :: IO () main = hspec spec spec :: Spec spec = do describe "combinations" $ it "should give 4 for sample input" $ combinations [20,15,10,5,5] 25 `shouldBe` 4 describe "combinationsMinimum" $ it "should give 2 for sample input" $ ...
corajr/adventofcode2015
17/test/CombineSpec.hs
mit
371
0
10
81
126
69
57
13
1
{-# LANGUAGE BangPatterns #-} module Life ( Board , Generation(..) , randomBoard , nextGeneration , getCoords , countAlive ) where import System.Random import qualified Data.Vector.Unboxed as U -- Way too many object created if we use boxed vect...
ksaveljev/game-of-life
src/Life.hs
mit
2,086
0
15
741
688
354
334
58
1
{-# LANGUAGE MultiParamTypeClasses, NamedFieldPuns, FlexibleInstances, FlexibleContexts, UndecidableInstances #-} -- | Fresh name monad. module Fresh where import Control.Monad.State import qualified Abstract as A import ListEnv as Env type Renaming = Env A.UID A.Name -- Map A.Name A.Name class MonadFresh m ...
andreasabel/helf
src/Fresh.hs
mit
794
0
14
210
212
116
96
21
0
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE BangPatterns #-} module AI.Clustering.KMeans ( KMeans(..) , KMeansOpts(..) , defaultKMeansOpts , kmeans , kmeansBy -- * Initialization methods , Method(..) , decode -- * References -- $references ) where import Control.Monad...
kaizhang/clustering
src/AI/Clustering/KMeans.hs
mit
5,323
0
19
1,573
1,692
898
794
115
4
{-# htermination mapMaybe :: (a -> Maybe b) -> [a] -> [b] #-} import Maybe
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Maybe_mapMaybe_1.hs
mit
75
0
3
15
5
3
2
1
0
import System.IO import Data.List import Data.Char main = do handle <- openFile "day3input.txt" ReadMode contents <- hGetContents handle let splitContent = words contents result = compute splitContent print result hClose handle compute :: [String] -> Int c...
aBhallo/AoC2016
Day 3/day3part1.hs
mit
677
0
10
175
250
125
125
20
1
module Main where import Test.Framework (defaultMain, testGroup, Test) import Test.Framework.Providers.QuickCheck2 (testProperty) import Data.Word (Word64) import System.Random.SplitMix.Gen import System.Random.SplitMix.MathOperations (c_mix64, c_mixGamma, xorShift33) prop_xorShift33SelfInvertible i = i == (xorShif...
nkartashov/SplitMix
tests/Main.hs
mit
1,778
0
8
237
390
214
176
32
1
{-# LANGUAGE OverloadedStrings, DeriveGeneric #-} module Mint.Account (mintAccounts) where import Control.Lens import Data.Aeson import Data.Aeson.Lens (key) import qualified Data.Text as Text import Database.HDBC import Database.HDBC.Sqlite3 import GHC.Generics import Network.URI import qualified Network.Wreq as Wre...
jpotterm/manila-hs
src/Mint/Account.hs
cc0-1.0
2,671
0
26
904
558
282
276
-1
-1
{-# LANGUAGE BangPatterns #-} import Control.DeepSeq (($!!)) import qualified Data.ByteString as BS import Data.List (sort) import Data.Time (DiffTime) import Data.Word (Word32) import Network.Pcap (openOffline, setFilter, dispatchBS, PktHdr, PcapHandle, nextBS, hdrWireLength) import qualified Par...
agremm/Kospi
parsergen/seq/Main.hs
gpl-2.0
2,189
0
19
763
718
351
367
55
3
{- | Module : $Header$ Description : Manchester syntax parser for OWL 2 Copyright : (c) DFKI GmbH, Uni Bremen 2007-2010 License : GPLv2 or higher, see LICENSE.txt Maintainer : [email protected] Stability : provisional Portability : portable Contains : Parser for the Manchester Syntax i...
nevrenato/HetsAlloy
OWL2/Parse.hs
gpl-2.0
18,655
0
19
4,110
5,709
2,811
2,898
454
8
f' :: Maybe a -> Maybe b f' Nothing = Nothing f' (Just x) = Just (f x)
hmemcpy/milewski-ctfp-pdf
src/content/1.7/code/haskell/snippet03.hs
gpl-3.0
70
0
7
17
47
22
25
3
1
{-# LANGUAGE TypeOperators, GADTs, ScopedTypeVariables, Rank2Types #-} ----------------------------------------------------------------------------- -- | -- Module : Hoodle.Accessor -- Copyright : (c) 2011-2013 Ian-Woo Kim -- -- License : BSD3 -- Maintainer : Ian-Woo Kim <[email protected]> -- Stabilit...
wavewave/hoodle-core
src/Hoodle/Accessor.hs
gpl-3.0
7,463
0
15
1,895
1,385
711
674
117
4
{- Python5 — a hypothetic language Copyright (C) 2015 - Yuriy Syrovetskiy This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) ...
cblp/python5
python5/tests/Operator.hs
gpl-3.0
1,008
0
10
236
96
53
43
10
1
{-| Module : Common.Db.FileAccess Description : Read and write from files Copyright : (C) Marcus Pedersén, 2014 License : GPLv3 Maintainer : [email protected] Stability : Stable Portability : Portable Version : v1.0.0 Handles read and write from files in a generic way. Saves files in a subdirectory ...
xmarcux/MyOfficeState
src/Common/Db/FileAccess.hs
gpl-3.0
1,831
0
10
409
318
159
159
23
2
module Response.Graph (graphResponse) where import Happstack.Server import MasterTemplate import Scripts import Text.Blaze ((!)) import qualified Text.Blaze.Html5 as H import qualified Text.Blaze.Html5.Attributes as A graphResponse :: ServerPart Response graphResponse = ok $ toResponse $ masterTemplate "Co...
Courseography/courseography
app/Response/Graph.hs
gpl-3.0
512
0
13
166
112
65
47
17
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.Testing.Types -- Copyright : (c) 2015-2016 Brendan Hay...
brendanhay/gogol
gogol-testing/gen/Network/Google/Testing/Types.hs
mpl-2.0
12,112
0
7
3,309
1,451
1,001
450
420
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-kms/gen/Network/AWS/KMS/RevokeGrant.hs
mpl-2.0
3,384
0
9
774
425
260
165
55
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/Instances/Stop.hs
mpl-2.0
5,113
5
19
1,179
564
342
222
84
1
{-# OPTIONS_GHC -fno-warn-type-defaults #-} import Data.Array (listArray) import Data.Foldable (for_) import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import Matrix (saddlePoints) main :: IO () main = hspecWith defaultConfig {confi...
daewon/til
exercism/haskell/saddle-points/test/Tests.hs
mpl-2.0
1,732
0
12
805
510
316
194
31
1
module Send ( module Control.Concurrent, module Control.Concurrent.STM , SenderChan, clearSender, senderThread ) where import System.IO import Control.Concurrent import Control.Concurrent.STM import Control.Monad import Helpers type SenderChan = TChan String chunkSend :: Integer -> Integer -> IO a -> IO () chun...
DDOS-code/rivertam
src/Send.hs
agpl-3.0
1,038
8
16
204
379
189
190
33
2
import Network.MessagePackRpc.Client ping :: RpcMethod (String -> IO String) ping = method "ping" main = do conn <- connect "127.0.0.1" 9000 print =<< ping conn "haskell client calling."
turkia/msgpack_rpc_server
examples/haskell/ping.hs
lgpl-3.0
194
0
8
35
62
30
32
6
1
{-- 1. 2 + 2 * 3 -1 Prelude> 2 + 2 * 3 - 1 7 Prelude> 2 + (2 * 3) - 1 7 2. Prelude> (^) 10 $ 1 + 1 100 Prelude> (1 + 1) ^ 10 1024 Prelude> 10 ^ (1 + 1) 100 3. Prelude> 2 ^ 2 * 4 ^ 5 + 1 4097 Prelude> (2 ^ 2) * (4 ^ 5) + 1 4097 Prelude> ((2 ^ 2) * (4 ^ 5)) + 1 4097 Equivalent expressions 1. Same result Prelude>...
dmp1ce/Haskell-Programming-Exercises
Chapter 2/Chapter Exercises.hs
unlicense
1,318
0
7
381
60
32
28
6
1
main :: IO () main = putStrLn "Benchmarks not yet implemented"
mgattozzi/curryrs
haskell/benches/Benches.hs
apache-2.0
63
0
6
11
19
9
10
2
1
-- Copyright 2022 Google LLC -- -- 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 applicable law or agreed to in ...
google/mlir-hs
src/MLIR/AST/Dialect/Func.hs
apache-2.0
711
0
5
115
40
33
7
3
0
cdiv m n = ceiling $ (fromIntegral m) / (fromIntegral n) ans' (a:[]) = [] ans' (a1:a2:as) = ((a2-a1-1)`cdiv`2):(ans' (a2:as)) ans [[n,m],a@(a1:as)] = maximum $ (a1-1):(ans' (a++[n+(n-al)])) where al = last a main = do c <- getContents let i = map (map read) $ map words $ lines c :: [[Int]] o = ans i ...
a143753/AOJ
1574.hs
apache-2.0
330
0
14
79
255
134
121
10
1
-- http://www.codewars.com/kata/547202bdf7587835d9000c46 {-# LANGUAGE NoImplicitPrelude #-} module Monads where import Prelude hiding (Monad, Identity, Maybe(..), State, Reader, Writer) import Data.Monoid class Monad m where return :: a -> m a (>>=) :: m a -> (a -> m b) -> m b data Identity a = Identity a deri...
Bodigrim/katas
src/haskell/B-Five-Fundamental-Monads.hs
bsd-2-clause
1,134
0
13
266
556
300
256
31
0
module Drasil.SWHS.TMods (PhaseChange(Liquid), consThermE, latentHtE, nwtnCooling, sensHtE, sensHtETemplate, tMods) where import Language.Drasil import Control.Lens ((^.)) import Theory.Drasil (TheoryModel, tm) import Utils.Drasil import Data.Drasil.Concepts.Documentation (system) import Data.Drasil.Concepts.Math (...
JacquesCarette/literate-scientific-software
code/drasil-example/Drasil/SWHS/TMods.hs
bsd-2-clause
7,124
0
14
1,128
1,965
1,066
899
123
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {- | This module contains a faster implementation of dyadic rationals using a fast arbitrary-precision floating-point library MPFR via haskel module Data.Rounded -} module Data.Approximate.Floating.HMPFR where import Data.Approximate.ApproximateField...
comius/haskell-fast-reals
src/Data/Approximate/Floating/HMPFR.hs
bsd-2-clause
1,379
1
11
276
457
239
218
32
1
module Interpreter where import Data.Array import Data.Char import Data.Maybe(fromMaybe, fromJust) import qualified Data.Map as M import Control.Monad.Reader import Control.Monad.State import AbsPascalis import PrintPascalis import ErrM import MonadsFunctions printDebug [] = return () printDebug (h:t) = do{putStr...
andrzejgorski/pascalis
source/Interpreter.hs
bsd-3-clause
18,521
0
18
7,969
6,200
2,940
3,260
-1
-1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} module High.Functor where import High.Category (Category) data Functor :: ((* -> *) -> (* -> *) -> *) -> ((* -> *) -> (* -> *) -> *) -> ((* -> *) -> (* -> *)) -> * where Functor :: { sou...
Hexirp/untypeclass
src/High/Functor.hs
bsd-3-clause
473
0
13
122
184
105
79
12
0
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} module Aws.DynamoDB.Commands.DeleteTable ( DeleteTable(..) , DeleteTableResponse(..) , deleteTable ) where import ...
ywata/dynamodb
Aws/DynamoDB/Commands/DeleteTable.hs
bsd-3-clause
2,593
0
10
592
562
309
253
64
1
{-# OPTIONS_HADDOCK hide #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.Functions.F14 -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <[email protected]> -- Stability : stable -- Portability : por...
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F14.hs
bsd-3-clause
64,076
0
16
8,824
10,947
5,644
5,303
1,123
1
{-# LANGUAGE FlexibleContexts #-} {-# OPTIONS_HADDOCK show-extensions #-} {-| Module : $Header$ Copyright : (c) 2015 Swinburne Software Innovation Lab License : BSD3 Maintainer : Rhys Adams <[email protected]> Stability : unstable Portability : portable Updating local state with data from the sched...
futufeld/eclogues
eclogues-impl/app/api/Eclogues/Threads/Update.hs
bsd-3-clause
3,552
0
21
737
929
485
444
-1
-1
{-# OPTIONS -Wall #-} {- @author: Wojciech Jedynak ([email protected]) -} module Pages where import Data.Char import Data.Function import Data.List import Text.Printf import Text.XHtml hiding (dir, color, black, white, lang, link) import Configuration import Data.SGF.Types hiding (moves) import Lang (Language, Mes...
wjzz/GoStat
src/Pages.hs
bsd-3-clause
21,698
23
19
7,758
5,144
2,764
2,380
298
7
------------------------------------------------------------------------ -- | -- Module : Main -- Copyright : (c) Amy de Buitléir 2012-2016 -- License : BSD-style -- Maintainer : [email protected] -- Stability : experimental -- Portability : portable -- -- Runs the QuickCheck tests. -- ------------...
mhwombat/exp-uivector-cluster-wains
test/Main.hs
bsd-3-clause
803
0
6
118
113
80
33
11
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE UnicodeSyntax #-} {-| [@ISO639-1@] en [@ISO639-2B@] eng [@ISO639-3@] eng [@Native name@] English [@English name@] English...
telser/numerals
src-test/Text/Numeral/Language/ENG/TestData.hs
bsd-3-clause
10,420
0
10
2,612
2,971
1,969
1,002
333
1
module IRTS.CodegenCilSpec where import Control.Applicative ((<$>)) import Control.Arrow ((>>>)) import Control.Monad (forM_) import Control.Monad.Trans.Except (ExceptT, runExceptT) import Control.Monad.Trans.State.Strict (StateT, evalStateT) import IRTS.Cod...
BartAdv/idris-cil
test/IRTS/CodegenCilSpec.hs
bsd-3-clause
2,996
0
13
679
943
482
461
76
2
-------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.ARB.ClearBufferObject -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <[email protected]> -- Stability : stable -- Portability : portable -- ------------...
haskell-opengl/OpenGLRaw
src/Graphics/GL/ARB/ClearBufferObject.hs
bsd-3-clause
655
0
4
89
47
36
11
7
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE MultiWayIf #-} module Game.Monsters.MBerserk where import Control.Lens (use, preuse, ix, (^.), (.=), zoom, (%=), (&), (.~), (%~)) import Control.Monad (void, unless, liftM, when) import Data.Bits ((.&.), (.|.)) import Linear (V3(..), _x) import qualified Data.Vector as V...
ksaveljev/hake-2
src/Game/Monsters/MBerserk.hs
bsd-3-clause
23,205
0
53
6,327
5,640
2,864
2,776
-1
-1
module ReadGhcProg where import Data.Char import Text.ParserCombinators.ReadP import GHostCPU -- getProgram :: String -> [Inst] getProgram = map (fst . head . filter (null . snd) . readP_to_S parseInst) . filter (not . null) . map (trim . fst . break (';'==)) . lines . map toUpper trim :: Str...
msakai/icfpc2014
ReadGhcProg.hs
bsd-3-clause
4,074
10
15
1,241
1,753
866
887
142
8
module TicTacToe.Internal.Result where import qualified TicTacToe.Data.Cell as C import qualified TicTacToe.Internal.Matrix as M data Result = Tied | Won | InProgress deriving (Eq, Show) mkResult :: M.Matrix -> Result mkResult m | any M.isWinningSequence $ M.rowsOf m ++ M.columnsOf m ++ M.diagonalsOf...
rodamber/haskell-tic-tac-toe
src/TicTacToe/Internal/Result.hs
bsd-3-clause
403
0
12
80
145
77
68
13
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} module Portager ( module Portager.DSL , PortageR , portager , runPortageR ) where import Control.Monad.Identity (Identity, runIdentity) import Control.Monad.Trans.Reader (ReaderT, runReaderT) import D...
j1r1k/portager
src/Portager.hs
bsd-3-clause
1,507
0
14
211
397
223
174
31
1
{-+ This module defines the function #hlex2html#, which translates the output from an early pass of the lexical analyzer to HTML. It can also make use of cross reference information to link identifiers to their definitions. The generated HTML is intended to be part of the body of a web page, thus it does not include t...
forste/haReFork
tools/hs2html/HLex2html.hs
bsd-3-clause
7,608
159
24
1,741
2,994
1,649
1,345
177
38
-- | Convenience module to import the specific rewriting function model -- and combinator implementation known as /explicit/. -- In package adp-multi-monadiccp, there is another -- combinator implementation. module ADP.Multi.Rewriting.All (module X) where import ADP.Multi.Rewriting.Model as X import ADP.Multi.Re...
adp-multi/adp-multi
src/ADP/Multi/Rewriting/All.hs
bsd-3-clause
341
0
4
45
37
28
9
3
0
<ESC>:let g:haskell_indent_disable_case = 1 ah x = x where f x = case x of 1 -> if g x then 2 else 3 4 -> if g x then 5 else 6 _ -> if g x then 7 else 8 g x = False
itchyny/vim-haskell-indent
test/case/disable_case_caseif.in.hs
mit
165
4
6
46
92
50
42
-1
-1
{-# OPTIONS_GHC -Wwarn #-} ----------------------------------------------------------------------------- -- | -- Module : Haddock.Interface.ParseModuleHeader -- Copyright : (c) Simon Marlow 2006, Isaac Dupree 2009 -- License : BSD-like -- -- Maintainer : [email protected] -- Stability : ex...
jgm/haddock
src/Haddock/Interface/ParseModuleHeader.hs
bsd-2-clause
5,082
0
18
1,492
1,151
624
527
93
12
{-# LANGUAGE BangPatterns #-} module Main (main) where import Data.BEncode import Data.ByteString as BS import Data.Torrent import Criterion.Main tinyPath :: FilePath tinyPath = "res/dapper-dvd-amd64.iso.torrent" largePath :: FilePath largePath = "res/pkg.torrent" decoder :: ByteString -> Torrent decoder bs = let ...
DavidAlphaFox/bittorrent
bench/TorrentFile.hs
bsd-3-clause
556
0
10
103
164
83
81
19
1
{- Copyright 2015 Google Inc. 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 applicable law or a...
Ye-Yong-Chi/codeworld
codeworld-base/src/System/CPUTime.hs
apache-2.0
743
0
4
136
23
17
6
4
0
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.Foreign -- Copyright : (c) The University of Glasgow, 2008-2011 -- License : see libraries/base/LICENSE -- -- Maintainer : libraries@haskell...
alexander-at-github/eta
libraries/base/GHC/Foreign.hs
bsd-3-clause
10,266
0
25
2,614
2,019
1,053
966
134
5
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Control.Search.MemoReader where import Control.Search.Memo import Data.Map (Map) import qualified Data.Map as Map import Control.Monatron.Monatron hiding (Abort, L, sta...
neothemachine/monadiccp
src/Control/Search/MemoReader.hs
bsd-3-clause
2,684
0
17
1,046
870
448
422
44
1
module C2 where import D2 hiding (anotherFun) anotherFun (x:xs) = sq x + anotherFun xs anotherFun [] = 0
kmate/HaRe
old/testing/duplication/C2_TokOut.hs
bsd-3-clause
118
0
7
32
48
26
22
4
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleContexts #-} module Main where import Prelude import qualified Foreign.Storable as Storable import qualified Control.Monad.State.Strict as S import Control.Monad.IO.Class import Foreign.Marshal.Alloc (mallocBytes) newtype F...
ghcjs/ghcjs
test/ghc/perf/t14936.hs
mit
822
0
16
215
249
139
110
19
2
{-# LANGUAGE Trustworthy, ExplicitNamespaces #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Kind -- License : BSD-style (see the LICENSE file in the distribution) -- -- Maintainer : [email protected] -- Stability : experimental -- Portability...
tolysz/prepare-ghcjs
spec-lts8/base/Data/Kind.hs
bsd-3-clause
539
3
6
79
49
36
13
3
0
module Network.CURL720Spec where import Network.CURL720 import Test.Hspec main :: IO () main = hspec spec spec :: Spec spec = do ---------------------------- describe "curl_version" $ do it "returns libcurl version string: \"libcurl/7.x.x ...\"" $ do curl_version >>= (`shouldContain` "libcurl/7.")
kkardzis/curlhs
test/Network/CURL720Spec.hs
isc
318
0
14
58
78
42
36
10
1
-- Memcached interface. -- Copyright (C) 2005 Evan Martin <[email protected]> module Network.Memcache.Serializable(Serializable, toString, fromString) where -- It'd be nice to use "show" for serialization, but when we -- serialize a String we want to serialize it without the quotes. -- TODO: -- - allow serializing ...
alsonkemp/haskell-memcached
Network/Memcache/Serializable.hs
mit
1,346
0
9
284
216
125
91
20
0
module HoSA.Data.Program.Pretty ( prettyExpression , prettyEquation , prettyProgram ) where import Data.List (partition, sortBy) import qualified Data.Map as Map import qualified Text.PrettyPrint.ANSI.Leijen as PP import HoSA.Utils (uniqueToInt,(//)) import HoSA.Data.MLTypes import HoSA.Data.Program.CallS...
mzini/hosa
src/HoSA/Data/Program/Pretty.hs
mit
5,750
0
18
1,389
2,384
1,195
1,189
-1
-1
----------------------------------------------------------------------------- -- -- Module : Language.PureScript.Sugar.TypeClasses -- Copyright : (c) Phil Freeman 2013 -- License : MIT -- -- Maintainer : Phil Freeman <[email protected]> -- Stability : experimental -- Portability : -- -- | -- This modu...
bergmark/purescript
src/Language/PureScript/Sugar/TypeClasses.hs
mit
9,982
3
20
1,960
2,227
1,157
1,070
108
11
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeSynonymInstances #-} module Hydraulic where import Control.Lens import Control.Lens.TH import Control.Monad.Cont import Control.Monad.Trans import Control.M...
SaneApp/hydraulic
src/Hydraulic.hs
mit
6,256
2
20
1,177
1,583
840
743
127
2
-- Credit card issuer checking -- http://www.codewars.com/kata/5701e43f86306a615c001868 module Haskell.Codewars.CreditCardIssuer where import Data.List (isPrefixOf) getIssuer :: Int -> String getIssuer n | length s == 16 && (any (`isPrefixOf` s) . map show $ [51..55]) = "Mastercard" | length s == 15 && an...
gafiatulin/codewars
src/7 kyu/CreditCardIssuer.hs
mit
558
0
13
142
197
102
95
9
1
-- | Instructions for the 8080 CPU module Hask8080.Instructions where import Control.Lens import Hask8080.CPU (CPU, cycles, reg, reg16, regMem, nextByte, nextAddr) import Hask8080.Types (Reg (..), Reg16 (..)) tick :: Int -> CPU () tick n = cycles += n -- | MOV ...
reinh/Hask8080
src/Hask8080/Instructions.hs
mit
4,695
0
10
1,577
1,190
580
610
98
1
----------------------------------------------------------------------------- -- -- Module : Language.PureScript.TypeChecker -- Copyright : (c) 2013-15 Phil Freeman, (c) 2014-15 Gary Burgess -- License : MIT (http://opensource.org/licenses/MIT) -- -- Maintainer : Phil Freeman <[email protected]> -- Stabi...
michaelficarra/purescript
src/Language/PureScript/TypeChecker.hs
mit
18,866
16
21
3,750
6,045
3,088
2,957
344
34
{-# htermination (sequence_Nil :: (List (List a)) -> (List Tup0)) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil data Tup0 = Tup0 ; foldr :: (b -> a -> a) -> a -> (List b) -> a; foldr f z Nil = z; foldr f z (Cons x xs) = f x (foldr f z xs); gtGt0 q vv =...
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/sequence__2.hs
mit
808
0
10
214
425
224
201
20
1
import Data.List import Data.Monoid import Options.Applicative data Opts = Opts { _files :: [String] , _quiet :: Bool , _fast :: Speed } data Speed = Slow | Fast options :: Parser Opts options = Opts <$> filename <*> quiet <*> fast where filename :: Parser [String] filename = many $ argument str $ ...
riwsky/wiwinwlh
src/optparse_applicative.hs
mit
985
6
10
270
326
161
165
36
3
{-# LANGUAGE CPP #-} module GHCJS.DOM.PositionCallback ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.PositionCallback #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHCJS.DOM.JSFFI...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/PositionCallback.hs
mit
361
0
5
33
33
26
7
4
0
biggestInt, smallestInt :: Int biggestInt = maxBound smallestInt = minBound sumtorial :: Integer -> Integer sumtorial 0 = 0 sumtorial n = n + sumtorial (n-1) hailstone :: Integer -> Integer hailstone n | n `mod` 2 == 0 = n `div` 2 | otherwise = 3*n + 1 foo :: Integer -> Integer foo 0 = 16 foo 1 | "Haskel...
mauriciofierrom/cis194-homework
homework01/int.hs
mit
1,435
8
9
360
718
390
328
54
1
module Data.UTC.Class.IsDate.Test where import Test.QuickCheck import Test.Framework (testGroup) import Test.Framework (Test) import Test.Framework.Providers.QuickCheck2 (testProperty) import Data.UTC test :: Test test = testGroup "Data.UTC.Class.IsDate" $ [ testGroup "addYears" [ testProperty "addYears 1 ...
lpeterse/haskell-utc
Data/UTC/Class/IsDate/Test.hs
mit
3,436
0
18
1,305
1,232
650
582
72
1
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.SpeechSynthesisEvent (getCharIndex, getElapsedTime, getName, SpeechSynthesisEvent(..), gTypeSpeechSynthes...
ghcjs/jsaddle-dom
src/JSDOM/Generated/SpeechSynthesisEvent.hs
mit
1,980
0
12
241
471
291
180
30
1
{-# LANGUAGE DeriveDataTypeable #-} module Flag.Debugger (Debugger(..)) where import Data.Data (Data) data Debugger = UNSET | SET | ALL deriving (Show, Eq, Read, Ord, Bounded, Data)
xnuk/another-aheui-interpreter
src/Flag/Debugger.hs
mit
184
0
6
28
66
39
27
4
0
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-} module PISA where import Data.List (intercalate) import Control.Arrow import AST (TypeName, MethodName) type Label = String newtype Register = Reg Integer deriving (Eq) {-- Generic PISA Definitions --} data GInstr i = ADD Register Register ...
cservenka/ROOPLPPC
src/PISA.hs
mit
5,866
0
12
1,932
2,293
1,184
1,109
125
17
-- File : musicmind.hs -- Author : Hengfeng Li -- Purpose : a MusicMind game module Musicmind (initialGuess, nextGuess, GameState ) where import qualified Data.Set as Set import Data.List -- The GameState maintain the list of possible answers -- in which each element is a Set type. type GameState = [Set....
HengfengLi/Declarative-Programming
proj1/Musicmind.hs
mit
4,423
0
17
1,073
1,320
715
605
69
2
{-# LANGUAGE DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-} module Hanoi.Semantik where -- $Id$ import Hanoi.Type import Hanoi.Move import Hanoi.Restriction import Condition import Autolib.FiniteMap import Autolib.Reporter import Autolib.ToDoc import qualified Challenger as C import Inter.Types...
Erdwolf/autotool-bonn
src/Hanoi/Semantik.hs
gpl-2.0
1,276
9
15
381
431
225
206
37
1
module FormalLanguage.GrammarProduct.Op.Common where import qualified Data.Set as S import Control.Lens hiding (outside) import Data.Set (Set) import FormalLanguage.CFG.Grammar import ADPfusion.Core.Term.Epsilon (LocalGlobal(..)) -- | Collect all terminal symbols from a set of rules. -- -- TODO move to FormalGram...
choener/GrammarProducts
FormalLanguage/GrammarProduct/Op/Common.hs
gpl-3.0
2,126
0
10
441
307
174
133
20
1
{- | Module : Postmaster.Main Copyright : (c) 2004-2008 by Peter Simons License : GPL2 Maintainer : [email protected] Stability : provisional Portability : Haskell 2-pre Postmaster's IO driver and general initialization functions. -} module Postmaster.Main where import Prelude ...
richardfontana/postmaster
Postmaster/Main.hs
gpl-3.0
6,056
0
20
1,553
1,718
869
849
124
3
{-# LANGUAGE TemplateHaskell #-} module Main where import Control.Exception import System.Environment import Data.List import Args import Formats import Utils import DeriveDispatcher import Run.Test import Run.Gen import Run.Exec import Run.Shrink import Run.List import Run.Serve import Test.QuickFuzz.Global -- |...
elopez/QuickFuzz
app/Main.hs
gpl-3.0
1,430
0
12
269
416
216
200
45
1
{-# LANGUAGE CPP #-} {-# LANGUAGE PackageImports #-} import "r0z" Application (getApplicationDev) import Network.Wai.Handler.Warp (runSettings, defaultSettings, setPort) import Control.Concurrent (forkIO) import System.Directory (doesFileExist, removeFile) import System.Exit (exitSuccess) import Control.Concurrent ...
DasAsozialeNetzwerk/r0z
devel.hs
gpl-3.0
887
0
12
134
238
131
107
24
2