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 FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE Trustworthy #-}
-- | Abstraction layer for network functionality.
--
-- The intention is to
-- (i) separate the logic of the protocol from its binary encodin... | iphydf/hs-toxcore | src/Network/Tox/Network/Networked.hs | gpl-3.0 | 2,566 | 0 | 12 | 680 | 649 | 360 | 289 | 41 | 1 |
module Main where
import Carnap.GHCJS.Action.TruthTable
main :: IO ()
main = truthTableAction
| gleachkr/Carnap | Carnap-GHCJS/TruthTable/Main.hs | gpl-3.0 | 96 | 0 | 6 | 14 | 26 | 16 | 10 | 4 | 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="zh-CN">
<title>Forced Browse Add-On</title>
<maps>
<homeID>top</homeID>
<mapref locati... | veggiespam/zap-extensions | addOns/bruteforce/src/main/javahelp/org/zaproxy/zap/extension/bruteforce/resources/help_zh_CN/helpset_zh_CN.hs | apache-2.0 | 966 | 81 | 66 | 158 | 413 | 209 | 204 | -1 | -1 |
{-# LANGUAGE FlexibleInstances #-}
module BlockRamTest where
import CLaSH.Prelude
topEntity :: Signal (Unsigned 7)
-> Signal (Unsigned 7)
-> Signal (Bool)
-> Signal (Vec 4 Bit)
-> Signal (Vec 4 Bit)
topEntity = blockRam (replicate d128 (repeat high))
| christiaanb/clash-compiler | tests/shouldwork/Signal/BlockRamTest.hs | bsd-2-clause | 293 | 0 | 11 | 80 | 99 | 50 | 49 | -1 | -1 |
{-# LANGUAGE CPP #-}
import Text.LaTeX
import Text.LaTeX.Base.Parser
import Test.Tasty
import qualified Test.Tasty.QuickCheck as QC
#if !MIN_VERSION_parsec(3,1,9)
instance Eq ParseError where
_ == _ = undefined
#endif
main :: IO ()
main = defaultMain $ testGroup "HaTeX"
[ testGroup "LaTeX"
[ QC.testProperty... | dmcclean/HaTeX | test/Main.hs | bsd-3-clause | 724 | 0 | 17 | 202 | 253 | 137 | 116 | 19 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Annotations where
{-# ANN module (1 :: Int) #-}
{-# ANN module (1 :: Integer) #-}
{-# ANN module (1 :: Double) #-}
{-# ANN module $([| 1 :: Int |]) #-}
{-# ANN module "Hello" #-}
{-# ANN module (Just (1 :: Int)) #-}
{-# ANN module [1 :: Int, 2, 3] #-}
{-# ANN module ([1..10] ::... | mpickering/ghc-exactprint | tests/examples/ghc710/Annotations.hs | bsd-3-clause | 1,107 | 1 | 7 | 256 | 73 | 54 | 19 | 35 | 1 |
--
-- Copyright © 2013-2015 Anchor Systems, Pty Ltd and Others
--
-- The code in this file, and the program it is a part of, is
-- made available to you by its authors as open source software:
-- you can redistribute it and/or modify it under the terms of
-- the 3-clause BSD licence.
--
-- | Description: Check and fix... | anchor/git-vogue | src/git-vogue-stylish.hs | bsd-3-clause | 4,850 | 0 | 17 | 1,463 | 980 | 492 | 488 | 106 | 5 |
{-# LANGUAGE QuasiQuotes,OverlappingInstances #-}
import Control.Monad
import Criterion.Types
import Criterion.Measurement
import HLearn.Algebra hiding (Product)
import HLearn.Evaluation.RSquared
import HLearn.Models.Classifiers.Common hiding (Regression(..))
import HLearn.Models.Regression
import HLearn.Models.Regre... | iamkingmaker/HLearn | examples/old/runtimes/runtimes.hs | bsd-3-clause | 3,838 | 0 | 15 | 960 | 1,592 | 834 | 758 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Docker where
| dataember/docker-client | src/Docker.hs | bsd-3-clause | 56 | 0 | 2 | 8 | 5 | 4 | 1 | 2 | 0 |
module Fib where
-- | Calculate Fibonacci number of given 'Num'.
--
-- First let's set `n` to ten:
--
-- >>> let n = 10
--
-- And now calculate the 10th Fibonacci number:
--
-- >>> fib n
-- 55
--
-- >>> let x = 10
-- >>> x
-- 10
fib :: Integer -> Integer
fib 0 = 0
fib 1 = 1
fib n = fib (n - 1) + fib (n - 2)
| snoyberg/doctest-haskell | test/integration/testCombinedExample/Fib.hs | mit | 310 | 0 | 8 | 80 | 75 | 46 | 29 | 5 | 1 |
module CodeGen (
genModuleBody,
genTodoItems,
makeKnownSymbolsMap
) where
import Module (Module(..), Decl(..), DeclBody(..), isAttr)
import qualified Api
import qualified HaddockDocs (Span(..), formatParasFragment, formatSections,
formatParas, formatSpans, haddockSection)
import Hadd... | k0001/gtk2hs | tools/apiGen/src/CodeGen.hs | gpl-3.0 | 31,961 | 0 | 22 | 10,374 | 8,494 | 4,378 | 4,116 | 575 | 14 |
module Year
( Year
, toYear
, fromYear
)
where
import BasicPrelude ( Integer
, Show
, error
, otherwise
... | dogweather/nevada-revised-statutes-parser | src/Year.hs | bsd-3-clause | 960 | 0 | 8 | 523 | 188 | 108 | 80 | -1 | -1 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.GHC.IPI641
-- Copyright : (c) The University of Glasgow 2004
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
{- All rights reserved.
Redistribution and use in source a... | jwiegley/ghc-release | libraries/Cabal/cabal/Distribution/Simple/GHC/IPI641.hs | gpl-3.0 | 5,564 | 0 | 11 | 1,354 | 761 | 458 | 303 | 73 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.InstallPlan
-- Copyright : (c) Duncan Coutts 2008
-- License : BSD-like
--
-- Maintainer : duncan@community.haskell.org
-- Stability : provisional
-- Portability : portable
--
-- Packag... | Helkafen/cabal | cabal-install/Distribution/Client/InstallPlan.hs | bsd-3-clause | 29,290 | 0 | 18 | 6,564 | 5,212 | 2,806 | 2,406 | 416 | 8 |
<?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>ToDo-List</title>
<maps>
<homeID>todo</homeID>
<mapref location="map.jhm... | thc202/zap-extensions | addOns/todo/src/main/javahelp/help_ro_RO/helpset_ro_RO.hs | apache-2.0 | 955 | 77 | 67 | 155 | 408 | 207 | 201 | -1 | -1 |
module ListIn2 where
f :: [Int] -> Int
f [42,56] = case [11,2] of
[x,y] -> x
_ -> 1
| kmate/HaRe | old/testing/simplifyExpr/ListIn2.hs | bsd-3-clause | 105 | 0 | 8 | 41 | 58 | 34 | 24 | 5 | 2 |
suCC :: Int -> Int
suCC x = x + 1
isdivs :: Int -> Int -> Bool
isdivs n x = mod x n /= 0
--the_filter :: [Int] -> [Int]
--the_filter (n:ns) = filter (isdivs n) ns
the_filter :: [Int] -> [Int]
the_filter (n:ns) = f ns where
f [] = []
f (x:ns) | isdivs n x = (x:f ns)
f (_:ns) = f ns
primes :: [Int]
prim... | m-alvarez/jhc | examples/Primes.hs | mit | 490 | 0 | 10 | 124 | 210 | 109 | 101 | 13 | 3 |
{-
From: Kevin Hammond <kh>
To: partain
Subject: Nasty Overloading
Date: Wed, 23 Oct 91 16:19:46 BST
-}
module Main where
class Foo a where
o1 :: a -> a -> Bool
o2 :: a -> Int
-- o2 :: Int
-- Lennart: The type of method o2 does not contain the variable a
-- (and it must according to line ... | olsner/ghc | testsuite/tests/codeGen/should_run/cgrun013.hs | bsd-3-clause | 2,222 | 0 | 14 | 770 | 581 | 326 | 255 | 31 | 2 |
-- This test checks that the magic treatment of RULES
-- for 'seq' works right.
--
-- See Note [RULES for seq] in MkId for more details
module Main where
{-# NOINLINE f #-}
f x = not x
{-# RULES
"f/seq" forall n e. seq (f n) e = True
#-}
main = print (seq (f True) False)
| ryantm/ghc | testsuite/tests/simplCore/should_run/SeqRule.hs | bsd-3-clause | 287 | 0 | 9 | 73 | 43 | 25 | 18 | 6 | 1 |
{-# LANGUAGE PartialTypeSignatures #-}
module WildcardInTypeSynonymLHS where
type Foo _ = Int
| urbanslug/ghc | testsuite/tests/partial-sigs/should_fail/WildcardInTypeSynonymLHS.hs | bsd-3-clause | 95 | 0 | 4 | 13 | 12 | 9 | 3 | -1 | -1 |
-- !!! Repeated variable in instance predicate
module M where
instance Eq a => Eq (Either a a)
| urbanslug/ghc | testsuite/tests/module/mod41.hs | bsd-3-clause | 95 | 0 | 7 | 18 | 27 | 14 | 13 | 2 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-|
Module : Haste.GAPI.GPlus
Description : Google+ API bindings for haste-gapi
Copyright : (c) Jonathan Skårstedt, 2016
License : MIT
Maintainer : jonathan.skarstedt@gmail.com
Stability : experimental
Portability : Haste
Contains default function and result mappings fo... | nyson/haste-gapi | Haste/GAPI/GPlus.hs | mit | 3,552 | 0 | 11 | 837 | 505 | 282 | 223 | 39 | 2 |
{-# LANGUAGE NoMonomorphismRestriction #-}
import Graphics.Rendering.OpenGL.GL.CoordTrans ( Position(..), Size(..) )
import Graphics.Rendering.OpenGL.GL.StateVar ( ($=), ($=!), get )
import Graphics.UI.GLUT.Begin
import Graphics.UI.GLUT.Callbacks.Window
import Graphics.UI.GLUT.Callbacks.Global
import Graphics.UI.GLUT... | 5outh/Haskell-Graphics-Projects | graphics_test.hs | mit | 10,659 | 8 | 23 | 3,276 | 4,395 | 2,278 | 2,117 | 264 | 6 |
module Compiler.JIT where
import Control.Applicative
import Control.Monad.Except
import Compiler.Type.Pipeline
import Compiler.PreAST.Type
import LLVM.General
import qualified LLVM.General.AST as IR
import LLVM.General.Context
import LLVM.General.ExecutionEngine as EE
import Foreign.Ptr
foreign import ccall "dynam... | banacorn/mini-pascal | src/Compiler/JIT.hs | mit | 1,679 | 0 | 19 | 462 | 473 | 245 | 228 | 37 | 2 |
-- Multiply characters
-- http://www.codewars.com/kata/52e9aa89b5acdd26d3000127
module CWSpam where
spam :: Int -> String
spam i = take (3*i) (cycle "hue")
| gafiatulin/codewars | src/7 kyu/CWSpam.hs | mit | 158 | 0 | 7 | 22 | 41 | 23 | 18 | 3 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC... | input-output-hk/pos-haskell-prototype | chain/test/Test/Pos/Chain/Block/Arbitrary.hs | mit | 23,124 | 0 | 25 | 6,267 | 4,134 | 2,216 | 1,918 | -1 | -1 |
-----------------------------------------------------------------------------
-- |
-- Module : Database.Dblp
-- Description : Communication protocols for dblp
-- Maintainer : coskuacay@gmail.com
-- Stability : experimental
-----------------------------------------------------------------------------
module Data... | cacay/bibdb | src/Database/Dblp.hs | mit | 1,017 | 0 | 11 | 164 | 225 | 125 | 100 | -1 | -1 |
module GHCJS.DOM.FocusEvent (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/FocusEvent.hs | mit | 40 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
module Glucose.Parser where
import Control.Applicative hiding ((<**>))
import Control.Comonad
import Control.Lens hiding (traverse1)
import Data.Monoid
import Glucose.AST as AST
import Glucose.Error
import Glucose.Identifier as AST hiding (identifier)
import Glucose.Lexer.Location
import Glucose.Token as T... | sardonicpresence/glucose | src/Glucose/Parser.hs | mit | 2,857 | 0 | 13 | 568 | 1,137 | 595 | 542 | -1 | -1 |
{-|
- A Pythagorean triplet is a set of three natural numbers, a < b < c, for which,
-
- a2 + b2 = c2
- For example, 32 + 42 = 9 + 16 = 25 = 52.
-
- There exists exactly one Pythagorean triplet for which a + b + c = 1000.
- Find the product abc.
- -}
tripletProduct n = head $ take 1 [a*b*c | a <- [1..n-2], b <... | MakerBar/haskell-euler | 9/9.hs | mit | 390 | 0 | 13 | 98 | 115 | 60 | 55 | 1 | 1 |
module Main where
import Kernel
import Runtime
import Parser
import Control.Monad.Trans.State
run :: [Expression] -> IO Value
run expressions = do
let action = sequence (map lispEval expressions)
(result, _) <- runStateT action globalEnvironment
return (last result)
fromStr :: String -> IO Value
fromStr input ... | patrickgombert/Hisp | Main.hs | mit | 350 | 0 | 12 | 61 | 121 | 63 | 58 | 12 | 1 |
---------------------------------------------------------------
--
-- Module: Quark.Frontend.HSCurses
-- Author: Stefan Peterson
-- License: MIT License
--
-- Maintainer: Stefan Peterson (stefan.j.peterson@gmail.com)
-- Stability: Stable
-- Portability: Unknown
--
-- -----------------------------------... | sjpet/quark | src/Quark/Frontend/HSCurses.hs | mit | 15,703 | 0 | 15 | 5,336 | 4,566 | 2,311 | 2,255 | 343 | 35 |
{-# LANGUAGE DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-}
module Graph.Bisekt.Plain where
-- $Id$
import Graph.Bisekt.Data
import Graph.Util
import Autolib.Dot ( peng, Layout_Program (..) )
import Autolib.Graph.Adj ( adjazenz_matrix , schoen )
import Autolib.Graph.Ops ( unlinks )
import Autolib... | Erdwolf/autotool-bonn | src/Graph/Bisekt/Plain.hs | gpl-2.0 | 4,030 | 60 | 18 | 1,116 | 973 | 611 | 362 | 84 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Nirum.Constructs.Docs ( Docs (Docs)
, docsAnnotationName
, docsAnnotationParameter
, title
, toBlock
, toCode
... | dahlia/nirum | src/Nirum/Constructs/Docs.hs | gpl-3.0 | 2,195 | 0 | 12 | 758 | 462 | 258 | 204 | 46 | 2 |
{- Copyright 2013 Matthew Gordon.
This file is part of Gramophone.
Gramophone 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) any later v... | matthewscottgordon/gramophone | src/Gramophone/GUI/BrowseForFiles.hs | gpl-3.0 | 4,192 | 0 | 17 | 1,087 | 529 | 287 | 242 | 43 | 2 |
module Amoeba.View.Output.Types where
import Data.Word (Word16)
type ViewPointCoordinates = (Int, Int)
type UserViewPoint = ViewPointCoordinates
type ScreenPoint = (Word16, Word16)
data Screen = Screen Int Int Int
| graninas/The-Amoeba-World | src/Amoeba/View/Output/Types.hs | gpl-3.0 | 219 | 0 | 6 | 32 | 61 | 39 | 22 | 6 | 0 |
{-|
Module : Hypercube.Input
Description : Input handling
Copyright : (c) Jaro Reinders, 2017
License : GPL-3
Maintainer : noughtmare@openmailbox.org
This module contains all input handling code.
-}
module Hypercube.Input where
import Hypercube.Types
import Control.Monad.Trans.State
import Control.Monad... | noughtmare/hypercube | src/Hypercube/Input.hs | gpl-3.0 | 2,342 | 0 | 15 | 455 | 812 | 408 | 404 | -1 | -1 |
-- Copyright 2017 Keaton Bruce
--
-- This file is part of MatrixRedux.
--
-- MatrixRedux 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) any later vers... | Karce/MatrixRedux | MatrixRun.hs | gpl-3.0 | 1,154 | 0 | 13 | 205 | 79 | 49 | 30 | 6 | 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/Projects/GetXpnHost.hs | mpl-2.0 | 2,970 | 0 | 13 | 649 | 308 | 190 | 118 | 50 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
-- |
-- Module : Network.Google.AppsLicensing
-- Copyright : (c) 2015-2016 Brendan Hay
-- License : Mozill... | rueshyna/gogol | gogol-apps-licensing/gen/Network/Google/AppsLicensing.hs | mpl-2.0 | 3,348 | 0 | 10 | 610 | 278 | 209 | 69 | 51 | 0 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Engine
( Engine
, engineHandleEvent
, engineHandleKeyboardEvent
, withEngine
, embedGame
, loadGame
, saveGame
) where
import Control.Lens hiding (Context)
import Control.Monad.Reader.Class
import Control.Monad.State.Class
import ... | nitrix/lspace | legacy/Engine.hs | unlicense | 5,418 | 0 | 12 | 1,406 | 1,201 | 615 | 586 | -1 | -1 |
-- Copyright © 2014 Garrison Jensen
-- License
-- This code and text are dedicated to the public domain.
-- You can copy, modify, distribute and perform the work,
-- even for commercial purposes, all without asking permission.
module Parser(parseString, parseFile) where
import Text.ParserCombinators.Parsec
import Tex... | GarrisonJ/Nock | src/Parser.hs | unlicense | 1,401 | 0 | 11 | 295 | 402 | 200 | 202 | 47 | 2 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module ProjectM36.DataTypes.Interval where
import ProjectM36.AtomFunctionBody
import ProjectM36.Base
import ProjectM36.AtomType
import ProjectM36.DataTypes.Primitive
import ProjectM36.AtomFunctionError
import qualified Data.HashSet as HS
import qualified Data.Map as M
import Contro... | agentm/project-m36 | src/lib/ProjectM36/DataTypes/Interval.hs | unlicense | 6,648 | 0 | 18 | 2,287 | 1,472 | 751 | 721 | 127 | 14 |
------------------------------------------------------------------------------
-- Copyright 2012 Microsoft Corporation.
--
-- This is free software; you can redistribute it and/or modify it under the
-- terms of the Apache License, Version 2.0. A copy of the License can be
-- found in the file "license.txt" at the... | lpeterse/koka | src/Kind/Unify.hs | apache-2.0 | 3,445 | 0 | 13 | 961 | 949 | 493 | 456 | 69 | 4 |
-- Copyright (c) 2013-2015 PivotCloud, Inc.
--
-- Aws.Kinesis.Client.Consumer.Internal.SavedStreamState
--
-- Please feel free to contact us at licensing@pivotmail.com with any
-- contributions, additions, or other feedback; we would love to hear from
-- you.
--
-- Licensed under the Apache License, Version 2.0 (the "L... | alephcloud/hs-aws-kinesis-client | src/Aws/Kinesis/Client/Consumer/Internal/SavedStreamState.hs | apache-2.0 | 2,195 | 0 | 18 | 353 | 342 | 200 | 142 | 30 | 1 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeApplications #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-- | Protocol/versioning related communication types.
module Pos.Infra.Communication.Types.Protocol
( checkInSpecs
, Conversation... | input-output-hk/cardano-sl | infra/src/Pos/Infra/Communication/Types/Protocol.hs | apache-2.0 | 13,730 | 0 | 17 | 3,645 | 3,201 | 1,777 | 1,424 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE RecursiveDo #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections... | gcross/LogicGrowsOnTrees | LogicGrowsOnTrees/tests/test-Worker.hs | bsd-2-clause | 20,674 | 0 | 31 | 7,858 | 3,243 | 1,585 | 1,658 | 316 | 15 |
{-# LANGUAGE BangPatterns, CPP, ForeignFunctionInterface, GeneralizedNewtypeDeriving, MagicHash,
UnliftedFFITypes #-}
#if __GLASGOW_HASKELL__ >= 702
{-# LANGUAGE Trustworthy #-}
#endif
-- |
-- Module : Data.Text.Encoding
-- Copyright : (c) 2009, 2010, 2011 Bryan O'Sullivan,
-- (c) 2009 Duncan C... | text-utf8/text | Data/Text/Encoding.hs | bsd-2-clause | 17,775 | 4 | 39 | 4,530 | 3,181 | 1,728 | 1,453 | 241 | 4 |
module Internal.Types
(
Session(..),
TorrentSt(..),
Torrent(..),
Activity(..),
LogLevel(..),
WhiteoutException(..),
PieceNum
) where
import Control.Concurrent
import Control.Concurrent.STM
import Control.Exception
import Data.Array.IArray (Array)
import Data.ByteString (ByteString)
... | enolan/whiteout | src/Internal/Types.hs | bsd-3-clause | 3,227 | 0 | 12 | 750 | 514 | 322 | 192 | 62 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module HttpServer (run) where
import Web.Spock
import Web.Spock.Config
import Network.Wai.Middleware.Static
run :: Int -> IO ()
run port =
do
spockCfg <- defaultSpockCfg () PCNoDatabase ()
runSpock port (spock spockCfg app)
app :: SpockM () () () ()
app = middlew... | mat-hek/jump | src/HttpServer.hs | bsd-3-clause | 404 | 0 | 9 | 83 | 126 | 67 | 59 | 12 | 1 |
module Main where
import Ivory.Tower.Config
import Ivory.Tower.Options
import Ivory.OS.FreeRTOS.Tower.STM32
import Tower.AADL
import Tower.AADL.Build.Common
import Tower.AADL.Build.EChronos
import BSP.Tests.Platforms
import BSP.Tests.CAN.TestApp (app)
main :: IO ()
main = compileTowerAADLForPlatform f p $
... | GaloisInc/ivory-tower-stm32 | ivory-bsp-tests/tests/CANAADLTest.hs | bsd-3-clause | 793 | 0 | 10 | 202 | 189 | 109 | 80 | 20 | 1 |
module Colorimetry.Illuminant.BlackBody
( blackBody
, idealizedD65
) where
-- | A perfect black body emitter. Gives the energy for a given temperature blackbody emitter
-- in power per m^2 of area per nm of wavelength using Planck's energy distribution formula.
-- given the temperature of the emitter in degrees ... | ekmett/colorimetry | Colorimetry/Illuminant/BlackBody.hs | bsd-3-clause | 666 | 0 | 12 | 123 | 132 | 75 | 57 | 9 | 1 |
module Integers where
import Data.Char (ord)
import Text.Trifecta
parseDigit :: Parser Char
parseDigit = oneOf ['0'..'9'] <?> "Digit"
base10Integer :: Parser Integer
base10Integer = do
chars <- some parseDigit
let digits = map (toInteger . (\x -> x - 48) . ord) chars
return . snd $
... | vasily-kirichenko/haskell-book | src/Parsing/Integers.hs | bsd-3-clause | 614 | 0 | 16 | 169 | 241 | 124 | 117 | 22 | 2 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
{-# LANG... | sjakobi/stack | src/Stack/Build/ConstructPlan.hs | bsd-3-clause | 30,000 | 0 | 31 | 10,750 | 7,033 | 3,529 | 3,504 | 613 | 11 |
{-# LANGUAGE OverloadedStrings #-}
module DictCC.Serialize (handlePage) where
import Control.Applicative ((<$>), (<*>))
import Control.Arrow
import Control.Monad
import Data.Bool
import qualified Data.Text as T
import DictCC.Util (slice)
import ... | JustusAdam/dictcc | lib/DictCC/Serialize.hs | bsd-3-clause | 1,675 | 0 | 23 | 499 | 454 | 248 | 206 | -1 | -1 |
-- |
-- Module : Crypto.Number.Serialize
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : Good
--
-- fast serialization primitives for integer
{-# LANGUAGE BangPatterns #-}
module Crypto.Number.Serialize
( i2osp
, os2ip
, i2o... | nomeata/cryptonite | Crypto/Number/Serialize.hs | bsd-3-clause | 1,970 | 0 | 12 | 428 | 427 | 228 | 199 | 25 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
import Database.Curry
import Database.Redis
import Options.Applicative
-- import System.Remote.Monitoring (forkServer)
import Filesystem.Path.CurrentOS (decodeString)
data Option = Option
{ optPor... | tanakh/CurryDB | redis/main.hs | bsd-3-clause | 1,114 | 0 | 13 | 318 | 287 | 149 | 138 | 31 | 1 |
-- |
-- Module : StreamDOps
-- Copyright : (c) 2018 Harendra Kumar
--
-- License : BSD3
-- Maintainer : streamly@composewell.com
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
module StreamDOps where
import Control.Monad (when)
import Data.Maybe (isJust)
import Prelude
(Mo... | harendra-kumar/asyncly | benchmark/StreamDOps.hs | bsd-3-clause | 11,067 | 0 | 12 | 2,393 | 3,473 | 1,834 | 1,639 | 266 | 5 |
module Main where
import Graphics.UI.SDL
import Control.Monad
import Control.Lens
import Control.Monad.Trans.Class
import Control.Monad.IO.Class
import Control.Monad.State.Class
import Rendering
import Environment
import Ship
import Config
main :: IO ()
main = withInit [InitEverything] $ do
screen <- setVideoMode ... | alexisVallet/haskell-shmup | Main.hs | bsd-3-clause | 753 | 0 | 23 | 161 | 222 | 112 | 110 | 26 | 1 |
module Main where
import Perceptron
main :: IO ()
main = do
putStrLn "AND"
putStrLn $ show $ p_and $ v00
putStrLn $ show $ p_and $ v01
putStrLn $ show $ p_and $ v10
putStrLn $ show $ p_and $ v11
putStrLn "NAND"
putStrLn $ show $ p_nand $ v00
putStrLn $ show $ p_nand $ v01
putStrLn $ show $ p_nand $... | chupaaaaaaan/nn-with-haskell | app/Main02.hs | bsd-3-clause | 646 | 0 | 9 | 178 | 286 | 133 | 153 | 24 | 1 |
{-# LANGUAGE QuasiQuotes #-}
import LiquidHaskell
import Language.Haskell.Liquid.Prelude
[lq| include <len.hquals> |]
[lq| measure rlen :: [a] -> Int
rlen ([]) = {v | v = 0}
rlen (y:ys) = {v | v = (1 + rlen(ys))}
|]
[lq| foo :: a -> {v:[b] | rlen(v) = 0} |]
foo x = []
[lq| mylen :: xs:[a] -> {v:In... | spinda/liquidhaskell | tests/gsoc15/unknown/pos/meas8.hs | bsd-3-clause | 547 | 0 | 7 | 155 | 150 | 86 | 64 | 14 | 1 |
module Blog.Widgets.StreamOfConsciousness.Twitter ( start_twitter_tweets, start_twitter_replies ) where
import qualified Blog.Widgets.StreamOfConsciousness.Thought as T
import Blog.Widgets.StreamOfConsciousness.Controller ( SoCController, Worker ( .. ), commit )
import Data.List (isPrefixOf)
import Text.ParserCombina... | prb/perpubplat | src/Blog/Widgets/StreamOfConsciousness/Twitter.hs | bsd-3-clause | 6,387 | 0 | 15 | 1,712 | 2,011 | 1,050 | 961 | 125 | 3 |
module Camera(
-- * Primitives
yaw,yawGoal,pitch,pitchGoal,scl,sclGoal,center,centerGoal,
-- * Utilities
zoomIn,zoomOut,
cameraLeft,cameraRight,cameraUp,cameraDown
)
where
import Graphics
import Utils
-- |The horizontal angle
yaw = mkRef (0::GLfloat)
-- |The horizontal angle goal
yawGoal = mkRef (... | lih/Epsilon | src/Camera.hs | bsd-3-clause | 929 | 1 | 10 | 150 | 309 | 182 | 127 | 19 | 1 |
{-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable #-}
module Language.Loop.Syntax where
import Data.Foldable
import Data.Traversable
data Stmt reg = Inc reg
| Dec reg
| Clr reg
| Output reg
| Input reg
| While reg [Stmt reg]
... | gergoerdi/brainfuck | language-registermachine/src/Language/Loop/Syntax.hs | bsd-3-clause | 371 | 0 | 8 | 127 | 80 | 47 | 33 | 11 | 0 |
module Logo.TokenParser (tokenize) where
import Logo.Types
import Control.Applicative ((<|>), (<$>), many)
import Text.ParserCombinators.Parsec (
char, letter, digit, alphaNum, string, space,
parse, many1, skipMany, notFollowedBy, noneOf, try, (<?>), eof,
ParseError, Parser)
import Text.ParserCombinators.Pars... | deepakjois/hs-logo | src/Logo/TokenParser.hs | bsd-3-clause | 2,716 | 0 | 25 | 632 | 1,031 | 499 | 532 | 106 | 2 |
module Language.Css.Values
( module X
, CssBackgroundValue (..)
, CssBGAttachment (..)
, CssBGPosition (..)
, CssBGPositionFloatX (..)
, CssBGPositionFloatY (..)
, CssBGPositionValue (..)
, CssBorder (..)
, CssBorderStyle (..)
, CssBorderWidth (..)
, CssBreak (..)
, CssClear (..)
, CssCollapse... | athanclark/css-grammar | src/Language/Css/Values.hs | bsd-3-clause | 7,625 | 0 | 10 | 1,597 | 1,958 | 1,178 | 780 | 328 | 0 |
{-# Language TypeSynonymInstances, FlexibleInstances #-}
-- | UIs for live performances
module Csound.Air.Live (
-- * Mixer
mixer, hmixer, mixMono,
-- * Effects
FxFun, FxUI(..), fxBox, uiBox,
fxColor, fxVer, fxHor, fxSca, fxApp,
-- * Instrument choosers
hinstrChooser, vinstrChooser,
hm... | silky/csound-expression | src/Csound/Air/Live.hs | bsd-3-clause | 15,866 | 0 | 17 | 3,452 | 4,956 | 2,630 | 2,326 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude
, CPP
, TemplateHaskell
, FlexibleInstances
, TypeSynonymInstances
, TypeFamilies
, PatternGuards
, DeriveDataTypeable
, TypeOperators
#-}
{- Refactoring plan:
* need function to compute a (defa... | timsears/species | Math/Combinatorics/Species/TH.hs | bsd-3-clause | 19,648 | 0 | 18 | 5,244 | 4,110 | 2,245 | 1,865 | 231 | 21 |
module Main where
import Data.Binary
import qualified Data.ByteString.Lazy as BL
import Control.Monad (forM_, unless)
import Control.Monad.IO.Class (MonadIO(..))
import Dxedrine.Blocks
import Dxedrine.Model
import Dxedrine.Parsing
parseDxUnions :: MonadIO m => m (ParseResult DxUnion)
parseDxUnions = do
contents <- ... | ejconlon/dxedrine | app/Main.hs | bsd-3-clause | 789 | 0 | 16 | 157 | 280 | 142 | 138 | 26 | 2 |
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Setup
-- Copyright : (c) David Himmelstrup 2005
-- License : BSD-like
--
-- Maintainer : lemmih@gmail.com
-- Stability : provisional
-- Portability : portable
--
--... | kosmikus/cabal | cabal-install/Distribution/Client/Setup.hs | bsd-3-clause | 85,914 | 0 | 37 | 23,979 | 17,740 | 10,005 | 7,735 | 1,668 | 5 |
{-# LANGUAGE TemplateHaskell #-}
module Robots2.Quiz where
import Inter.Types
import Autolib.ToDoc
import Autolib.Reader
import Data.Typeable
data RC = RC { width :: Integer -- ^ feld geht von (-w.-w) .. (w,w)
, num_robots :: Int
, num_targets :: Int
, at_least :: Int -- ^ req length of solutio... | florianpilz/autotool | src/Robots2/Quiz.hs | gpl-2.0 | 622 | 4 | 9 | 156 | 148 | 93 | 55 | 19 | 1 |
{-| Module : LexerMessage
License : GPL
Maintainer : helium@cs.uu.nl
Stability : experimental
Portability : portable
-}
module Helium.Parser.LexerMessage
( LexerError(..)
, LexerErrorInfo(..)
, LexerWarning(..)
, LexerWarningInfo(..)
, keepOneTabWarning
, sourc... | roberth/uu-helium | src/Helium/Parser/LexerMessage.hs | gpl-3.0 | 5,745 | 0 | 15 | 1,565 | 1,230 | 658 | 572 | 114 | 17 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | fmapfmapfmap/amazonka | amazonka-route53-domains/gen/Network/AWS/Route53Domains/RegisterDomain.hs | mpl-2.0 | 12,291 | 0 | 14 | 2,533 | 1,463 | 911 | 552 | 160 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/StopInstance.hs | mpl-2.0 | 3,500 | 0 | 9 | 711 | 363 | 224 | 139 | 48 | 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="en-GB">
<title>Report Alert Generator</title>
<maps>
<homeID>alertReport</homeID... | veggiespam/zap-extensions | addOns/alertReport/src/main/javahelp/help/helpset.hs | apache-2.0 | 988 | 85 | 50 | 170 | 403 | 214 | 189 | -1 | -1 |
--
-- 23.TimeCPU.hs
-- R_Functional_Programming
--
-- Created by RocKK on 2/13/14.
-- Copyright (c) 2014 RocKK.
-- All rights reserved.
--
-- Redistribution and use in source and binary forms are permitted
-- provided that the above copyright notice and this paragraph are
-- duplicated in all such forms and tha... | RocKK-MD/R_Functional_Programming | Sources/23.TimeCPU.hs | bsd-2-clause | 930 | 0 | 7 | 168 | 43 | 30 | 13 | 4 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Server.Util.ServeTarball
-- Copyright : (c) 2008 David Himmelstrup
-- (c) 2009 Antoine Latter
-- License : BSD-like
--
-- Maintainer : duncan@haskell.org
-- Stability : provision... | haskell-infra/hackage-server | Distribution/Server/Util/ServeTarball.hs | bsd-3-clause | 5,625 | 0 | 21 | 1,605 | 1,394 | 733 | 661 | 112 | 5 |
module Distribution.Simple.HaskellSuite where
import Control.Monad
import Data.Maybe
import Data.Version
import qualified Data.Map as M (empty)
import Distribution.Simple.Program
import Distribution.Simple.Compiler as Compiler
import Distribution.Simple.Utils
import Distribution.Simple.BuildPaths
import Distribution.... | trskop/cabal | Cabal/Distribution/Simple/HaskellSuite.hs | bsd-3-clause | 8,301 | 0 | 21 | 1,863 | 2,010 | 1,045 | 965 | 175 | 4 |
module NPDA.Nachfolger
-- $Id$
( nachfolger
, folgekonfigurationen -- brauchen wir nicht?
)
where
import NPDA.Type
import NPDA.Konfiguration
import Autolib.Schichten
import Autolib.Set
nachfolger :: NPDAC x y z
=> NPDA x y z -> Konfiguration x y z -> [ Konfiguration x y z ]
nachfolger a k = concat $ map ... | Erdwolf/autotool-bonn | src/NPDA/Nachfolger.hs | gpl-2.0 | 1,534 | 9 | 18 | 451 | 561 | 290 | 271 | 43 | 3 |
-----------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.Shaders.ProgramBinaries
-- Copyright : (c) Sven Panne 2006-2013
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : por... | hesiod/OpenGL | src/Graphics/Rendering/OpenGL/GL/Shaders/ProgramBinaries.hs | bsd-3-clause | 2,361 | 0 | 14 | 324 | 481 | 270 | 211 | 36 | 1 |
a@(b, c) +++ x = (b + x, c+x, a)
main = (4, 5) +++ 6
| roberth/uu-helium | test/simple/parser/AsPatternBinding3.hs | gpl-3.0 | 56 | 0 | 7 | 19 | 53 | 30 | 23 | 2 | 1 |
--
-- Copyright (c) 2011 Citrix Systems, Inc.
--
-- 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) any later version.
--
-- This progra... | crogers1/manager | disksync/Tools/File.hs | gpl-2.0 | 1,593 | 0 | 10 | 369 | 229 | 127 | 102 | 21 | 2 |
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE TypeFamilies #-}
module T17442 where
import Control.Monad
import GHC.Arr (Ix(..))
import GHC.Base (getTag)
import GHC.Exts
data family D
data instance D = MkD
deriving (Eq, Ord, Show)
instance Ix D where
range (a, b) =
let a# = getTag a
b# = getTag b
in map... | sdiehl/ghc | testsuite/tests/cmm/should_compile/T17442.hs | bsd-3-clause | 1,148 | 0 | 12 | 353 | 582 | 307 | 275 | 37 | 1 |
{-# LANGUAGE TemplateHaskell, OverloadedStrings #-}
module WaiAppEmbeddedTest (embSpec) where
import Codec.Compression.GZip (compress)
import EmbeddedTestEntries
import Network.Wai
import Network.Wai.Application.Static (staticApp)
import Network.Wai.Test
import Test.Hspec
import WaiAppStatic.Storage.Embedded
import Wa... | rgrinberg/wai | wai-app-static/test/WaiAppEmbeddedTest.hs | mit | 3,337 | 0 | 19 | 1,030 | 807 | 360 | 447 | 74 | 1 |
{-
This module provides type inference for the base syntax.
Here, you will find only the knot-tying top-level definitions.
-}
module TiBase(Typing,Scheme{-,GetSigs(..),DeclInfo(..)-}) where
import Syntax hiding (extend)
import SubstituteBase()
import NameMapsBase() -- instance AccNames i (HsDeclI i)
import TI
--import ... | kmate/HaRe | old/tools/base/TI/TiBase.hs | bsd-3-clause | 3,210 | 0 | 12 | 668 | 980 | 514 | 466 | -1 | -1 |
module Renaming.C7(myFringe) where
import Renaming.D7
myFringe:: Tree a -> [a]
myFringe (Leaf x ) = [x]
myFringe (Branch left right) = myFringe left ++ fringe right
| kmate/HaRe | test/testdata/Renaming/C7.hs | bsd-3-clause | 173 | 0 | 7 | 34 | 74 | 39 | 35 | 5 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE ViewPatterns #-}
-- | Parsing command line targets
module Stack.Build.Target
( --... | mathhun/stack | src/Stack/Build/Target.hs | bsd-3-clause | 13,119 | 0 | 21 | 4,824 | 3,187 | 1,683 | 1,504 | 284 | 12 |
{-# LANGUAGE TypeFamilies #-}
module T5417a where
import Data.Kind (Type)
class C1 a where
data F a :: Type
| sdiehl/ghc | testsuite/tests/ghci/scripts/T5417a.hs | bsd-3-clause | 118 | 0 | 6 | 29 | 31 | 19 | 12 | -1 | -1 |
module Test22 where
f = let x = do let y = 45
Just y
in x
| kmate/HaRe | old/testing/refacSlicing/Test22AST.hs | bsd-3-clause | 98 | 0 | 13 | 57 | 35 | 17 | 18 | 4 | 1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE AutoDeriveTypeable #-}
{-# LANGUAGE StandaloneDeriving #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Complex
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries... | jtojnar/haste-compiler | libraries/ghc-7.10/base/Data/Complex.hs | bsd-3-clause | 7,100 | 2 | 14 | 2,464 | 2,138 | 1,130 | 1,008 | 124 | 1 |
module Amount where
import Control.Monad
import Control.Applicative
import Data.Bits
import Data.Word
import Data.Binary (Binary(..), Get, putWord8)
import Data.Binary.Get (getLazyByteString)
import Data.Base58Address (RippleAddress)
import Control.Error (readMay)
import qualified Data.ByteString.Lazy as LZ
import qua... | singpolyma/localripple | Amount.hs | isc | 4,344 | 42 | 18 | 868 | 1,938 | 1,013 | 925 | -1 | -1 |
import Pitch.Deck
import Pitch.Card
import Pitch.Game
import Pitch.Network
import Pitch.Players
import System.Random
import Control.Monad.State
import Control.Monad
import Control.Concurrent
import System.IO
import Network
main = do
gen <- getStdGen
(netPlayer1, g') <- mkNetworkPlayer gen "net1"
(netPlayer2, g'... | benweitzman/Pitch | src/Pitch.hs | mit | 527 | 1 | 12 | 77 | 161 | 84 | 77 | 18 | 1 |
module GHCJS.DOM.SQLStatementErrorCallback (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/SQLStatementErrorCallback.hs | mit | 55 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
#!/usr/bin/env runhaskell
-- Usage: ./Haskeleton.hs New.Module
module Haskeleton (main) where
import Data.List (groupBy, isInfixOf)
import Data.Monoid ((<>))
import System.Directory (createDirectoryIfMissing)
import System.Environment (getArgs)
import System.FilePath (joinPath, takeDirectory, (<.>))
main :: IO ()
ma... | MarcoSero/gruber | Haskeleton.hs | mit | 4,056 | 0 | 12 | 854 | 1,220 | 642 | 578 | 115 | 2 |
-- Get initials from person name
-- https://www.codewars.com/kata/57b56af6b69bfcffb80000d7
module Initials where
toInitials :: String -> String
toInitials = unwords . map ((: ".") . head) . words
| gafiatulin/codewars | src/7 kyu/Initials.hs | mit | 199 | 0 | 10 | 30 | 42 | 25 | 17 | 3 | 1 |
-- | Implementation of an execution environment that uses /docker/.
module B9.Docker
( Docker (..),
)
where
import B9.B9Config
( dockerConfigs,
getB9Config,
)
import B9.B9Config.Docker as X
import B9.Container
import B9.DiskImages
import B9.ShellScript
import Control.Lens (view)
newtype Docker = Docker Do... | sheyll/b9-vm-image-builder | src/lib/B9/Docker.hs | mit | 1,903 | 0 | 11 | 574 | 187 | 119 | 68 | 19 | 0 |
module Kd2nTree where
class Point p where
sel :: Int -> p -> Double
dim :: p -> Int
child :: p -> p -> [Int] -> Int
child e1 e2 coords = value2 $ zipWith (>) coordse1 coordse2
where (coordse1, coordse2) = (map (sel' e1) coords, map (sel' e2) coords)
sel' = ... | albertsgrc/practica-lp-kd2ntrees | Kd2nTree.hs | mit | 4,858 | 1 | 13 | 1,438 | 2,233 | 1,148 | 1,085 | 90 | 2 |
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE FlexibleInstances #-}
{-# CFILES test.c xgboost_wrapper.cpp #-}
import Xgboost
import Xgboost.Foreign
import System.IO.Unsafe
import Foreign.C
import Foreign.Storable
import Foreign.Ptr
main :: IO ()
main = do
check_trivial
--check_xgboost_read
-- Stolen: h... | robertzk/xgboost.hs | tests/Test.hs | mit | 1,074 | 0 | 8 | 196 | 131 | 77 | 54 | 16 | 2 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE Rank2Types #-}
module Graphics.Badge.Barrier.Internal
( BadgeConfig(..)
, Badge(..)
, makeBadge
, Lens'
, HasLeftColor(..)
, HasRightColor(..)
) where
import Language.Haskell.TH
import Control.Arrow(second, (***))
import Text.Blaze.Svg11... | philopon/barrier | src/Graphics/Badge/Barrier/Internal.hs | mit | 1,515 | 0 | 19 | 369 | 567 | 313 | 254 | 43 | 1 |
{-|
Description : Nix-relevant interfaces to NaCl signatures.
-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module System.Nix.Internal.Signature where
import Data.ByteString (ByteString)
import qualified Data.ByteString as BS
import Data.Coerce (coerce)
import Crypto.Saltine.Core.Sign (PublicKey)
import Crypto.Saltin... | shlevy/hnix-store | hnix-store-core/src/System/Nix/Internal/Signature.hs | mit | 901 | 0 | 11 | 146 | 186 | 112 | 74 | 18 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.