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 DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-dns/gen/Network/Google/Resource/DNS/ManagedZones/Update.hs | mpl-2.0 | 4,307 | 0 | 16 | 1,017 | 547 | 325 | 222 | 87 | 1 |
module Mechanism.Examples.PublicProject where
import qualified Data.Foldable as F
import Data.Functor ((<$>))
import Data.Set (Set)
import qualified Data.Set as S
import Mechanism
import Mechanism.Profile.Sequence (... | pseudonom/haskell-mechanism | src/Mechanism/Examples/PublicProject.hs | agpl-3.0 | 2,739 | 0 | 15 | 652 | 967 | 503 | 464 | 65 | 2 |
import Test.HUnit (Assertion, (@=?), runTestTT, Test(..), Counts(..))
import System.Exit (ExitCode(..), exitWith)
import Grains (square, total)
exitProperly :: IO Counts -> IO ()
exitProperly m = do
counts <- m
exitWith $ if failures counts /= 0 || errors counts /= 0 then ExitFailure 1 else ExitSuccess
testCase :... | mscoutermarsh/exercism_coveralls | assignments/haskell/grains/grains_test.hs | agpl-3.0 | 962 | 0 | 12 | 218 | 341 | 176 | 165 | 30 | 2 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QGLContext.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:32
Warning : this file is machine generated - do no... | uduki/hsQt | Qtc/Opengl/QGLContext.hs | bsd-2-clause | 20,136 | 0 | 14 | 3,262 | 6,390 | 3,251 | 3,139 | -1 | -1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QTreeWidget.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:20
Warning : this file is machine generated - do n... | keera-studios/hsQt | Qtc/Gui/QTreeWidget.hs | bsd-2-clause | 111,031 | 0 | 16 | 17,392 | 35,358 | 17,929 | 17,429 | -1 | -1 |
{-# LANGUAGE RecordWildCards #-}
-- | Testing AVM->Tree and Tree->Graph compilation.
module NLP.FeatureStructure.AVM.Tests where
import Control.Applicative ((<$>))
import Control.Monad (void)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Maybe (MaybeT(.... | kawu/feature-structure | src/NLP/FeatureStructure/AVM/Tests.hs | bsd-2-clause | 4,389 | 0 | 14 | 1,172 | 1,371 | 755 | 616 | 99 | 2 |
module QACG.CircGen.Cordic
(
cordic
,mkCosSin
,mkLog
,mkSqrt
)
where
import QACG.CircUtils.Circuit
import Control.Monad.State
import QACG.CircUtils.CircuitState
import QACG.CircGen.Add.SimpleRipple(simpleModRipple)
import QACG.CircGen.Misc(setNum)
-- K(n) = \prod_{i=0}^{n-1} 1/\sqrt{1 + 2^{-2i}}
k :: Int ->... | aparent/qacg | src/QACG/CircGen/Cordic.hs | bsd-3-clause | 6,217 | 0 | 16 | 2,953 | 2,230 | 1,084 | 1,146 | 125 | 2 |
module Main where
import Criterion (bgroup,bench,whnfIO,whnf,nf)
import Criterion.Main (defaultMain)
import qualified HaskellImageProcessingBenchmark.Friday as Friday (
readPng,threshold,mean)
import qualified HaskellImageProcessingBenchmark.UnmHip as UnmHip (
readPgm,threshold,mean)
import qualified HaskellI... | phischu/haskell-image-processing-benchmark | src/Main.hs | bsd-3-clause | 1,892 | 0 | 18 | 430 | 531 | 284 | 247 | 37 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Apps.X.Client
( mainBase
, mainRepl
, mainProgrammatic
) where
import Control.Concurrent.MVar
import Control.Concurrent.Lifted (threadDelay)
import qualified Control.Concurrent.Lifted as CL
import Control.Concurrent.Chan.Unagi
import Control.Monad.Reader
import qualif... | haroldcarr/juno | src/Apps/X/Client.hs | bsd-3-clause | 4,127 | 0 | 20 | 876 | 1,212 | 614 | 598 | 92 | 5 |
{-# OPTIONS -Wall -Werror #-}
module Main where
import Data.Time.Calendar.OrdinalDate
import Data.Time.Calendar.WeekDate
import Data.Time.Calendar
longYear :: Integer -> Bool
longYear year = case toWeekDate (fromGregorian year 12 31) of
(_,53,_) -> True
_ -> False
showLongYear :: Integer -> IO ()
showLongYear yea... | FranklinChen/hugs98-plus-Sep2006 | packages/time/time/test/LongWeekYears.hs | bsd-3-clause | 497 | 0 | 11 | 88 | 183 | 101 | 82 | 14 | 3 |
-- | Assorted types used in linguistics.
module Linguistics.Types where
import Data.Text (Text)
import GHC.Generics (Generic)
import Data.Serialize (Serialize)
import Data.Binary (Binary)
import Data.Aeson (FromJSON,ToJSON)
import Data.Serialize.Text ()
-- * Connectivity with @LingPy@.
--
-- <http://lingulist.de/... | choener/LinguisticsTypes | Linguistics/Types.hs | bsd-3-clause | 1,234 | 0 | 6 | 227 | 306 | 172 | 134 | 31 | 0 |
{-|
Module : AERN2.MP.DyadicSpec
Description : hspec tests for Dyadic
Copyright : (c) Michal Konecny
License : BSD3
Maintainer : mikkonecny@gmail.com
Stability : experimental
Portability : portable
-}
module AERN2.MP.DyadicSpec (spec) where
-- import MixedTypesNumPrel... | michalkonecny/aern2 | aern2-mp/test/AERN2/MP/DyadicSpec.hs | bsd-3-clause | 398 | 0 | 4 | 99 | 35 | 23 | 12 | 5 | 1 |
module HTaggerSpec (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
| KevinCotrone/htag | test/HTaggerSpec.hs | bsd-3-clause | 204 | 0 | 13 | 49 | 74 | 39 | 35 | 9 | 1 |
{-# LANGUAGE RankNTypes #-}
-- A classic test for type inference
-- Taken from "Haskell and principal types", Section 3
-- by Faxen, in the Haskell Workshop 2003, pp88-97
module ShouldCompile where
import Data.OldList (null)
import Prelude hiding (null)
class HasEmpty a where
isEmpty :: a -> Bool
i... | jstolarek/ghc | testsuite/tests/typecheck/should_compile/faxen.hs | bsd-3-clause | 688 | 4 | 14 | 202 | 237 | 123 | 114 | 21 | 1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[ListSetOps]{Set-like operations on lists}
-}
{-# LANGUAGE CPP #-}
module ListSetOps (
unionLists, minusList, deleteBys,
-- Association lists
Assoc, assoc, assocMaybe, assocUsing, assocDef... | sdiehl/ghc | compiler/utils/ListSetOps.hs | bsd-3-clause | 6,386 | 0 | 11 | 1,851 | 1,633 | 885 | 748 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable, FlexibleContexts, FlexibleInstances, GADTs #-}
{-# LANGUAGE MultiParamTypeClasses, NoMonomorphismRestriction, PatternGuards #-}
{-# LANGUAGE RankNTypes, TemplateHaskell, TupleSections, TypeFamilies #-}
module Puzzle (Direction(..), Board, GameState(..), toLists, fromLists, newBl... | konn/FRP2048 | Puzzle.hs | bsd-3-clause | 3,393 | 0 | 13 | 831 | 1,431 | 770 | 661 | 78 | 3 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.EXT.ClipVolumeHint
-- Copyright : (c) Sven Panne 2013
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : portable
... | mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/EXT/ClipVolumeHint.hs | bsd-3-clause | 789 | 0 | 4 | 95 | 48 | 38 | 10 | 5 | 1 |
tax = \n -> n * 108 `div` 100
sec h m s = h*3600 + m*60 + s
func fun n = fun(fun(fun n))
| YoshikuniJujo/shinjukuhs | events/event_004/DaichiSaitoTT/func2.hs | bsd-3-clause | 89 | 1 | 9 | 25 | 78 | 38 | 40 | 3 | 1 |
module ContMT (HasCont(..), MT(..), at, Z, S,
removeCont, runCont, WithCont) where
import MT
import Monad(liftM,MonadPlus(..))
import Control_Monad_Fix
import ImpUtils
newtype WithCont o m i = C { ($$) :: (i -> m o) -> m o }
removeCont :: WithCont o m i -> (i -> m o) -> m o
removeCont = ($$)
runCon... | forste/haReFork | tools/base/lib/Monads/ContMT.hs | bsd-3-clause | 3,289 | 98 | 14 | 1,091 | 1,200 | 631 | 569 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
import qualified System.Directory as Dir
import qualified Text.Printf
import qualified Data.ByteString.Lazy.Char8 as B
import qualified Network.HTTP.Types as HTTPTypes
import qualified Network.Wai as Wai
import qualified Network.Wai.Handler.Warp as Warp
main :: IO ()
main = do
... | strangemonad/quickserve | Main.hs | bsd-3-clause | 705 | 0 | 11 | 146 | 146 | 85 | 61 | 17 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
module Snap.Snaplet.Internal.RST where
import Control.Applicative (Alternative (..),
... | snapframework/snap | src/Snap/Snaplet/Internal/RST.hs | bsd-3-clause | 3,977 | 0 | 14 | 1,297 | 1,585 | 850 | 735 | 91 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : FRP.UISF.Render.GLUT
-- Copyright : (c) Daniel Winograd-Cort 2015
-- License : see the LICENSE file in the distribution
--
-- Maintainer : dwc@cs.yale.edu
-- Stability : experimental
module FRP.UISF.Render... | dwincort/UISF | FRP/UISF/Render/GLUT.hs | bsd-3-clause | 18,956 | 0 | 19 | 4,627 | 5,038 | 2,627 | 2,411 | 268 | 43 |
{-|
Module : Idris.TypeSearch
Description : A Hoogle for Idris.
Copyright :
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE ScopedTypeVariables #-}
module Idris.TypeSearch (
searchByType
, searchPred
, defaultScoreFunction
) where
import Control.Applicative (Applicative (..), (<... | enolan/Idris-dev | src/Idris/TypeSearch.hs | bsd-3-clause | 23,691 | 0 | 20 | 5,780 | 8,540 | 4,589 | 3,951 | 411 | 22 |
import Test.HUnit
import System.IO
import Ch3
let exampleList = Cons (-1) (Cons 2 (Cons (-6) Empty))
let addOne x = x + 1
let square x = x * x
mapIntList addOne exampleList
mapIntList square exampleList
keepOnlyEven exampleList
filterList even lst1
| wangwangwar/cis194 | test/Ch3Spec.hs | bsd-3-clause | 257 | 1 | 12 | 49 | 102 | 53 | 49 | -1 | -1 |
{-# language CPP #-}
-- | = Name
--
-- VK_NV_shading_rate_image - device extension
--
-- == VK_NV_shading_rate_image
--
-- [__Name String__]
-- @VK_NV_shading_rate_image@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
-- 165
--
-- [__Revision__]
-- 3
--
-- [__Exte... | expipiplus1/vulkan | src/Vulkan/Extensions/VK_NV_shading_rate_image.hs | bsd-3-clause | 84,841 | 2 | 19 | 16,152 | 8,214 | 4,910 | 3,304 | -1 | -1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[HsLit]{Abstract syntax: source-language literals}
-}
{-# LANGUAGE CPP, DeriveDataTypeable #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUA... | gridaphobe/ghc | compiler/hsSyn/HsLit.hs | bsd-3-clause | 8,140 | 0 | 12 | 2,178 | 1,903 | 985 | 918 | 125 | 1 |
module Exercises96 where
-- 1.
-- recursively break up the string and build up the list
-- recursion stops when the input is empty. empty string returns empty list
myWords :: String -> [String]
myWords "" = []
myWords input = beg : end
where
notSpace = \x -> x /= ' '
isSpace = \x -> x == ' '
... | pdmurray/haskell-book-ex | src/ch9/Exercises9.6.hs | bsd-3-clause | 455 | 0 | 10 | 122 | 106 | 59 | 47 | 8 | 1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.EXT.CopyTexture
-- Copyright : (c) Sven Panne 2013
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : portable
--
... | mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/EXT/CopyTexture.hs | bsd-3-clause | 771 | 0 | 4 | 102 | 51 | 41 | 10 | 7 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE UndecidableInstances #-}
#if defined(TRUSTWORTHY) && !defined(SAFE)
{-# LANGUAGE Trustworthy #-}
#endif
----------------------------------... | np/lens | src/Control/Lens/Classes.hs | bsd-3-clause | 5,144 | 0 | 12 | 816 | 921 | 521 | 400 | 68 | 1 |
x = y where
y = 10
| itchyny/vim-haskell-indent | test/where/no_newline_where.out.hs | mit | 27 | 1 | 5 | 15 | 16 | 7 | 9 | 2 | 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 | Test/Norm/ForIndexCLTE.hs | gpl-2.0 | 1,154 | 0 | 6 | 204 | 56 | 34 | 22 | 8 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- Derived from AWS service descriptions, licensed under Apache 2.0.
-- |
-- Module : Network.AWS.EFS.Waiters
-- Copyright : (c) 2013-2015 Brendan Hay
-- License : Mozilla Public License, v. ... | fmapfmapfmap/amazonka | amazonka-efs/gen/Network/AWS/EFS/Waiters.hs | mpl-2.0 | 612 | 0 | 4 | 122 | 39 | 31 | 8 | 7 | 0 |
{-
Copyright 2012 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 to in ... | kustomzone/plush | src/Plush/Job/History.hs | apache-2.0 | 5,098 | 0 | 14 | 1,119 | 1,489 | 774 | 715 | 100 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import GitHub.Data.Id (Id (..))
import qualified GitHub.Data.DeployKeys as DK
import qualified GitHub.Endpoints.Repos.DeployKeys as DK
import qualified GitHub.Auth as Auth
main :: IO ()
main = do
let auth = Auth.OAuth "auth_token"
eDeployKey <- DK.deploy... | jwiegley/github | samples/Repos/DeployKeys/ShowDeployKey.hs | bsd-3-clause | 592 | 0 | 12 | 94 | 173 | 97 | 76 | 15 | 2 |
-- | A library to do stuff.
module Lib
(
ourAdd
) where
-- | Add two 'Int' values.
ourAdd :: Int -- ^ left
-> Int -- ^ right
-> Int -- ^ sum
ourAdd x y = x + y | FranklinChen/stack-template-demo | src/Lib.hs | bsd-3-clause | 192 | 0 | 6 | 74 | 41 | 25 | 16 | 7 | 1 |
-- |
-- Module : Crypto.PubKey.Ed448
-- License : BSD-style
-- Maintainer : Olivier Chéron <olivier.cheron@gmail.com>
-- Stability : experimental
-- Portability : unknown
--
-- Ed448 support
--
-- Internally uses Decaf point compression to omit the cofactor
-- and implementation by Mike Hamburg. Externally... | vincenthz/cryptonite | Crypto/PubKey/Ed448.hs | bsd-3-clause | 5,558 | 0 | 16 | 1,679 | 1,091 | 579 | 512 | 111 | 2 |
<?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="ro-RO">
<title>Access Control Testing | ZAP Extension</title>
<maps>
<homeID>top</homeID>
... | kingthorin/zap-extensions | addOns/accessControl/src/main/javahelp/org/zaproxy/zap/extension/accessControl/resources/help_ro_RO/helpset_ro_RO.hs | apache-2.0 | 776 | 63 | 53 | 120 | 337 | 170 | 167 | -1 | -1 |
module RegAlloc.Linear.Stats (
binSpillReasons,
countRegRegMovesNat,
pprStats
)
where
import RegAlloc.Linear.Base
import RegAlloc.Liveness
import Instruction
import UniqFM
import Outputable
import Data.List
import State
-- | Build a map of how many times each reg was alloced, clobbered, loa... | tjakway/ghcjvm | compiler/nativeGen/RegAlloc/Linear/Stats.hs | bsd-3-clause | 2,640 | 0 | 22 | 1,017 | 691 | 367 | 324 | 60 | 5 |
module Main where
import Control.Applicative
import System.Environment
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Text.Read
import Data.List.Split
main = do
args <- getArgs
case args of
[x] -> profRead "ghcjs.prof" (read x)
[file,... | beni55/ghcjs | utils/profRead.hs | mit | 792 | 0 | 12 | 200 | 302 | 157 | 145 | 22 | 3 |
{-# LANGUAGE CPP #-}
-- This should fail to compile with "ghc -Wcpp-undef -Werror ...".
#if this_cpp_identifier_does_not_exist
message :: String
message = "This is wrong!"
#endif
main :: IO ()
main = putStrLn "Hello"
| olsner/ghc | testsuite/tests/driver/should_fail/T12752.hs | bsd-3-clause | 219 | 0 | 6 | 36 | 33 | 19 | 14 | 3 | 1 |
module T6031a where
data Empty
| urbanslug/ghc | testsuite/tests/deriving/should_compile/T6031a.hs | bsd-3-clause | 35 | 0 | 3 | 9 | 7 | 5 | 2 | -1 | -1 |
module Axis where
data Axis
= PositiveX
| PositiveY
| PositiveZ
| NegativeX
| NegativeY
| NegativeZ
data AxisName
= AxisX
| AxisY
| AxisZ
axisName :: Axis -> AxisName
axisName PositiveX = AxisX
axisName NegativeX = AxisX
axisName PositiveY = AxisY
axisName NegativeY = AxisY
axisName PositiveZ = Axi... | io7m/smf | com.io7m.smfj.specification/src/main/resources/com/io7m/smfj/specification/axis.hs | isc | 908 | 0 | 8 | 209 | 262 | 152 | 110 | 36 | 4 |
module Chat.Room where
import Chat.Packet
import Chat.Types
import Control.Concurrent
import Control.Concurrent.STM
import Control.Monad
import qualified Data.Map as Map
modifyTMVar :: TMVar a -> (a -> a) -> STM ()
modifyTMVar tmvar action = do
var <- takeTMVar tmvar
putTMVar tmvar (action var)
{-
splitRoom ... | thchittenden/GeoChat | src/Chat/Room.hs | mit | 1,851 | 0 | 12 | 392 | 398 | 193 | 205 | 28 | 1 |
module Hadis.Commands.Sets
( sadd
, scard
, sismember
, smembers
) where
---
import Hadis.Util
import Hadis.Util.Commands
import Hadis.Ext.State
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Set (Set)
import qualified Data.Set as Set
---
... | goshakkk/hadis | src/Hadis/Commands/Sets.hs | mit | 877 | 0 | 13 | 210 | 302 | 166 | 136 | 24 | 1 |
-- A Cell has an X and Y coordinate.
type Cell = (Int, Int)
--A State is a list of cells.
type State = [Cell]
--Maze is described below.
--Bounds is the total size of the maze in (X,Y)
bounds :: (Int, Int)
bounds = (5,5)
--Walls are the cells within the maze that cannot be passed.
walls :: [Cell]
walls = [(1,4), (4,... | fultonms/artificial-intelligence | a1/Maze.hs | mit | 1,302 | 0 | 12 | 289 | 528 | 298 | 230 | 27 | 1 |
module GHCJS.DOM.SpeechSynthesisUtterance (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/SpeechSynthesisUtterance.hs | mit | 54 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
module Control.Applicative.Extended (
replicateA
, module Control.Applicative
) where
import Control.Applicative
replicateA :: Applicative f => Int -> f a -> f [a]
replicateA n = sequenceA . replicate n
| jtobin/deanie | lib/Control/Applicative/Extended.hs | mit | 216 | 0 | 9 | 43 | 67 | 36 | 31 | 6 | 1 |
import Data.List
fillEggnog = filter (\xs -> sum xs == 150) . subsequences
part1 :: [Int] -> Int
part1 = length . fillEggnog
part2 xs = length $ filter (\x-> length x == minLength) subs
where
subs = fillEggnog xs
minLength = minimum $ map length subs
main = do
containers <- (map read . lines)... | bruno-cadorette/AdventOfCode | Day 17/Day17.hs | mit | 408 | 0 | 11 | 101 | 159 | 79 | 80 | 11 | 1 |
module Util.Graph (
Graph,
components,
nodes,
children,
reachable,
) where
import Control.Monad (when)
import Control.Monad.State (State, modify, gets, evalState)
import Data.Maybe (fromMaybe)
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Set (Set)
import qualified Data.Set as Set
typ... | jmikkola/Athena | src/Util/Graph.hs | mit | 4,732 | 0 | 15 | 1,246 | 1,770 | 898 | 872 | 126 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Data.BlockChain.Block.BlockInfo where
import Data.ByteString.Lazy.Char8 (ByteString)
import qualified Data.ByteString.Lazy.Char8 as BL
import Data.Maybe (fromJust)
import Data.Time.Clock.POSIX
-- below imports available via cabal install
import Data.Aeson
import Network.HTT... | geophf/1HaskellADay | exercises/HAD/Data/BlockChain/Block/BlockInfo.hs | mit | 2,759 | 0 | 11 | 458 | 283 | 169 | 114 | 27 | 1 |
module NetHack.Control.LevelTransition
(applyTransition)
where
import NetHack.Monad.NHAction
import NetHack.Data.LevelTransition
import NetHack.Data.Level
import Control.Monad.IO.Class
applyTransition :: NHAction ()
applyTransition = do
id <- nextRunningIDM
oldLev <- getLevelM
let (lev, _) = newLevel id
... | Noeda/Megaman | src/NetHack/Control/LevelTransition.hs | mit | 546 | 0 | 10 | 84 | 138 | 69 | 69 | 18 | 1 |
-- Self composition of an unary function. Primitive Recursion.
module SelfComposition where
selfCompose :: Integer -> (a -> a) -> (a -> a)
selfCompose 0 _ = id
selfCompose times function
= function . selfCompose (times - 1) function
{- GHCi>
( selfCompose 0 (+ 1) ) 1
( selfCompose 1 (+ 1) ) 1
( sel... | pascal-knodel/haskell-craft | Examples/· Recursion/· Primitive Recursion/Higher Order Functions/SelfComposition.hs | mit | 364 | 0 | 8 | 95 | 72 | 41 | 31 | 5 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-
Copyright (C) 2012-2015 John MacFarlane <jgm@berkeley.edu>
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 your option) ... | csrhodes/pandoc | src/Text/Pandoc/Options.hs | gpl-2.0 | 18,245 | 0 | 10 | 6,021 | 1,935 | 1,259 | 676 | 315 | 1 |
{-# language TemplateHaskell, DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
module Graph.Weighted.Data where
import Autolib.ToDoc
import Autolib.Reader
import Autolib.Set
import Autolib.Hash
import Data.Typeable
import GHC.Generics
data ( Ord v ) => Kante v w =
Kante { von :: v, nach :: v, gewicht :: ... | marcellussiegburg/autotool | collection/src/Graph/Weighted/Data.hs | gpl-2.0 | 1,428 | 0 | 11 | 343 | 470 | 251 | 219 | 26 | 0 |
-- |
-- Module : Doublefunge.Parser
-- Copyright : Joe Jevnik 2013
--
-- License : GPL-2
-- Maintainer : joejev@gmail.org
-- Stability : stable
-- Portability : GHC
--
-- Parsing functions for the doublefunge interpreter.
module Befunge.Doublefunge.Parser where
import Befunge.Doublefunge.Data
import Bef... | llllllllll/befunge | Befunge/Doublefunge/Parser.hs | gpl-2.0 | 1,194 | 0 | 14 | 349 | 329 | 183 | 146 | 19 | 3 |
{-# LANGUAGE TypeSynonymInstances #-}
{-# OPTIONS -Wall -Werror #-}
module HMumps.Types where
-- import Text.Regex
import Data.MValue
type Routine = String -> Maybe Subroutine
type Line = [Command]
type File = [(Tag, Line)]
type OldFile = [(Tag, Int, Line)]
type Subroutine = ([Name],[Line]) --... | aslatter/hmumps | HMumps/Types.hs | gpl-3.0 | 7,558 | 0 | 8 | 1,931 | 1,072 | 662 | 410 | 106 | 0 |
module Main where
multiplicacaoEtiope :: Int->Int->Int-> Int
multiplicacaoEtiope m n r
| m == 1 = r+n
| m `rem` 2 == 0 = multiplicacaoEtiope (m `div` 2) (n * 2) r
| otherwise = multiplicacaoEtiope (m `div` 2) (n * 2) (r+n)
main :: IO()
main = do
print(multiplicacaoEtiope 14 12 0)
| llscm0202/BIGDATA2017 | ATIVIDADE1/exerciciosFuncoes/ex3.hs | gpl-3.0 | 298 | 0 | 9 | 70 | 159 | 83 | 76 | 9 | 1 |
{-|
Read hledger data from various data formats, and related utilities.
-}
module Hledger.Read (
tests_Hledger_Read,
readJournalFile,
readJournal,
journalFromPathAndString,
ledgeraccountname,
myJournalPath,
myJournal,
someamount,
journalenvvar,
j... | Lainepress/hledger | hledger-lib/Hledger/Read.hs | gpl-3.0 | 6,281 | 0 | 16 | 1,380 | 1,311 | 691 | 620 | 104 | 7 |
{-# LANGUAGE RankNTypes #-}
module Main (
main
) where
import System.Environment
(getArgs)
import Text.CSV
(CSV(..), parseCSVFromFile, parseCSV)
import Prelude hiding (getContents)
import Pipes
import qualified Pipes.Prelude as P
import Control.Monad
(liftM, unless)
import Data.List
(intersperse)
import qua... | adarqui/ToyBox | haskell/bos/text/Text.CSV/src/parse.hs | gpl-3.0 | 1,563 | 0 | 15 | 374 | 659 | 333 | 326 | 66 | 2 |
{-# LANGUAGE DisambiguateRecordFields, TypeFamilies,
StandaloneDeriving, DeriveFunctor, DeriveFoldable, GeneralizedNewtypeDeriving #-}
-------------------------------------------------------------------------------------
-- |
-- Copyright : (c) Hans Hoglund 2012
-- License : BSD-style
-- Maintainer : hans@... | hanshoglund/modulo | src/Language/Modulo/Util/Mangle.hs | gpl-3.0 | 1,225 | 0 | 7 | 190 | 152 | 93 | 59 | 16 | 1 |
module Text.Inflections.Tokenizer (
CaseStyle,
camelCase,
snakeCase,
rubyCase,
canTokenize,
tokenize) where
import Data.Char (toLower, isDigit, isLower)
import Data.Either (isRight)
import Text.Inflections
import Text.Inflections.Parse.Types
import Text.Parsec.Error (ParseError)
import Control.Fallible
... | mumuki/mulang | src/Text/Inflections/Tokenizer.hs | gpl-3.0 | 1,621 | 0 | 11 | 513 | 451 | 243 | 208 | 37 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import Control.Monad (unless, when)
import Data.Aeson ((.=), encode, object, ToJSON(..))
import qualified Data.Text as T
import qualified Data.ByteString.Lazy.Char8 as BS8
import System.Environment (getArgs)
import System.Directory (doesFileExist)
import Musi... | ods94065/lylex | src/Main.hs | gpl-3.0 | 1,271 | 0 | 14 | 271 | 399 | 214 | 185 | 31 | 2 |
module Parser(Expr(Arg,Quote,Let,CarFn,CdrFn,ConsFn,If,Call),parse) where
import qualified Data.Map as Map
import qualified Data.Set as Set
import Reader(Value(Cons,Nil),foldValue)
data Expr = Arg
| Quote Value
| Let (Map.Map Value Expr) Expr
| CarFn Expr
| CdrFn Expr
... | qpliu/esolang | ph/hs/compiler/Parser.hs | gpl-3.0 | 2,226 | 0 | 13 | 553 | 855 | 440 | 415 | 55 | 3 |
module Codewars.Arrays where
import Data.List
uniqueSum :: [Int] -> Int
uniqueSum = sum . nub
| ice1000/OI-codes | codewars/101-200/unique-sum.hs | agpl-3.0 | 96 | 0 | 6 | 17 | 32 | 19 | 13 | 4 | 1 |
-- | Backend specific glue for memories and buffers
module ViperVM.Platform.Peer.MemoryPeer (
MemoryPeer(..), memoryPeerApply,
memoryName, memorySize,
BufferPeer(..), bufferPeerApply,
bufferSize, bufferAllocate, bufferRelease,
hostBuffer, clBuffer
) where
import ViperVM.Backends.Common.Buffer
import qua... | hsyl20/HViperVM | lib/ViperVM/Platform/Peer/MemoryPeer.hs | lgpl-3.0 | 2,294 | 0 | 10 | 415 | 577 | 321 | 256 | 45 | 2 |
module ProjectM36.FunctionalDependency where
import ProjectM36.Base
import qualified Data.Set as S
data FunctionalDependency = FunctionalDependency AttributeNames AttributeNames RelationalExpr
--(s{city} group ({city} as x) : {z:=count(@x)}) {z}
-- as defined in Relational Algebra and All That Jazz page 21
inclusion... | agentm/project-m36 | src/lib/ProjectM36/FunctionalDependency.hs | unlicense | 1,131 | 0 | 13 | 151 | 208 | 110 | 98 | 15 | 1 |
module Types.Agent.Omni where
import Types.World
-- |A mind that always does the same thing and which stores all visual/local
-- information about the world (i.e. stench/breeze).
data OmniMind = OmniMind {
-- |The action which the mind will always perform.
_omniMindAction :: Action,
-- |The agent's message ... | jtapolczai/wumpus | Types/Agent/Omni.hs | apache-2.0 | 370 | 0 | 9 | 70 | 40 | 27 | 13 | 5 | 0 |
-- Copyright (C) 2009-2012 John Millikin <john@john-millikin.com>
--
-- 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
-- any later version.
--
-- This progr... | rblaze/haskell-dbus | lib/DBus/Internal/Message.hs | apache-2.0 | 10,785 | 0 | 11 | 2,697 | 1,302 | 783 | 519 | 124 | 2 |
module Text.HandsomeSoup (openUrl, fromUrl, parseHtml, (!), css) where
import Text.XML.HXT.Core
import Network.HTTP
import Network.URI
import Data.Tree.NTree.TypeDefs
import Control.Monad.Trans.Maybe
import Control.Monad.Trans
import Data.Maybe
import Text.Parsec
import qualified Data.Map as M
import Data.Monoid (mcon... | egonSchiele/HandsomeSoup | src/Text/HandsomeSoup.hs | bsd-3-clause | 3,911 | 0 | 14 | 916 | 1,074 | 571 | 503 | 59 | 8 |
{-# LANGUAGE DoAndIfThenElse #-}
module Main where
import LJRSS.ConcurrentAgregate
import LJRSS.LJConfig
import LJRSS.LJFeed
import LJRSS.Email
import System.Console.GetOpt
import qualified Data.Map as DM
import qualified Data.Set as DS
import Data.Maybe (fromMaybe)
import qualified Data.Text as T
import Control.Mon... | jdevelop/lj2rss | Main.hs | bsd-3-clause | 3,728 | 0 | 13 | 845 | 1,008 | 510 | 498 | 88 | 5 |
module Sharc.Instruments.ViolaMuted (violaMuted) where
import Sharc.Types
violaMuted :: Instr
violaMuted = Instr
"viola_muted_vibrato"
"Viola (muted)"
(Legend "McGill" "1" "7")
(Range
(InstrRange
(HarmonicFreq 1 (Pitch 130.81 36 "c3"))
(Pitch 130.81 36 "c3")
... | anton-k/sharc-timbre | src/Sharc/Instruments/ViolaMuted.hs | bsd-3-clause | 49,347 | 0 | 15 | 14,047 | 18,771 | 9,728 | 9,043 | 1,683 | 1 |
-- The Timber compiler <timber-lang.org>
--
-- Copyright 2008-2009 Johan Nordlander <nordland@csee.ltu.se>
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions
-- are met:
--
-- 1. Redistributions of sour... | mattias-lundell/timber-llvm | src/Decls.hs | bsd-3-clause | 9,677 | 0 | 17 | 3,703 | 1,782 | 938 | 844 | 58 | 3 |
module Doukaku.Anagram (solve) where
solve :: String -> String
solve = show . maximum . map anagramLen' . allTails
where
anagramLen' ([], _) = 0
anagramLen' (y:ys, xs) = max (anagramLen (y:ys) xs) (anagramLen ys xs + 1)
anagramLen :: String -> String -> Int
anagramLen [] _ = 0
anagramLen (x:xs) ys = max res... | hiratara/doukaku-past-questions-advent-2013 | src/Doukaku/Anagram.hs | bsd-3-clause | 618 | 0 | 11 | 141 | 316 | 169 | 147 | 14 | 2 |
{-# LANGUAGE EmptyDataDecls #-}
-- | Introducing type constants
--
-- We wish to outlaw terms such as bad_sentence in CFG2EN.hs,
-- even though there may be an interpretation that accepts
-- these bad terms.
-- We really wish our terms represent all and only
-- valid CFG derivations. We accomplish this goal here.
-- O... | suhailshergill/liboleg | Lambda/CFG3EN.hs | bsd-3-clause | 1,564 | 0 | 8 | 475 | 267 | 153 | 114 | -1 | -1 |
type RGB = (Int, Int, Int)
data Suit = Spade | Heart | Diamond | Club deriving Show
data Color = Black | Red
rgb :: Suit -> RGB
rgb = toRGB . color
color :: Suit -> Color
color Spade = Black
color Heart = Red
color Diamond = Red
color Club = Black
toRGB :: Color -> RGB
toRGB Black = (0, 0, 0)
toRGB Red = (0xff, 0,... | YoshikuniJujo/funpaala | samples/21_adt/cards1.hs | bsd-3-clause | 324 | 0 | 5 | 77 | 147 | 84 | 63 | 13 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Valkyrie.Graphics.Mesh.Types where
import Control.Lens.TH
import qualified Data.Map as M
import Data.Typeable
import qualified Graphics.Rendering.OpenGL.Raw as GL
data Mesh = Mesh {
_meshVertexCount :: GL.GLsizei,
_meshVBO :: GL.GLuint,
_meshParts :: M.Map String ... | Feeniks/valkyrie | src/Valkyrie/Graphics/Mesh/Types.hs | bsd-3-clause | 384 | 0 | 11 | 61 | 103 | 64 | 39 | 12 | 0 |
{-# OPTIONS_GHC -fno-implicit-prelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Int
-- Copyright : (c) The University of Glasgow 1997-2002
-- License : see libraries/base/LICENSE
--
-- Maintainer : cvs-ghc@haskell.org
-- Stability : intern... | alekar/hugs | packages/base/GHC/Int.hs | bsd-3-clause | 33,811 | 545 | 17 | 10,679 | 9,663 | 5,029 | 4,634 | -1 | -1 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.ARB.SpirvExtensions
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portabil... | haskell-opengl/OpenGLRaw | src/Graphics/GL/ARB/SpirvExtensions.hs | bsd-3-clause | 695 | 0 | 5 | 95 | 52 | 39 | 13 | 8 | 0 |
module Main (main) where
import Control.Monad (void)
import Text.Megaparsec
import Text.Megaparsec.Expr
import Text.Megaparsec.String -- input stream is of the type ‘String’
import qualified Text.Megaparsec.Lexer as L
data BExpr
= BoolConst Bool
| Not BExpr
| BBinary BBinOp BExpr BExpr
| RBinary RBinOp AExpr ... | mrkkrp/megaparsec-site | tutorial-code/ParsingWhile.hs | bsd-3-clause | 3,707 | 0 | 12 | 853 | 1,333 | 687 | 646 | 132 | 2 |
-----------------------------------------------------------------------------
-- |
-- Module : Plugins.Monitors.Disk
-- Copyright : (c) 2010, 2011, 2012 Jose A Ortega Ruiz
-- License : BSD-style (see LICENSE)
--
-- Maintainer : Jose A Ortega Ruiz <jao@gnu.org>
-- Stability : unstable
-- Portability :... | raboof/xmobar | src/Plugins/Monitors/Disk.hs | bsd-3-clause | 5,411 | 0 | 16 | 1,297 | 2,196 | 1,173 | 1,023 | 118 | 4 |
{-# LANGUAGE TemplateHaskell #-}
module Sodium.Chloride.Program.Scalar
( module Sodium.Chloride.Program.Scalar
, module Sodium.Chloride.Program
) where
import Control.Lens (prism', Simple, Prism)
import Control.Lens.TH
import qualified Data.Map as M
import Sodium.Chloride.Program
data Program
= Program
{ _progr... | kirbyfan64/sodium | src/Sodium/Chloride/Program/Scalar.hs | bsd-3-clause | 1,475 | 44 | 13 | 253 | 509 | 286 | 223 | -1 | -1 |
{-# LANGUAGE TupleSections #-}
module Jerimum.PostgreSQL.Helper
( fetchAll
, fetchColsData
, fetchColsName
) where
import Control.Monad
import qualified Data.ByteString as B
import qualified Database.PostgreSQL.LibPQ as PQ
fetchColsData :: PQ.Result -> PQ.Row -> [PQ.Column] -> IO (Maybe [... | dgvncsz0f/nws | src/Jerimum/PostgreSQL/Helper.hs | bsd-3-clause | 1,079 | 0 | 19 | 230 | 410 | 215 | 195 | 27 | 2 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
Renaming of patterns
Basically dependency analysis.
Handles @Match@, @GRHSs@, @HsExpr@, and @Qualifier@ datatypes. In
general, all of these functions return a renamed thing, and a set of
free variables.
-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContex... | sdiehl/ghc | compiler/GHC/Rename/Pat.hs | bsd-3-clause | 37,146 | 10 | 24 | 12,281 | 7,230 | 3,757 | 3,473 | -1 | -1 |
module Main where
import Control.Monad (void)
import Test.HUnit ((~?=), runTestTT, Test(TestList))
import Jdex.Parse
main :: IO ()
main = void . runTestTT $ TestList
[ jdFileToFQCN "org/graphstream/ui/swingViewer/LayerRenderer.html" ~?= "org.graphstream.ui.swingViewer.LayerRenderer"
, jdFileToFQCN "com/goog... | jhrcek/jdex | test/Tests.hs | bsd-3-clause | 971 | 0 | 9 | 98 | 137 | 75 | 62 | 13 | 1 |
module Guesswork.Math.Statistics where
import qualified Data.Vector.Unboxed as VU
import Guesswork.Types
kh xs = sqrt . (/n) . sum . map (\x->(x-avg')**2) $ xs
where avg' = avg xs
n = fromIntegral . length $ xs
avg [] = error "Empty list!"
avg xs = sum xs / (fromIntegral . length $ xs)
euclidianNorm ::... | deggis/guesswork | src/Guesswork/Math/Statistics.hs | bsd-3-clause | 1,892 | 0 | 12 | 490 | 643 | 343 | 300 | 38 | 2 |
----------------------
-- CONSTELM --
----------------------
module Constelm where
import Auxiliary
import LPPE
import Simplify
import Data.List
import Usage
import DataSpec
-- This function takes a specification, detects which parameters are constant,
-- substitutes the initial values for these parameters w... | utwente-fmt/scoop | src/Constelm.hs | bsd-3-clause | 3,676 | 0 | 15 | 768 | 922 | 503 | 419 | 33 | 1 |
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
-- | This module provides a file browser widget that allows users to
-- navigate directory trees, search for files and directories, and
-- select entries of... | sjakobi/brick | src/Brick/Widgets/FileBrowser.hs | bsd-3-clause | 37,439 | 0 | 26 | 10,181 | 6,200 | 3,274 | 2,926 | 513 | 12 |
module Util (
doctestTestCase
, Util.cases
, errors
, failures
) where
import System.Directory (getCurrentDirectory, setCurrentDirectory)
import System.Exit (ExitCode(ExitSuccess))
import System.Process (readProcessWithExitCode)
import qualified Test.HUnit as HU
import Test.HUnit (assertEqual, Counts(..), ... | beni55/doctest-haskell | tests/integration/Util.hs | mit | 2,497 | 0 | 14 | 658 | 541 | 300 | 241 | 50 | 3 |
module Pos.Core.Common.ChainDifficulty
( ChainDifficulty (..)
, HasDifficulty (..)
, isMoreDifficult
) where
import Universum
import Data.Aeson.TH (defaultOptions, deriveJSON)
import Data.SafeCopy (base, deriveSafeCopySimple)
import Pos.Binary.Class... | input-output-hk/pos-haskell-prototype | core/src/Pos/Core/Common/ChainDifficulty.hs | mit | 1,265 | 0 | 9 | 270 | 302 | 172 | 130 | -1 | -1 |
module AllBaseModules where
import Control.Exception ()
import Data.Char ()
import Data.Data ()
import Data.Defined ()
import Data.Either ()
import Data.Function ()
import Data.List ()
import Data.LocalStorage ()
import Data.Maybe ()
import Data.MutMap ()
import Data.MutMap.Internal ()
import Data.Mutex ()
import Data... | beni55/fay | tests/AllBaseModules.hs | bsd-3-clause | 562 | 0 | 6 | 80 | 197 | 122 | 75 | 26 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE... | advancedtelematic/quickcheck-state-machine-model | test/ProcessRegistry.hs | bsd-3-clause | 20,100 | 0 | 20 | 5,478 | 5,621 | 2,941 | 2,680 | 437 | 12 |
{-# LANGUAGE TemplateHaskell #-} -- for HscInterpreted
module Info () where
fib :: Int -> Int
fib 0 = 0
fib 1 = 1
fib n = fib (n - 1) + fib (n - 2)
| cabrera/ghc-mod | test/data/Info.hs | bsd-3-clause | 150 | 0 | 8 | 38 | 66 | 36 | 30 | 6 | 1 |
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
-- | This module provides a scrollable list type and functions for
-- manipulating and rendering it.
module Brick.Widgets.List
( List(listElements, listSelected, listName, listItemHeight)
-- * Consructing a list
, ... | ktvoelker/brick | src/Brick/Widgets/List.hs | bsd-3-clause | 8,917 | 0 | 22 | 2,999 | 2,355 | 1,242 | 1,113 | -1 | -1 |
{-# LANGUAGE CPP #-}
module Network.Bluetooth.Device (
#if defined(mingw32_HOST_OS)
module Network.Bluetooth.Windows.Device
#elif defined(darwin_HOST_OS)
module Network.Bluetooth.OSX.Device
#elif defined(linux_HOST_OS)
module Network.Bluetooth.Linux.Device
#elif defined(freebsd_HOST_OS)
module... | bneijt/bluetooth | src/Network/Bluetooth/Device.hs | bsd-3-clause | 655 | 0 | 5 | 75 | 30 | 23 | 7 | 2 | 0 |
{-# LANGUAGE RecordWildCards, DeriveDataTypeable #-}
-- | Nix configuration
module Stack.Config.Nix
(nixOptsFromMonoid
,StackNixException(..)
) where
import Control.Monad (when)
import Data.Text (pack)
import Data.Maybe
import Data.Typeable
import Stack.Types
import Control.Exception.Lifted
impor... | rubik/stack | src/Stack/Config/Nix.hs | bsd-3-clause | 1,824 | 0 | 24 | 406 | 384 | 199 | 185 | 41 | 5 |
{-# LANGUAGE CPP, BangPatterns #-}
{-# OPTIONS_HADDOCK prune #-}
#if __GLASGOW_HASKELL__ >= 701
{-# LANGUAGE Trustworthy #-}
#endif
-- |
-- Module : Data.ByteString.Lazy.Char8
-- Copyright : (c) Don Stewart 2006-2008
-- (c) Duncan Coutts 2006-2011
-- License : BSD-style
--
-- Maintainer : don... | CloudI/CloudI | src/api/haskell/external/bytestring-0.10.10.0/Data/ByteString/Lazy/Char8.hs | mit | 34,496 | 0 | 19 | 10,098 | 5,288 | 3,011 | 2,277 | 376 | 9 |
module Settings.Builders.RunTest (runTestBuilderArgs, runTestGhcFlags) where
import Hadrian.Utilities
import System.Environment
import CommandLine
import Flavour
import Oracles.Setting (setting)
import Oracles.TestSettings
import Packages
import Settings.Builders.Common
getTestSetting :: TestSetting -> Expr String
g... | snowleopard/hadrian | src/Settings/Builders/RunTest.hs | mit | 10,054 | 0 | 17 | 2,734 | 2,174 | 1,093 | 1,081 | 150 | 7 |
-- | This provides what is needed for the output of 'hprotoc' to
-- compile. This and the Prelude will both be imported qualified as
-- P', the prime ensuring no name conflicts are possible.
module Text.ProtocolBuffers.Header
( append, emptyBS
, pack, fromMaybe, ap
, fromDistinctAscList, member
, throw... | timjb/protocol-buffers | Text/ProtocolBuffers/Header.hs | apache-2.0 | 2,296 | 0 | 7 | 275 | 529 | 354 | 175 | 51 | 1 |
{-# Language ViewPatterns, TypeOperators, KindSignatures, PolyKinds,
TypeInType, StandaloneDeriving, GADTs, RebindableSyntax,
RankNTypes, LambdaCase, PatternSynonyms, TypeApplications #-}
module T12698 where
import GHC.Types
import Prelude hiding ( fromInteger )
import Data.Type.Equality
imp... | olsner/ghc | testsuite/tests/patsyn/should_compile/T12698.hs | bsd-3-clause | 1,547 | 0 | 13 | 407 | 721 | 381 | 340 | -1 | -1 |
-- | Build instance tycons for the PData and PDatas type families.
--
-- TODO: the PData and PDatas cases are very similar.
-- We should be able to factor out the common parts.
module Vectorise.Generic.PData
( buildPDataTyCon
, buildPDatasTyCon )
where
import Vectorise.Monad
import Vectorise.Builtins
import V... | AlexanderPankiv/ghc | compiler/vectorise/Vectorise/Generic/PData.hs | bsd-3-clause | 6,590 | 0 | 14 | 2,256 | 1,336 | 677 | 659 | 123 | 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.