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 MultiParamTypeClasses, FunctionalDependencies #-}
module Data.Graph where
import Prelude hiding (lookup)
import Data.FiniteMap
import Control.Exception
-- A graph is a pair of finite sets, the first of objects, the second of relations
-- between objects (edges). Nodes and edges need to be uniquely indent... | trbecker/haskell-musings | Graph/src/Data/Graph.hs | unlicense | 1,122 | 0 | 13 | 270 | 516 | 266 | 250 | 22 | 0 |
module Haskoin.Protocol.GetBlocks
( GetBlocks(..)
, BlockLocator
) where
import Control.Monad (replicateM, forM_)
import Control.Applicative ((<$>),(<*>))
import Data.Word (Word32)
import Data.Binary (Binary, get, put)
import Data.Binary.Get (getWord32le)
import Data.Binary.Put (putWord32le)
import Haskoin.Protoco... | OttoAllmendinger/haskoin-protocol | src/Haskoin/Protocol/GetBlocks.hs | unlicense | 898 | 0 | 10 | 215 | 278 | 156 | 122 | 33 | 0 |
import Control.Monad
main = do
c <- getChar
when (c /= ' ') $ do
putChar c
main
| Oscarzhao/haskell | learnyouahaskell/when_test.hs | apache-2.0 | 101 | 0 | 10 | 39 | 44 | 20 | 24 | 6 | 1 |
-- Copyright 2020 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/cabal2bazel | bzl/tests/rules/ReexportTest2.hs | apache-2.0 | 645 | 0 | 5 | 112 | 28 | 22 | 6 | 3 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Openshift.V1.OAuthClient where
import GHC.Generics
import Data.Text
import Kubernetes.V1.ObjectMeta
import qualified Data.Aeson
-- |
data OAu... | minhdoboi/deprecated-openshift-haskell-api | openshift/lib/Openshift/V1/OAuthClient.hs | apache-2.0 | 1,426 | 0 | 10 | 222 | 142 | 86 | 56 | 20 | 0 |
{-# LANGUAGE GADTs, TypeOperators, EmptyDataDecls, MultiParamTypeClasses, FlexibleInstances, OverlappingInstances, StandaloneDeriving, ConstraintKinds, TypeFamilies, ImplicitParams, RankNTypes #-}
{- Declares various types that are used everywhere -}
module Types where
import GHC.Prim
{- Type-level dimension inform... | dorchard/pde-specs | Types.hs | bsd-2-clause | 3,530 | 0 | 12 | 943 | 1,503 | 786 | 717 | -1 | -1 |
-- 31626
import Euler(divisorPowerSum)
nn = 10000
-- divisorPowerSum 1 is the sum of all divisors
isAmicable a = a /= b && a == factorSum b
where b = factorSum a
factorSum n = divisorPowerSum 1 n - n
sumAmicable n = sum $ filter isAmicable [2..n]
main = putStrLn $ show $ sumAmicable nn
| higgsd/euler | hs/21.hs | bsd-2-clause | 304 | 2 | 7 | 73 | 107 | 53 | 54 | 7 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module Foundation where
import Control.Concurrent.STM (TChan)
import Data.Text (Text)
import qualified Database.Persist
import Database.Persist.Sql (SqlPersistT)
import Model
import ... | Codas/campaign-next | Foundation.hs | bsd-3-clause | 6,807 | 0 | 18 | 1,793 | 956 | 524 | 432 | -1 | -1 |
{-# LANGUAGE
QuasiQuotes
, OverloadedStrings
#-}
module Templates.MainScripts where
import Text.Julius
import Data.Aeson.Types (Value (String))
import qualified Data.Text as T
import qualified Data.Text.Lazy as LT
mainScripts :: T.Text -> LT.Text
mainScripts glossary = renderJavascript $ mainScripts' un... | athanclark/nested-routes-website | src/Templates/MainScripts.hs | bsd-3-clause | 2,462 | 0 | 7 | 426 | 146 | 87 | 59 | 16 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Dependency.TopDown.Types
-- Copyright : (c) Duncan Coutts 2008
-- License : BSD-like
--
-- Maintainer : cabal-devel@haskell.org
-- Stability : provisional
-- Portability : portable
--
-... | IreneKnapp/Faction | faction/Distribution/Client/Dependency/TopDown/Types.hs | bsd-3-clause | 2,978 | 0 | 8 | 583 | 410 | 235 | 175 | 53 | 0 |
import System.Environment (getArgs)
import Data.List.Split (splitOn)
findWine :: String -> String -> Bool
findWine _ "" = True
findWine xs (y:ys) | elem y xs = findWine (l ++ r) ys
| otherwise = False
where l = takeWhile (/= y) xs
r = tail (d... | nikai3d/ce-challenges | easy/chardonnay.hs | bsd-3-clause | 886 | 0 | 12 | 326 | 345 | 172 | 173 | 21 | 1 |
{-# LANGUAGE KindSignatures, Rank2Types, TypeFamilies #-}
module Data.Hot.Base
( HotClass
, Hot
, unfold
, elementAt
, mapAt
) where
import GHC.TypeLits (Nat)
class (Foldable (Hot n)) => HotClass (n :: Nat) where
data Hot n :: * -> *
unfold :: (forall r. c (a -> r) -> c r) -> (forall r. r -> c r... | tserduke/hot | base/Data/Hot/Base.hs | bsd-3-clause | 425 | 0 | 13 | 119 | 192 | 105 | 87 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
module SDL.Exception
( SDLException(..)
, fromC
, getError
, throwIf
, throwIf_
, throwIf0
, throwIfNeg
, throwIfNeg_
, throwIfNot0
, throwIfNot0_
, throwIfNull
) where
import Control.Applicative
import Control.Exception
import ... | svenkeidel/sdl2 | src/SDL/Exception.hs | bsd-3-clause | 2,491 | 0 | 12 | 653 | 927 | 494 | 433 | 84 | 1 |
{-# LANGUAGE BangPatterns, TypeSynonymInstances, CPP #-}
module Data.TrieMap.OrdMap.Splittable () where
import Data.TrieMap.OrdMap.Base
import Data.TrieMap.OrdMap.Zippable ()
instance Splittable (SNode k) where
before (Empty _ path) = beforePath tip path
before (Full _ path l _) = beforePath l path
beforeWith a... | lowasser/TrieMap | Data/TrieMap/OrdMap/Splittable.hs | bsd-3-clause | 1,220 | 9 | 8 | 250 | 379 | 214 | 165 | -1 | -1 |
module Game.Dink.Files.SaveDat where
import Control.Monad
import qualified Data.ByteString.Lazy as BS
import Data.Binary
import Data.Binary.Get
import Data.Binary.Put
import Data.Char
import qualified Data.Array.IArray as A
import qualified Data.Map as M
import CStructUtil
data DinkSave = Save { save_version :: ... | tchakkazulu/dinkfiles | Game/Dink/Files/SaveDat.hs | bsd-3-clause | 4,718 | 0 | 15 | 1,731 | 1,473 | 779 | 694 | 120 | 1 |
--------------------------------------------------------------------------------
-- $Id: URITest.hs,v 1.8 2005/07/19 22:01:27 gklyne Exp $
--
-- Copyright (c) 2004, G. KLYNE. All rights reserved.
-- See end of this file for licence information.
-----------------------------------------------------------------------... | FranklinChen/hugs98-plus-Sep2006 | packages/network/tests/URITest.hs | bsd-3-clause | 49,990 | 0 | 14 | 9,977 | 7,093 | 3,927 | 3,166 | 804 | 4 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
module Test.ZM.ADT.Bits8.K9e3b8c835fe9 (Bits8(..)) where
import qualified Prelude(Eq,Ord,Show)
import qualified GHC.Generics
import qualified Flat
import qualified Data.Model
import qualified Test.ZM.ADT.Bit.K65149ce3b366
data Bits8 = Bits8 {bit0 :: Tes... | tittoassini/typed | test/Test/ZM/ADT/Bits8/K9e3b8c835fe9.hs | bsd-3-clause | 923 | 0 | 9 | 224 | 209 | 143 | 66 | 18 | 0 |
{-# LANGUAGE BangPatterns #-}
import Control.Concurrent
import Control.Concurrent.Async
import Chan.KickChan
import Control.Monad
import Control.Monad.Fix
import Data.Vector.Mutable
import Data.Chronograph
-- benchmark throughput...
main = do
kc <- newKickChan 100
:: IO (KickChan IOVector (Either Int Int))
rd... | JohnLato/kickchan | bench/bench_t3.hs | bsd-3-clause | 1,203 | 0 | 17 | 291 | 462 | 222 | 240 | 30 | 4 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module Ivory.Language.Syntax.Concrete.QQ.StructQQ
( fromStruct
) where
import Prelude ... | GaloisInc/ivory | ivory/src/Ivory/Language/Syntax/Concrete/QQ/StructQQ.hs | bsd-3-clause | 4,731 | 6 | 14 | 1,183 | 1,108 | 612 | 496 | 87 | 3 |
-----------------------------------------------------------------------------
-- |
-- Module : Generics.EMGM
-- Copyright : (c) 2008, 2009 Universiteit Utrecht
-- License : BSD3
--
-- Maintainer : generics@haskell.org
-- Stability : experimental
-- Portability : non-portable
--
-- EMGM is \"Extensib... | spl/emgm | src/Generics/EMGM.hs | bsd-3-clause | 7,271 | 0 | 5 | 1,445 | 609 | 469 | 140 | 97 | 0 |
{-|
Copyright : (c) Dave Laing, 2017
License : BSD3
Maintainer : dave.laing.80@gmail.com
Stability : experimental
Portability : non-portable
-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
module Fragment.Int.Rules.Type.... | dalaing/type-systems | src/Fragment/Int/Rules/Type/Infer/Offline.hs | bsd-3-clause | 834 | 0 | 8 | 143 | 156 | 93 | 63 | -1 | -1 |
{-# LANGUAGE Safe #-}
{-# LANGUAGE NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Version
-- Copyright : (c) The University of Glasgow 2004
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : librarie... | gcampax/ghc | libraries/base/Data/Version.hs | bsd-3-clause | 5,418 | 0 | 12 | 1,224 | 485 | 291 | 194 | 38 | 1 |
module Permissions.OnpingSpec (main, spec) where
import Test.Hspec
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "someFunction" $ do
it "should work fine" $ do
True `shouldBe` False
| smurphy8/onping-permissions | test/Permissions/OnpingSpec.hs | bsd-3-clause | 215 | 0 | 13 | 49 | 76 | 40 | 36 | 9 | 1 |
module Gamgine.Math.Box where
#include "Gamgine/Utils.cpp"
import Data.Maybe
import qualified Data.List as L
import Gamgine.Math.Vect as V
import Gamgine.Math.Utils
import Gamgine.Utils
IMPORT_LENS_AS_LE
-- axis aligned bounding box
data Box = Box {
minPt :: Vect,
maxPt :: Vect
} deriving (Show, Read)
LENS... | dan-t/Gamgine | Gamgine/Math/Box.hs | bsd-3-clause | 2,932 | 0 | 16 | 871 | 1,069 | 563 | 506 | -1 | -1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE CPP #-}
--
-- DefBitRep.hs --- Template Haskell utilities.
--
-- Copyright (C) 2013, Galois, Inc.
-- All Rights Reserved.
--
module Ivory.Language.BitData.DefBitRep where
import Language.Haskell.TH
import Language.Haskell.TH.Datatype (tySynInstDCompat)
-- | Define the t... | GaloisInc/ivory | ivory/src/Ivory/Language/BitData/DefBitRep.hs | bsd-3-clause | 734 | 0 | 14 | 140 | 148 | 84 | 64 | 11 | 1 |
{-# LANGUAGE PackageImports #-}
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
module Language.Logic.Examples.Infer where
import Language.Logic
import Language.Logic.LogicList
import Control.Applicative
import Control.Monad
import "mtl" Control.Monad.Reader
import "mtl" Control.Monad.State
type Variable = String
... | acfoltzer/Molog | examples/Infer.hs | bsd-3-clause | 5,513 | 0 | 16 | 2,067 | 2,507 | 1,199 | 1,308 | 163 | 1 |
{-# LANGUAGE FlexibleContexts, LambdaCase, RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
import Graphics.UI.GLFW.Pal
import Graphics.GL.Pal
import Graphics.VR.Pal
import Control.Monad
import Control.Monad.State
import Control.Monad.Reader
import Control.Lens.Extra
import Data.Map (Map)
import qualified Data.Map... | lukexi/bullet-mini | test/GhostObjects2.hs | bsd-3-clause | 6,578 | 0 | 25 | 2,366 | 1,535 | 741 | 794 | -1 | -1 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances
, FlexibleContexts, UndecidableInstances #-}
-----------------------------------------------------------
-- |
-- Module : BoundedList
-- Copyright : HWT Group (c) 2003, haskelldb-users@lists.sourceforge.net
-- License : BSD-style
--
-- Maintainer : ... | m4dc4p/haskelldb | src/Database/HaskellDB/BoundedList.hs | bsd-3-clause | 36,891 | 67 | 13 | 8,126 | 16,452 | 8,385 | 8,067 | -1 | -1 |
-- 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.AmountOfMoney.Rules
( rules
) wher... | facebookincubator/duckling | Duckling/AmountOfMoney/Rules.hs | bsd-3-clause | 4,127 | 0 | 17 | 885 | 1,384 | 875 | 509 | 150 | 2 |
{-|
Module : IRTS.Lang
Description : Internal representation of Idris' constructs.
Copyright :
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE DeriveFunctor, DeriveGeneric, PatternGuards #-}
module IRTS.Lang where
import Idris.Core.CaseTree
import Idris.Core.TT
import Control.Applicative... | ben-schulz/Idris-dev | src/IRTS/Lang.hs | bsd-3-clause | 16,172 | 0 | 17 | 6,031 | 6,137 | 3,091 | 3,046 | 312 | 22 |
{-
- Builder.hs
- By Steven Smith
-}
module SpirV.Builder
( module SpirV.Builder
, R.buildModule
, R.nop
, R.source
, R.sourceExtension
, R.compileFlag
, R.extension
, R.memoryModel
, R.store
, R.copyMemory
, R.copyMemorySized
, R.functionEnd
, R.kill
, R.return_
, R.returnValue
, R.unreachable
, R.lifetimeStart
, ... | stevely/hspirv | src/SpirV/Builder.hs | bsd-3-clause | 54,339 | 0 | 17 | 10,619 | 12,172 | 6,323 | 5,849 | 710 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ViewPatterns #-}
module Language.Haskell.Liquid.Qualifier (
specificationQualifiers
) where
import Language.Haskell.Liquid.RefType
import Language.Haskell.Liquid.GhcMisc (getSourcePos)
import Language.Haskell.Liquid.PredType
import Language.Haskell.Liquid.Types... | spinda/liquidhaskell | src/Language/Haskell/Liquid/Qualifier.hs | bsd-3-clause | 5,998 | 0 | 15 | 2,199 | 1,893 | 991 | 902 | 83 | 11 |
module Main where
import Lib
main :: IO ()
main = do
putStrLn "----------------Gradient method(勾配法)----------------\n"
putStrLn "This program is sample of \"Gradient method\"."
putStrLn "This sample is for function of one variable."
let f x = x * x
putStrLn "Function: f(x) = x^2"
let a = (1)
... | reouno/gradient-method | app/Main.hs | bsd-3-clause | 1,481 | 0 | 12 | 341 | 399 | 198 | 201 | 32 | 2 |
import Data.List (intercalate)
-- | Given a DNA string s of length at most 100 bp and an array A containing
-- at most 20 numbers between 0 and 1, return an array B having the same length
-- as A in which B[k] represents the common logarithm of the probability that
-- a random string constructed with the GC-... | mitochon/hoosalind | src/problems/prob.hs | mit | 1,367 | 0 | 14 | 396 | 344 | 189 | 155 | 18 | 3 |
{-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable, GeneralizedNewtypeDeriving #-}
module MinHS.Env ( Env(..)
, empty
, lookup
, add
, addAll
) where
import qualified Data.Map as M
import Data.Foldable (Foldable)
import Dat... | pierzchalski/cs3161a2 | MinHS/Env.hs | mit | 821 | 0 | 10 | 217 | 318 | 174 | 144 | 20 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Hate.Graphics.Shader where
-- data
type Name = String
data FloatPrecision = HighPrecision | MediumPrecision | LowPrecision
newtype Location = Location Int
data TypeTag = FloatTag | Vec2Tag | Vec3Tag | Vec4Tag | Mat2Tag | Mat3Tag | Mat4Tag | Sampler2DTag
data ... | maque/Hate | src/Hate/Graphics/Shader.hs | mit | 2,014 | 0 | 11 | 512 | 605 | 319 | 286 | 47 | 1 |
{-# LANGUAGE OverloadedStrings, FlexibleContexts #-}
{- |
Module : Text.Pandoc.Writers.ICML
Copyright : Copyright (C) 2013 github.com/mb21
License : GNU GPL, version 2 or above
Stability : alpha
Conversion of 'Pandoc' documents to Adobe InCopy ICML, a stand-alone XML format
which is a subset... | alexvong1995/pandoc | src/Text/Pandoc/Writers/ICML.hs | gpl-2.0 | 25,478 | 0 | 23 | 7,553 | 7,199 | 3,810 | 3,389 | 448 | 11 |
{-# LANGUAGE ScopedTypeVariables#-}
module Main where
import OpenCog.AtomSpace
import OpenCog.Lojban
import Control.Exception
import Control.Monad
import Control.Parallel.Strategies
import System.Exit (exitFailure,exitSuccess)
main :: IO ()
main = do
putStrLn "Starting Test"
(parser,printer) <- initParser... | misgeatgit/opencog | opencog/nlp/lojban/HaskellLib/test/Main.hs | agpl-3.0 | 1,614 | 0 | 14 | 469 | 522 | 250 | 272 | 45 | 4 |
{-# LANGUAGE FlexibleInstances, PatternGuards, ScopedTypeVariables, TypeSynonymInstances #-}
-- | Route an incoming 'Request' to a handler. For more in-depth documentation see this section of the Happstack Crash Course: <http://happstack.com/docs/crashcourse/RouteFilters.html>
module Happstack.Server.Routing
( -- *... | erantapaa/happstack-server | src/Happstack/Server/Routing.hs | bsd-3-clause | 8,381 | 0 | 15 | 1,978 | 1,553 | 873 | 680 | 95 | 2 |
{-# LANGUAGE Haskell98 #-}
{-# LINE 1 "Data/ByteString/Builder/Prim.hs" #-}
{-# LANGUAGE CPP, BangPatterns, ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# LANGUAGE Trustworthy #-}
{- | Copyright : (c) 2010-2011 Simon Meier
... | phischu/fragnix | tests/packages/scotty/Data.ByteString.Builder.Prim.hs | bsd-3-clause | 32,046 | 0 | 18 | 6,881 | 2,220 | 1,234 | 986 | 174 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TemplateHaskell #-}
module Ros.Nav_msgs.GridCells where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Internal.RosBi... | acowley/roshask | msgs/Nav_msgs/Ros/Nav_msgs/GridCells.hs | bsd-3-clause | 1,597 | 1 | 11 | 323 | 428 | 250 | 178 | 38 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-autoscaling/gen/Network/AWS/AutoScaling/DescribeAutoScalingGroups.hs | mpl-2.0 | 5,814 | 0 | 12 | 1,200 | 724 | 429 | 295 | 80 | 1 |
{-# LANGUAGE CPP #-}
{-# OPTIONS_HADDOCK hide #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.Exception
-- Copyright : (c) Sven Panne 2002-2013
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stab... | hesiod/OpenGL | src/Graphics/Rendering/OpenGL/GL/Exception.hs | bsd-3-clause | 1,525 | 0 | 11 | 289 | 373 | 199 | 174 | 20 | 1 |
module GA3 where
zipperM :: [a] -> IO [(a, Integer)]
zipperM lst = do
lst2 <- getOtherList
return $ zip lst lst2
getOtherList = return [1..]
| RefactoringTools/HaRe | test/testdata/GenApplicative/GA3.hs | bsd-3-clause | 147 | 0 | 8 | 32 | 66 | 35 | 31 | 6 | 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>Active Scan Rules | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<... | mabdi/zap-extensions | src/org/zaproxy/zap/extension/ascanrules/resources/help_ur_PK/helpset_ur_PK.hs | apache-2.0 | 979 | 80 | 66 | 161 | 417 | 211 | 206 | -1 | -1 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.GHC.IPI642
-- Copyright : (c) The University of Glasgow 2004
-- License : BSD3
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
module Distribution.Simple.GHC.IPI64... | rimmington/cabal | Cabal/Distribution/Simple/GHC/IPI642.hs | bsd-3-clause | 5,477 | 0 | 13 | 1,324 | 1,078 | 633 | 445 | 104 | 1 |
{-# LANGUAGE ExistentialQuantification #-}
-- This test is really meant for human looking; do a -ddump-simpl.
-- The definition that you want to look at is for foo.
-- It produces a nested unfold that should look something
-- like the code below. Note the 'lvl1_shW'. It is BAD
-- if this is a lambda instead; you ge... | olsner/ghc | testsuite/tests/simplCore/should_run/simplrun009.hs | bsd-3-clause | 4,453 | 0 | 14 | 1,629 | 853 | 449 | 404 | 58 | 6 |
-----------------------------------------------------------------------------
--
-- Module : PhysicalQuantities.Measures
-- Copyright :
-- License : MIT
--
-- Maintainer : -
-- Stability :
-- Portability :
--
-- |
--
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-#... | fehu/PhysicalQuantities | src/PhysicalQuantities/Measures.hs | mit | 9,341 | 69 | 13 | 1,962 | 2,827 | 1,529 | 1,298 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
module Database.Sql.Simple.Pool where
import Control.... | philopon/sql-simple | sql-simple-pool/Database/Sql/Simple/Pool.hs | mit | 1,945 | 0 | 10 | 451 | 705 | 366 | 339 | 45 | 1 |
module Paths_score3 (
version,
getBinDir, getLibDir, getDataDir, getLibexecDir,
getDataFileName, getSysconfDir
) where
import qualified Control.Exception as Exception
import Data.Version (Version(..))
import System.Environment (getEnv)
import Prelude
catchIO :: IO a -> (Exception.IOException -> IO a) ->... | dschalk/score3 | .stack-work/dist/x86_64-linux-tinfo6/Cabal-1.22.4.0/build/autogen/Paths_score3.hs | mit | 1,862 | 0 | 10 | 177 | 362 | 206 | 156 | 28 | 1 |
{-# language RecordWildCards #-}
-- TODO doc
-- Helper parser that works with ByteString,
-- not Decode
module Database.PostgreSQL.Protocol.Parsers
( parseServerVersion
, parseIntegerDatetimes
, parseErrorDesc
, parseNoticeDesc
, parseCommandResult
) where
import Data.Char ... | postgres-haskell/postgres-wire | src/Database/PostgreSQL/Protocol/Parsers.hs | mit | 6,632 | 0 | 17 | 2,113 | 1,675 | 837 | 838 | 126 | 8 |
{-# LANGUAGE DeriveFunctor, DeriveFoldable #-}
module Types
( module Types, Word8, Word16, Word32 )
where
import qualified Data.ByteString.Lazy as B
import Data.Word
import qualified Data.Map as M
-- Main data types
type Offset = Word32
type Segment = (Offset, Word32, [String])
type Segments = [Segment]
data R... | entropia/tip-toi-reveng | src/Types.hs | mit | 9,557 | 0 | 13 | 3,838 | 1,973 | 1,234 | 739 | 241 | 1 |
{-# LANGUAGE Safe #-}
{-# LANGUAGE NamedFieldPuns #-}
module Main where
import Control.DeepSeq(force)
import Control.Applicative((<$>))
import Control.Monad.Except()
import Data.Map((!))
import Text.PrettyPrint
import FP15.Parsing()
import FP15.Parsing.Types
import FP15.Parsing.Lexer(scanTokens)
import FP15.Parsing.Par... | Ming-Tang/FP15 | src/Main.hs | mit | 3,323 | 0 | 14 | 587 | 593 | 338 | 255 | 42 | 2 |
import System.IO
import System.Directory
import System.Environment
import StyleSvg
main =
do
-- extract css file path and svg files from arguments
(svgCssFilePath: svgFiles) <- getArgs
-- read svgFile
svgStyle <- readFile svgCssFilePath
putStrLn $ "CSS File: " ++ svgCssFilePath
... | dino-r/casttex | src/UpdateSvg.hs | mit | 1,291 | 0 | 11 | 342 | 231 | 111 | 120 | 24 | 1 |
newtype Reader r a = Reader { runReader :: r -> a }
instance Monad (Reader r) where
return a = Reader $ \_ -> a
m >>= k = Reader $ \r -> runReader (k (runReader m r)) r
ask :: Reader a a
ask = Reader id
asks :: (r -> a) -> Reader r a
asks f = Reader f
local :: (r -> b) -> Reader b a -> Reader r a
local f m = R... | riwsky/wiwinwlh | src/reader_impl.hs | mit | 344 | 0 | 12 | 95 | 191 | 98 | 93 | 10 | 1 |
module Language.Instances (Show(..), Eq(..)) where
import Language.Type
import Language.FA
import Language.RE
import Text.ParserCombinators.Parsec
import Prelude hiding (negate)
import qualified Data.List as List
import Debug.Trace
--------------------------------------------------------------
dropQuote :: String... | banacorn/formal-language | haskell-legacy/Language/instances.hs | mit | 5,403 | 0 | 17 | 2,330 | 1,729 | 862 | 867 | 170 | 2 |
module Rx.Observable.Throttle where
import Control.Concurrent.STM (atomically, newTVarIO, readTVar, writeTVar)
import Control.Monad (when)
import Data.Time (diffUTCTime, getCurrentTime)
import Tiempo (TimeInterval, toNominalDiffTime)
import Rx.Observable.Filter (filterM)
import Rx.Observable.Types
-----------------... | roman/Haskell-Reactive-Extensions | rx-core/src/Rx/Observable/Throttle.hs | mit | 1,265 | 0 | 18 | 336 | 302 | 151 | 151 | 31 | 2 |
{-|
Module : Language.SAL.Syntax
Description : Data types for SAL Syntax
Copyright : (c) Galois Inc, 2015
License : MIT
Maintainer : Benjamin F Jones <bjones@galois.com>
Stability : experimental
Portability : Yes
Haskell encoding of the syntax presented in
http://sal.csl.sri.com/doc/language-report.pdf
... | GaloisInc/language-sal | src/Language/SAL/Syntax.hs | mit | 14,509 | 9 | 8 | 3,028 | 2,080 | 1,311 | 769 | -1 | -1 |
module Y2017.M03.D13.Exercise where
import Network.HTTP.Conduit
{--
Oh, yeah. Let's do this one!
https://twitter.com/HaggardHawks/status/840321681726013440
Nic Wilkinson Retweeted
Haggard Hawks @HaggardHawks Mar 10
All fourteen lines in David Shulman’s sonnet ‘Washington Crossing The Delaware’
(1936) are anagram... | geophf/1HaskellADay | exercises/HAD/Y2017/M03/D13/Exercise.hs | mit | 821 | 0 | 6 | 122 | 48 | 30 | 18 | 6 | 1 |
{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Hadoop.Protos.ClientNamenodeProtocolProtos.GetServerDefaultsRequestProto (GetServerDefaultsRequestProto(..)) where
import Prelude ((+), (/))
import qualified Prelude... | alexbiehl/hoop | hadoop-protos/src/Hadoop/Protos/ClientNamenodeProtocolProtos/GetServerDefaultsRequestProto.hs | mit | 3,045 | 1 | 16 | 539 | 554 | 291 | 263 | 53 | 0 |
module Type.Meta
( zonk
, metaVars
, getMetaVars
) where
import qualified Data.Set as S
import Type.Types
zonk :: Type -> TI Type
zonk (TyForall tvs rho) = do
rho' <- zonk rho
return (mkForall tvs rho')
zonk (TyArr sigma1 sigma2) = do
sigma1' <- zonk sigma1
sigma2' <- zonk sigma2
return (TyArr sigma1' sigma... | meimisaki/Rin | src/Type/Meta.hs | mit | 1,120 | 0 | 13 | 280 | 512 | 245 | 267 | 40 | 4 |
import "hint" HLint.Default
import "hint" HLint.HLint
infixl 4 <$>
infixr 9 .
infixl 1 <&>
infixl 1 &
infixl 3 <|>
infixl 4 *>
infixl 4 <*
infixl 4 <*>
infixr 0 $
infixr 6 <>
infixr 5 ++
-- warn "my-a" = a (b $ c d) ==> a . b $ c d
-- warn "my-b" = a (b *> c) ==> a $ b *> c
-- warn "my-c" = a (b (c d)) ==> a (b $ c d... | ptol/oczor | HLint.hs | mit | 940 | 0 | 11 | 272 | 499 | 263 | 236 | -1 | -1 |
{-# LANGUAGE ParallelListComp, TemplateHaskell #-}
{-| TemplateHaskell helper for Ganeti Haskell code.
As TemplateHaskell require that splices be defined in a separate
module, we combine all the TemplateHaskell functionality that HTools
needs in this module (except the one for unittests).
-}
{-
Copyright (C) 2011,... | badp/ganeti | src/Ganeti/THH.hs | gpl-2.0 | 52,329 | 12 | 21 | 14,147 | 11,349 | 6,088 | 5,261 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude, RankNTypes #-}
module Lamdu.Sugar.RedundantTypes
( redundantTypes
) where
import Prelude.Compat
import Control.Lens (Traversal')
import qualified Control.Lens as Lens
import Control.Lens.Operators
import Lamdu.Sugar.Types
redundantTypesD... | rvion/lamdu | Lamdu/Sugar/RedundantTypes.hs | gpl-3.0 | 2,041 | 0 | 22 | 555 | 564 | 289 | 275 | -1 | -1 |
-- grid is a game written in Haskell
-- Copyright (C) 2018 karamellpelle@hotmail.com
--
-- This file is part of grid.
--
-- grid 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 Lice... | karamellpelle/grid | designer/source/Game/LevelPuzzleMode/LevelPuzzleData/Fancy/ShadeWall.hs | gpl-3.0 | 3,082 | 0 | 10 | 919 | 459 | 242 | 217 | 68 | 1 |
module UCeuler5
( solve
) where
smallest_even_divisable :: Int
smallest_even_divisable = foldr1 lcm [1..20]
solve :: Int -> [Char]
solve ucid = "Solved UC "++show(ucid)++": Result is: "++show(smallest_even_divisable) | tedhag/teuler | haskell/rest-euler/src/UCeuler5.hs | gpl-3.0 | 218 | 0 | 9 | 29 | 73 | 40 | 33 | 6 | 1 |
module Math.LambdaUtil.Generator
(generateExpr
, defaultParams) where
import Control.Monad.Random
import Control.Applicative
import Data.Functor
import Math.LambdaUtil.LambdaExpr
data GenParams = GenParams { depth :: Int -- ^ Max depth of expression
, vars :: Int -- ^ Max n... | zakharvoit/lambda-util | src/Math/LambdaUtil/Generator.hs | gpl-3.0 | 2,073 | 0 | 12 | 724 | 676 | 354 | 322 | 55 | 1 |
{-# LANGUAGE ScopedTypeVariables, NoMonomorphismRestriction, RecordWildCards #-}
module Main where
import Control.Applicative
import Control.Monad
import Control.Monad.Error
import Control.Monad.Reader
import Control.Monad.State
import Data.Conduit
import... | wavewave/lhc-analysis-collection | exe/evchainRunXQLD.hs | gpl-3.0 | 8,161 | 0 | 20 | 2,694 | 1,596 | 912 | 684 | 146 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-tpu/gen/Network/Google/Resource/TPU/Projects/Locations/TensorflowVersions/List.hs | mpl-2.0 | 6,960 | 0 | 20 | 1,610 | 1,039 | 598 | 441 | 153 | 1 |
{-# 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/Threads/Untrash.hs | mpl-2.0 | 4,983 | 0 | 20 | 1,246 | 783 | 456 | 327 | 114 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-dlp/gen/Network/Google/Resource/DLP/Projects/Locations/DeidentifyTemplates/Create.hs | mpl-2.0 | 7,294 | 0 | 17 | 1,448 | 799 | 474 | 325 | 123 | 1 |
func (x :+: xr) = x
| lspitzner/brittany | data/Test85.hs | agpl-3.0 | 20 | 0 | 7 | 6 | 16 | 8 | 8 | 1 | 1 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
--------------------------------------------------------------------------------
{-|
Module : TopLevelWindow
Copyright : (c) Jeremy O'Donoghue, 2007
License : wxWindows
Maintainer : wxhaskell-devel@lists.sourceforge.net
Stability : pro... | sherwoodwang/wxHaskell | wx/src/Graphics/UI/WX/TopLevelWindow.hs | lgpl-2.1 | 5,825 | 0 | 13 | 1,265 | 1,050 | 555 | 495 | 80 | 2 |
type Station = String
type Tijd = Int
type Connectie = [(Station, Tijd)]
stations = ["Alkmaar","Almelo","Almere Centrum","Amersfoort","Amsterdam Amstel","Amsterdam Centraal","Amsterdam Sloterdijk","Amsterdam Zuid","Apeldoorn","Arnhem","Assen","Beverwijk","Breda","Castricum","Delft","Den Helder","Deventer","Dieren","... | CanvasHS/Canvas.hs | demo/nederland/Trains.hs | lgpl-2.1 | 1,047 | 0 | 6 | 62 | 281 | 186 | 95 | -1 | -1 |
{-# language DeriveFunctor, DeriveFoldable #-}
module Data.StrictList where
import Data.Monoid
import Data.Foldable as F
import Control.Applicative
import Control.Monad (ap)
data StrictList a
= !a :! !(StrictList a)
| Empty
deriving (Show, Functor, Foldable)
infixr 5 :!
instance Monoid (StrictList a) w... | changlinli/nikki | src/Data/StrictList.hs | lgpl-3.0 | 2,069 | 0 | 12 | 581 | 831 | 429 | 402 | 66 | 3 |
import Test.Framework (defaultMain, testGroup)
import qualified Test.Vision.Image as I
import qualified Test.Vision.Histogram as H
main :: IO ()
main = defaultMain [
testGroup "Images" I.tests
, testGroup "Histograms" H.tests
]
| TomMD/friday | test/Test.hs | lgpl-3.0 | 248 | 0 | 8 | 50 | 70 | 41 | 29 | 7 | 1 |
-----------------------------------------------------------------------------
-- Copyright 2019, Ideas project team. This file is distributed under the
-- terms of the Apache License 2.0. For more information, see the files
-- "LICENSE.txt" and "NOTICE.txt", which are included in the distribution.
-----------------... | ideas-edu/ideas | src/Ideas/Common/Rule/Recognizer.hs | apache-2.0 | 2,286 | 0 | 11 | 478 | 531 | 290 | 241 | 36 | 2 |
import Text.Printf
ans :: (Double,Double) -> (Double,Double) -> Double
ans (x1,y1) (x2,y2) = sqrt ( (x1-x2)^2 + (y1-y2)^2 )
main = do
l <- getLine
let (x1:y1:x2:y2:_) = map read $ words l :: [Double]
o = ans (x1,y1) (x2,y2)
printf "%.8f\n" o
| a143753/AOJ | ITP1_10_A.hs | apache-2.0 | 256 | 0 | 14 | 57 | 172 | 92 | 80 | 8 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Openshift.V1.Group where
import GHC.Generics
import Data.Text
import Kubernetes.V1.ObjectMeta
import qualified Data.Aeson
-- |
data Group = G... | minhdoboi/deprecated-openshift-haskell-api | openshift/lib/Openshift/V1/Group.hs | apache-2.0 | 1,124 | 0 | 9 | 173 | 119 | 73 | 46 | 18 | 0 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE PackageImports #-}
{-
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
ht... | nomeata/codeworld | codeworld-base/src/Internal/Exports.hs | apache-2.0 | 2,255 | 0 | 5 | 648 | 347 | 234 | 113 | 99 | 0 |
module Move (Move(..), Move, Pos, Row, Column) where
import Player (Player)
import Stone (Stone)
type Pos = (Row, Column)
type Row = Int
type Column = Int
data Move = Move
{ position :: Pos
, player :: Player
, stone :: Stone
} deriving (Eq, Show)
| fendor/connect-four | src/Move.hs | bsd-2-clause | 286 | 0 | 8 | 85 | 103 | 66 | 37 | 11 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-- | The types of the package. This module is considered "internal", and the
-- types are re-exported from Graphics.UI.GLFW as necessary.
module Graphics.UI.GLFW.Types where
---... | Peaker/GLFW-b | Graphics/UI/GLFW/Types.hs | bsd-2-clause | 13,856 | 0 | 11 | 2,602 | 2,291 | 1,350 | 941 | 329 | 1 |
--
-- Module : ContentType
-- Copyright : (c) Conrad Parker 2006
-- License : BSD-style
-- Maintainer : conradp@cse.unsw.edu.au
-- Stability : experimental
-- Portability : portable
module Codec.Container.Ogg.ContentType (
ContentType (..),
-- | A list of content type labels (eg. "Vorbis", "Theora")... | kfish/hogg | Codec/Container/Ogg/ContentType.hs | bsd-3-clause | 12,488 | 0 | 12 | 3,535 | 3,106 | 1,774 | 1,332 | 244 | 2 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE ForeignFunctionInterface #-}
-- |
-- Module : Data.Array.Accelerate.C
-- Copyright : [2013] Manuel M T Chakravarty
-- License : BSD3
--
-- Maintainer : Manuel M T Chakravarty... | AndrewWUw/cs9181 | Data/Array/Accelerate/C.hs | bsd-3-clause | 8,187 | 118 | 17 | 2,305 | 1,751 | 991 | 760 | 157 | 30 |
------------------------------------------------------------------------------
-- | Parsers and renderers for XML and HTML 5. Although the formats are
-- treated differently, the data types used by each are the same, which
-- makes it easy to write code that works with the element structure of
-- either XML or H... | silkapp/xmlhtml | src/Text/XmlHtml.hs | bsd-3-clause | 3,645 | 0 | 7 | 801 | 368 | 246 | 122 | 49 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
module TimeSeriesData.Retrieve where
import Servant
import Servant.Client
import System.IO.Unsafe (unsafeInterleaveIO)
import Control.Monad.Trans.Either
import Data.Maybe (catMaybes)
import Data.List (nub)
import Data.Text as... | hectorhon/autotrace2 | src/TimeSeriesData/Retrieve.hs | bsd-3-clause | 1,343 | 0 | 13 | 268 | 452 | 234 | 218 | 29 | 1 |
module Main
( main -- :: IO ()
) where
import Text.Search.Whistlepig
main :: IO ()
main = return ()
| thoughtpolice/hs-whistlepig | examples/ex1.hs | bsd-3-clause | 116 | 0 | 6 | 36 | 36 | 21 | 15 | 5 | 1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.APPLE.VertexArrayObject
-- Copyright : (c) Sven Panne 2015
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : port... | phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/APPLE/VertexArrayObject.hs | bsd-3-clause | 857 | 0 | 4 | 97 | 58 | 46 | 12 | 8 | 0 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Pepino.Renderers.Ansi () where
import Pepino
import Text.PrettyPrint.ANSI.Leijen
instance Pretty Feature where
pretty (Feature title description background scenarios) = section "Feature:" title description
<> pretty background
<$> asDocs scenarios
inst... | franckrasolo/pepino | core/src/Pepino/Renderers/Ansi.hs | bsd-3-clause | 1,734 | 0 | 10 | 352 | 570 | 282 | 288 | 35 | 1 |
module Math.Topology.SSet where
import Control.Monad (ap)
import qualified Control.Category.Constrained as Constrained
import Data.Maybe (isJust)
import Prelude hiding (Bounded)
-- NOTE: This should be made much more efficient. First, it could be
-- flattened so that in a degenerate simplex you have immediate access
... | mvr/at | src/Math/Topology/SSet.hs | bsd-3-clause | 10,274 | 13 | 12 | 2,090 | 2,312 | 1,203 | 1,109 | -1 | -1 |
module Main where
import Control.Monad (filterM)
import Control.Applicative ((<$>))
import System.Environment (getArgs)
import System.FilePath ((</>))
import System.Directory (getDirectoryContents, doesFileExist)
import Data.ByteString (read... | mezzomondo/sghh-zip | src/Main.hs | bsd-3-clause | 1,047 | 0 | 10 | 284 | 301 | 160 | 141 | 25 | 1 |
module Data.Search.Results
( T
, size
, take
, toList
, filterM
, union
, intersection
, empty
, fromPSQ
, fromList
, changeWeight
) where
import qualified Control.Monad as Monad
import qualified Data.List as List
import Data.Maybe (mapMaybe)
import Data.Monoid ((<>))
i... | ariep/text-index | src/Data/Search/Results.hs | bsd-3-clause | 2,261 | 0 | 14 | 627 | 1,201 | 639 | 562 | 63 | 3 |
module Data
( LispVal(..)
, LispError(..)
, ThrowsError
, LispFunction
, IOLispFunction
, Env
, emptyEnv
, IOThrowsError
, liftThrows
)
where
import Text.Parsec(ParseError)
import Control.Monad.Except
import Data.Functor.Identity(runIdentity)
import Data.IORef
import System.IO(Handle)
data LispVal... | davideGiovannini/scheme-repl | src/Data.hs | bsd-3-clause | 3,614 | 0 | 11 | 1,356 | 1,074 | 563 | 511 | 86 | 5 |
-- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- Modify and collect code generation for final STG program
{-
This is now a sort-of-normal STG-to-STG pass (WDP 94/06), run by stg2stg.
- Traverses the S... | ezyang/ghc | compiler/profiling/SCCfinal.hs | bsd-3-clause | 9,341 | 0 | 21 | 2,889 | 2,317 | 1,201 | 1,116 | 173 | 21 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE RecordWildCards #-}
module Generator where
import Prelude hiding (const, mod)
import Data.Char (isLower, toUpper)
import Data.List (find, intercalate)
import Data.Maybe (isJust, maybeToList)
import Language.Haskell.Exts.SrcLoc (noLoc)
import qualified Language.Haskell.... | luciferous/vintage | generator/Generator.hs | bsd-3-clause | 8,536 | 0 | 17 | 3,059 | 3,009 | 1,548 | 1,461 | 182 | 2 |
-- Taken from http://hackage.haskell.org/package/regex-genex
-- temporarily to build with GHC 7.10.
{-# LANGUAGE ImplicitParams, NamedFieldPuns, PatternGuards #-}
module Regex.Genex.Normalize (normalize) where
import Data.Set (toList, Set)
import Text.Regex.TDFA.Pattern
import Text.Regex.TDFA.ReadRegex (parseRegex)
im... | plow-technologies/cobalt-kiosk-data-template | test/Regex/Genex/Normalize.hs | bsd-3-clause | 4,014 | 0 | 22 | 1,206 | 1,573 | 783 | 790 | 96 | 23 |
----------------------------------------------------------------------------
-- |
-- Module : ImportsBViaReexports
-- Copyright : (c) Sergey Vinokurov 2018
-- License : BSD3-style (see LICENSE)
-- Maintainer : serg.foo@gmail.com
---------------------------------------------------------------------------... | sergv/tags-server | test-data/0012resolve_reexport_import_cycles/import1NoListImport2WithListChildrenWildcardsReexportModule/ImportsBViaReexports.hs | bsd-3-clause | 472 | 0 | 6 | 63 | 63 | 46 | 17 | 3 | 0 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
-- |
-- Module : Data.Vector.Based
-- Copyright : (c) 2014 Joseph T. Abrahamson
-- License : BSD3
-- Maintainer : Joseph T. Abrahamson <me@jspha.com>
-- St... | tel/based-vectors | src/Data/Vector/Based.hs | bsd-3-clause | 3,764 | 0 | 13 | 966 | 1,131 | 604 | 527 | 63 | 2 |
module CalculatorKata.Day1 (calculate) where
import Data.List (splitAt)
calculate :: String -> Double
calculate source = do
let argOneList = takeWhile (\c -> c /= '+' && c /= '-' && c /= '*' && c /= '/') source
let argOne = read argOneList
let lengthOne = length argOneList
... | Alex-Diez/haskell-tdd-kata | old-katas/src/CalculatorKata/Day1.hs | bsd-3-clause | 810 | 0 | 19 | 333 | 253 | 125 | 128 | 16 | 5 |
module Main where
import Control.Monad
import System.Environment
import System.Exit
import System.IO
type Triplet = (Int, Int, Int)
main :: IO ()
main = do
args <- getArgs
when (length args /= 1) $ die "Usage: Solve2 <file>"
contents <- lines `fmap` readFile (args !! 0)
let scores = map (\l -> map re... | dterei/Scraps | codeJam2012/q2/Solve2.hs | bsd-3-clause | 2,253 | 0 | 18 | 828 | 1,145 | 588 | 557 | 58 | 6 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.