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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
module GB2.Color
(
Color,
Image,
color0,
readColor,
image2ppm -- dump and image to disk
)
where
import GB2.Geometry
-- Define what is an image and what is a color
-- Input / Output
type Color = Vector
-- The pixels are stored in a flat array of width * height
type Image = (Int, Int, [Color]) -- W... | gbataille/halray | src/GB2/Color.hs | mit | 1,314 | 0 | 11 | 281 | 362 | 196 | 166 | 28 | 1 |
module Parse
( Parse.parse
) where
import Data.Char (toUpper)
import Text.ParserCombinators.Parsec
import Types
parseNumber = do sign <- option "" (string "-")
number <- many1 digit
decimal <- option "0" (string "." >> many1 digit)
return $ Number (rea... | dstruthers/Agate_old | Parse.hs | mit | 1,695 | 0 | 14 | 680 | 505 | 238 | 267 | 42 | 3 |
module TestEnumerator where
import Data.AEq
import qualified Data.Vector as V
import Numeric.Log
import Control.Monad.Bayes.Enumerator
import Control.Monad.Bayes.Class
import Sprinkler
unnorm :: MonadSample m => m Int
unnorm = categorical $ V.fromList [0.5,0.8]
passed1 :: Bool
passed1 = (exp . ln) (evidence unnorm)... | adscib/monad-bayes | test/TestEnumerator.hs | mit | 712 | 0 | 13 | 121 | 302 | 169 | 133 | 23 | 1 |
module Sudoku.Strategy.HiddenPairs where
import Data.Char
import Data.List
import Prelude
import Sudoku
import Sudoku.Strategy
-- ...
| thomasbrus/sudoku-solver | src/Sudoku/Strategy/HiddenPairs.hs | mit | 136 | 0 | 4 | 17 | 29 | 19 | 10 | 6 | 0 |
module ParsecExample
( parsePositionalFile
) where
import Text.ParserCombinators.Parsec
import qualified Text.ParserCombinators.Parsec.Token as P
import Text.ParserCombinators.Parsec.Language
data Register = Register
{ registerUO :: String
, registerUGR :: String
} deriving Show
registerParser :: Parser Regis... | hbobenicio/haskell-examples | parsec-example/src/ParsecExample.hs | mit | 965 | 0 | 11 | 196 | 242 | 127 | 115 | 32 | 1 |
import Control.Concurrent
import Control.Exception
import System.Directory
import System.Environment
import System.Exit
import System.IO
import qualified Grid as Grid
clearScreen :: IO ()
clearScreen = putStrLn $ take 50 $ repeat '\n'
mainLoop :: Grid.Grid -> IO ()
mainLoop g = do
clearScreen
let ng = Grid.n... | vycasas/jinsei.no.game | src/Main.hs | mit | 1,997 | 0 | 18 | 778 | 885 | 501 | 384 | 64 | 3 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE InstanceSigs #-}
module Course.Comonad
(
Comonad(..)
) where
import Course.Core
import Course.Extend
import Course.Id
-- | All instances of the `Comonad` type-class must satisfy two laws. These
-- laws are not checked by the compi... | harrisi/on-being-better | list-expansion/Haskell/course/src/Course/Comonad.hs | cc0-1.0 | 944 | 0 | 8 | 216 | 150 | 89 | 61 | 26 | 1 |
module Palindrom.Plain where
-- $Id$
import Inter.Types
import Inter.Quiz
import Autolib.ToDoc
import Autolib.Hash
import Autolib.Util.Seed
import qualified Challenger as C
import Data.Typeable
import Autolib.Reporter
data Palindrom = Palindrom deriving ( Eq, Ord, Show, Read, Typeable )
instance OrderScore Palind... | florianpilz/autotool | src/Palindrom/Plain.hs | gpl-2.0 | 1,375 | 6 | 14 | 384 | 418 | 209 | 209 | -1 | -1 |
-- xmonad: Personal module: Binding Keys
-- Author: Simon L. J. Robin | https://sljrobin.org
--------------------------------------------------------------------------------
module Bindings_Keys where
--------------------------------------------------------------------------------
-- * `Appearance` ... | sljrobin/dotfiles | xmonad/.xmonad/lib/Bindings_Keys.hs | gpl-2.0 | 15,144 | 0 | 15 | 3,990 | 1,775 | 1,080 | 695 | 125 | 1 |
module Main where
import SAT.Mios (CNFDescription (..), solveSAT)
-- | a sample CNF
clauses :: [[Int]]
clauses =
[
[ 1, 2]
, [ 1, 3]
, [-1, -2]
, [1, -2, 3]
, [-3]
]
-- | a property holder
desc :: CNFDescription
desc = CNFDescription -- :: Int -> Int -> Maybe String -> CNFDescription
... | shnarazk/mios | app/sample.hs | gpl-3.0 | 713 | 0 | 10 | 227 | 186 | 109 | 77 | 19 | 2 |
module Documentator.DataDeclAnalysis where
typesExtractor :: Extractor [Located Type]
typesExtractor = map getDecl . filter isDecl . typeSignaturesExtractor
where
getType (TypeSig _ _ t) = t | meditans/documentator | src/Documentator/DataDeclAnalysis.hs | gpl-3.0 | 198 | 0 | 9 | 32 | 59 | 30 | 29 | 4 | 1 |
--------------------------------------------------------------------------------
-- This file is part of diplomarbeit ("Diplomarbeit Johannes Weiß"). --
-- --
-- diplomarbeit is free software: you can redistribute it and/or modify ... | weissi/diplomarbeit | lib/Data/RAE/Types.hs | gpl-3.0 | 6,894 | 0 | 15 | 2,169 | 1,355 | 770 | 585 | 107 | 2 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE GADT... | tlaitinen/receipts | backend/Handler/DB/RouteFilesFile.hs | gpl-3.0 | 10,996 | 0 | 24 | 3,849 | 2,960 | 1,562 | 1,398 | -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/Data/Color.hs | gpl-3.0 | 1,364 | 0 | 12 | 308 | 266 | 146 | 120 | 27 | 1 |
module Persist.Types where
import qualified Data.Text as T
import qualified Data.Map.Strict as M
import Data.UUID.Types (UUID)
type EmailIdMap = M.Map T.Text UUID
| mkawalec/email | src/Persist/Types.hs | gpl-3.0 | 165 | 0 | 6 | 24 | 49 | 32 | 17 | 5 | 0 |
module InterpRuntime
(InterpRuntimeType,InterpRuntimeFunc(..),InterpRuntimeValue,
newRuntimeValue)
where
import Data.Bits(testBit,setBit)
import Data.Char(chr,ord)
import System.IO(isEOF)
import Memory(Memory)
import Value
(Value(..),Data,
unrefValue,valueSetBit,valueBit,runtimeValue,updateRuntimeVa... | qpliu/esolang | blo/hs/InterpRuntime.hs | gpl-3.0 | 4,726 | 0 | 19 | 1,273 | 1,642 | 850 | 792 | 98 | 3 |
{-# LANGUAGE TupleSections, OverloadedStrings #-}
module Handler.ClientsCsv where
import Yesod.Auth
import Import hiding (isNothing)
import Database.Persist.Sql
import Database.Esqueleto
import System.FilePath.Posix
import qualified Data.List as L
import Data.Double.Conversion.Text
import qualified Data.ByteString.Lazy... | tlaitinen/sms | backend/Handler/ClientsCsv.hs | gpl-3.0 | 1,961 | 0 | 16 | 500 | 514 | 284 | 230 | 50 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module ZimServerSpec where
import Test.Hspec
import Test.Hspec.Wai
import Network.Wai (Application)
import Web.Scotty (scottyApp)
import ZimServer
testFile :: FilePath
testFile = "test/wikipedia_en_ray_charles_2015-06.zim"
app :: IO Application
app = scottyApp $ zimServerApp tes... | robbinch/zim-server | test/ZimServerSpec.hs | gpl-3.0 | 615 | 0 | 20 | 119 | 164 | 88 | 76 | 19 | 1 |
{-
oso2pdf --- Better conversion of Oxford Scholarship Online material to PDF
Copyright (C) 2015 Sean Whitton
This file is part of oso2pdf.
oso2pdf 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 ... | spwhitton/oso2pdf | src/oso2pdf.hs | gpl-3.0 | 3,978 | 0 | 16 | 1,282 | 834 | 437 | 397 | 60 | 1 |
module Paths_yanker where
getDataFileName :: FilePath -> IO FilePath
getDataFileName = return
| wetneb/yanker | .ghci-only/Paths_yanker.hs | gpl-3.0 | 96 | 0 | 6 | 14 | 21 | 12 | 9 | 3 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-vision/gen/Network/Google/Resource/Vision/Projects/Files/Annotate.hs | mpl-2.0 | 6,433 | 0 | 17 | 1,428 | 797 | 471 | 326 | 119 | 1 |
module Language.VHDL.Parser.Monad
( Parser
, ParseState
, pushBlockName
, popBlockName
, newParseState
, quotesEnabled
, identToLower
) where
import Control.Monad.State
import Data.Char (toLower)
--import Data.Text (Text)
import qualified Data.Text ... | truls/language-vhdl-quote | src/Language/VHDL/Parser/Monad.hs | mpl-2.0 | 1,389 | 0 | 13 | 368 | 421 | 227 | 194 | 39 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-genomics/gen/Network/Google/Resource/Genomics/AnnotationSets/Create.hs | mpl-2.0 | 5,872 | 0 | 18 | 1,410 | 866 | 505 | 361 | 123 | 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/GlobalForwardingRules/Patch.hs | mpl-2.0 | 5,449 | 0 | 17 | 1,173 | 563 | 339 | 224 | 89 | 1 |
-- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft }
func =
let
foo = True
b = False
in return ()
| lspitzner/brittany | data/Test495.hs | agpl-3.0 | 171 | 0 | 8 | 35 | 28 | 14 | 14 | 5 | 1 |
module Freekick.Libsoccer.Database (parsePitchXML, parseCountryXML, parsePlayerXML, parseClubXML)
where
import Libaddutil.XMLParse
import Freekick.Libsoccer.Pitch
import Freekick.Libsoccer.Country
import Freekick.Libsoccer.LeagueSystem
import Freekick.Libsoccer.Region
import Freekick.Libsoccer.Stage
import Freekick.Li... | anttisalonen/freekick | haskell/libfreekick/Freekick/Libsoccer/Database.hs | agpl-3.0 | 14,693 | 0 | 15 | 4,163 | 4,272 | 2,168 | 2,104 | 255 | 3 |
{-|
Copyright : (C) 2012-2016, University of Twente
License : BSD2 (see the file LICENSE)
Maintainer : Christiaan Baaij <christiaan.baaij@gmail.com>
Capture-free substitution function for CoreHW
-}
module CLaSH.Core.Subst where
import Unbound.Generics.LocallyNameless (subst, substs)
import CLaSH.C... | ggreif/clash-compiler | clash-lib/src/CLaSH/Core/Subst.hs | bsd-2-clause | 1,293 | 0 | 7 | 396 | 238 | 145 | 93 | 35 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DefaultSignatures #-}
--------------------------------------------------------------------
-- |
-- Module : Ermine.Syntax.Digest
-- Copyright : (c) Edward Kmett 2011-12
-- License : BSD3
-- Maintainer: Edward Kme... | ekmett/ermine | src/Ermine/Syntax/Digest.hs | bsd-2-clause | 4,221 | 0 | 12 | 713 | 1,254 | 677 | 577 | 88 | 1 |
module FractalFlame.Point.Types.CartesianPoint where
import FractalFlame.Types.Base
import FractalFlame.Point.Types.Point
type CartesianPoint = Point Coord
| anthezium/fractal_flame_renderer_haskell | FractalFlame/Point/Types/CartesianPoint.hs | bsd-2-clause | 158 | 0 | 5 | 14 | 30 | 20 | 10 | 4 | 0 |
import Compiler.Backend
main = writeShenSource
| mthom/abominable-klambda-compiler | Abominable.hs | bsd-3-clause | 48 | 0 | 4 | 6 | 11 | 6 | 5 | 2 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Mercado (
module Mercado
, MercadoBook
, MercadoQuote
) where
import Control.Exception
import Control.DeepSeq ( ($!!) ) --... | dimitri-xyz/mercado-bitcoin | src/Mercado.hs | bsd-3-clause | 16,247 | 0 | 20 | 4,548 | 3,534 | 1,822 | 1,712 | 259 | 7 |
-- 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.
module Duckling.Dimensions.KO
( allDimensions
) where
import Duckling.Dimensions.Types
allDimensions :: [Se... | facebookincubator/duckling | Duckling/Dimensions/KO.hs | bsd-3-clause | 493 | 0 | 6 | 100 | 87 | 50 | 37 | 13 | 1 |
{-# LANGUAGE TypeSynonymInstances #-}
module Cartel.Generators where
import Cartel
import Cartel.Betsy
import Cartel.Ast
import Cartel.Render
import Control.Monad.Trans.State
import Control.Monad.Trans.Class
import System.Random (StdGen, random, randomR, Random(..), mkStdGen)
import Control.Monad.Trans.Reader
import C... | massysett/cartel | cartel/tests/Cartel/Generators.hs | bsd-3-clause | 10,525 | 0 | 28 | 2,818 | 3,204 | 1,669 | 1,535 | 288 | 2 |
{-# OPTIONS_GHC -W #-}
module SourceSyntax.Annotation where
import qualified Text.Parsec.Pos as Parsec
import qualified Text.PrettyPrint as P
import SourceSyntax.PrettyPrint
data Annotated annotation expr = A annotation expr
deriving (Show)
data Region
= Span Position Position P.Doc
| None P.Doc
deri... | deadfoxygrandpa/Elm | compiler/SourceSyntax/Annotation.hs | bsd-3-clause | 2,100 | 0 | 20 | 689 | 863 | 441 | 422 | 56 | 4 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -Wall #-}
-- {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- TEMP
-- {-# OPTIONS_GHC -fno-warn-unused-binds #-} -- TEMP
--------------------------------------------------------... | conal/shaped-types | src/ShapedTypes/Fams.hs | bsd-3-clause | 2,151 | 0 | 9 | 432 | 338 | 200 | 138 | 30 | 0 |
{-# LANGUAGE OverloadedStrings #-}
import System.Random
import System.Environment
import Debug.Trace
import Data.List
import Control.DeepSeq
import Data.Map (Map)
import qualified Data.Map as Map
-- ----------------------------------------------------------------------------
-- <<Talk
newtype Talk = Talk Int
deri... | mono0926/ParallelConcurrentHaskell | timetable.hs | bsd-3-clause | 3,652 | 0 | 15 | 1,078 | 1,175 | 648 | 527 | 77 | 2 |
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
-- |
-- Module : Hasmin.Types.TimingFunction
-- Copyright : © 2017 Cristian Adrián Ontivero
-- License : BSD3
-- Stability : experimental
-- Portability : unknown
--
----------------------------... | contivero/hasmin | src/Hasmin/Types/TimingFunction.hs | bsd-3-clause | 4,915 | 0 | 15 | 1,819 | 1,222 | 633 | 589 | 100 | 0 |
{-# LANGUAGE Safe #-}
{-# LANGUAGE CPP #-}
#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 700
{-# LANGUAGE GADTs #-}
#endif
-----------------------------------------------------------------------------
-- |
-- Module : Text.Printf.Extensible
-- Copyright : (c) Lennart Augustsson and Bart Massey 2... | BartMassey/extensible-printf | Text/Printf/Extensible.hs | bsd-3-clause | 30,643 | 0 | 23 | 8,015 | 6,122 | 3,390 | 2,732 | 421 | 13 |
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
module Network.WebSockets.Handshake.Tests
( tests
) where
import Control.Applicative ((<$>))
import Data.ByteString.Char8 ()
import Data.Enumerator (($$))
import Data.Maybe (fromJust)
import Test.Framework (Test, testGroup)
import Test.Framework.Provider... | 0xfaded/websockets | tests/haskell/Network/WebSockets/Handshake/Tests.hs | bsd-3-clause | 3,706 | 0 | 18 | 748 | 900 | 503 | 397 | 82 | 1 |
{-# language QuasiQuotes #-}
module Render.Spec.Extends
( structExtends
) where
import Prettyprinter
import qualified Data.Vector.Extra as V
import Polysemy
import Polysemy.Input
import Relude hiding ( Enum
... | expipiplus1/vulkan | generate-new/src/Render/Spec/Extends.hs | bsd-3-clause | 16,357 | 0 | 32 | 5,262 | 2,244 | 1,067 | 1,177 | -1 | -1 |
module Intel.ArBB.Data.Boolean where
import Control.Monad (liftM)
import Foreign.Ptr
import Foreign.Storable
import Data.Int
import Intel.ArBB.IsScalar
import Intel.ArBB.Types
import qualified Intel.ArbbVM as VM
newtype Boolean = B {unBoolean :: Bool}
deriving (Eq, Ord)
instance Show Boolean where
sho... | svenssonjoel/EmbArBB | Intel/ArBB/Data/Boolean.hs | bsd-3-clause | 790 | 0 | 10 | 171 | 280 | 154 | 126 | 21 | 0 |
{- {-# LANGUAGE FlexibleContexts, UndecidableInstances#-} -}
module TPM.Types where
import TPM.Utils
import TPM.Const
import Data.Word
import Data.Bits
import Data.Char(ord)
import Data.Binary
import Data.Binary.Get
import Data.Binary.Put
import Data.ByteString.Lazy hiding (putStrLn,map,reverse)
import qualified Data.... | armoredsoftware/protocol | tpm/mainline/src/TPM/Types.hs | bsd-3-clause | 51,248 | 1 | 20 | 11,580 | 8,882 | 4,808 | 4,074 | 896 | 1 |
module Problem6 where
problem6 :: Int
problem6 = sqrOfSum - sumOfSqrs where
x = sum [1..100]
sqrOfSum = x*x
sumOfSqrs = sum [x*x | x <- [1..100]]
| c0deaddict/project-euler | src/Part1/Problem6.hs | bsd-3-clause | 153 | 0 | 11 | 34 | 70 | 39 | 31 | 6 | 1 |
-- Copyright (c) 2015, Travis Bemann
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- o Redistributions of source code must retain the above copyright notice, this
-- list of conditio... | tabemann/amphibian | src_old/Network/IRC/Client/Amphibian/Encoding.hs | bsd-3-clause | 2,506 | 0 | 8 | 496 | 186 | 133 | 53 | 20 | 1 |
{-# OPTIONS_GHC -fno-warn-dodgy-exports #-}
{- | an incomplete extension of dimensional-tf to work with hmatrix and ad
Haddocks are organized to follow hmatrix
note: for subscripting, use the 'HNat' while the units still use 'N.NumType'
TODO:
* Friendly syntax for introduction (more matD)
* Friendly syntax for el... | aavogt/DimMat | DimMat/Internal.hs | bsd-3-clause | 32,614 | 0 | 21 | 8,443 | 11,537 | 6,158 | 5,379 | -1 | -1 |
module Penny.NonEmpty where
import Control.Monad (ap)
import Penny.Positive
import qualified Data.Foldable as F
import qualified Data.Traversable as T
import Data.Sequence (Seq, (|>), viewl, ViewL(..), (<|))
import qualified Data.Sequence as S
import Data.Semigroup
import qualified Data.Map.Strict as M
data NonEmpty ... | massysett/penny | penny/lib/Penny/NonEmpty.hs | bsd-3-clause | 2,188 | 0 | 15 | 542 | 933 | 476 | 457 | 56 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Binary.Util(
getElementPosition
, styleBlock
, getMousePosition
, getDocumentSize
, cbutton
, cbuttonM
, timeout
, clearTimers
, wloop
, panel
, labelRow
, binToInt
, binToDouble
, debugMsg
) where
import Prelude hiding (div, id)
import qualifie... | Teaspot-Studio/bmstu-binary-genetics-haste | Binary/Util.hs | bsd-3-clause | 6,305 | 0 | 15 | 1,288 | 2,116 | 1,060 | 1,056 | 166 | 2 |
module Main where
import Numeric.Datasets.Iris
import Numeric.Datasets.OldFaithful
import Fuml.Svm
import Fuml.Core
import Fuml.Supervised.Accuracy
import Data.Function (on)
import Data.Tuple
import AI.SVM.Simple
import Control.Arrow
import Data.Random
import qualified Data.Vector.Storable as V
toVector = swap . fm... | diffusionkinetics/open | fuml-svm/TestSVM.hs | mit | 1,914 | 0 | 15 | 390 | 811 | 410 | 401 | 51 | 3 |
{-| Cluster rolling maintenance helper.
-}
{-
Copyright (C) 2012 Google 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.... | dblia/nosql-ganeti | src/Ganeti/HTools/Program/Hroller.hs | gpl-2.0 | 4,086 | 0 | 18 | 961 | 897 | 485 | 412 | 67 | 2 |
{-# 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-redshift/gen/Network/AWS/Redshift/DescribeEventCategories.hs | mpl-2.0 | 4,886 | 0 | 15 | 946 | 582 | 351 | 231 | 73 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Test.IO.Ambiata.Cli.Http where
import Ambiata.Cli.Http
import Control.Concurrent
import Control.Exception
import Control.Retry
import Data.Default
import ... | ambiata/tatooine-cli | test/Test/IO/Ambiata/Cli/Http.hs | apache-2.0 | 1,815 | 0 | 16 | 444 | 577 | 304 | 273 | 43 | 1 |
module AwShUP ( aw_connected_components )
where
import Data.Array.Parallel.Unlifted
import Data.Array.Parallel.Unlifted.Parallel
starCheck :: UArr Int -> UArr Bool
starCheck ds =
let gs = bpermuteUP ds ds
st = zipWithUP (==) ds gs
st' = updateUP st . filterUP (not . sndS)
$ zip... | mainland/dph | icebox/examples/concomp/AwShUP.hs | bsd-3-clause | 1,549 | 0 | 17 | 565 | 608 | 311 | 297 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
import Control.Lens (view)
import Utils.Spoty
main = do
Just artist <- fetchOne (searchArtist "avicii") -- assume at least one match
popular <- getArtistTop (view spotifyID artist) "SE" -- retrieve the most popular tracks in Sweden
mapM_ (print . view... | davnils/spoty | Examples/Search.hs | bsd-3-clause | 387 | 0 | 10 | 103 | 82 | 41 | 41 | 7 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE CPP #-}
#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702
{-# LANGUAGE Trustworthy #-}
{-... | isomorphism/linear | src/Linear/V3.hs | bsd-3-clause | 12,321 | 0 | 12 | 3,201 | 4,732 | 2,468 | 2,264 | 340 | 1 |
{-
(c) The AQUA Project, Glasgow University, 1993-1998
\section[SimplMonad]{The simplifier Monad}
-}
module ETA.SimplCore.SimplMonad (
-- The monad
SimplM,
initSmpl, traceSmpl,
getSimplRules, getFamEnvs,
-- Unique supply
MonadUnique(..), newId,
-- Counting
... | alexander-at-github/eta | compiler/ETA/SimplCore/SimplMonad.hs | bsd-3-clause | 7,821 | 0 | 15 | 2,472 | 1,685 | 925 | 760 | 126 | 2 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE RankNTypes #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Distributed.Process.Debug
-- Copyright : (c) Well-Typed / Tim Watson
-- License : BSD3 (see the file LICENSE)
--
-... | tweag/distributed-process | src/Control/Distributed/Process/Debug.hs | bsd-3-clause | 11,120 | 0 | 20 | 2,145 | 1,100 | 680 | 420 | 128 | 3 |
module UStateM
(module UIxStateM, F.HasState, updSt, updSt_, getSt, setSt, setSt_) where
import UIxStateM hiding (HasState(..))
import qualified MT as F
updSt :: F.HasState m F.Z s => (s -> s) -> m s
updSt_ :: F.HasState m F.Z s => (s -> s) -> m ()
getSt :: F.HasState m F.Z s => m s
setSt :: F.HasState m F... | forste/haReFork | tools/base/lib/Monads/UStateM.hs | bsd-3-clause | 512 | 0 | 8 | 124 | 258 | 137 | 121 | -1 | -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>Technology detection | ZAP Extension</title>
<maps>
<homeID>top</... | 0xkasun/security-tools | src/org/zaproxy/zap/extension/wappalyzer/resources/help/helpset.hs | apache-2.0 | 994 | 86 | 50 | 172 | 407 | 216 | 191 | -1 | -1 |
{-@ LIQUID "-v" @-}
module Hello () where
{-@ abz :: (Num a, Ord a) => x:a -> {v: a | v >= x} @-}
abz x = if (x > 0) then x else (0 - x)
{-@ incr :: (Num a) => x:a -> {v: a | v > x} @-}
incr x = x + 1
{-@ decr :: (Num a) => x:a -> {v: a | v < x} @-}
decr x = x - 1
| abakst/liquidhaskell | tests/pos/hello.hs | bsd-3-clause | 293 | 0 | 7 | 108 | 65 | 38 | 27 | 4 | 2 |
-- | This module does absolutely nothing. It's present so that cabal can more
-- easily track whether the stackage package is installed.
module Stackage.Dummy () where
| FranklinChen/stackage | stackage/Stackage/Dummy.hs | mit | 168 | 0 | 3 | 27 | 11 | 8 | 3 | 1 | 0 |
{-# LANGUAGE GADTs, RankNTypes, ScopedTypeVariables #-}
-- From Yann Regis-Gianas at INRIA
module ShouldCompile where
data T a where
K :: T Int
-- Should fail
i1 :: T a -> a -> Int
i1 t y = (\t1 y1 -> case t1 of K -> y1) t y
-- No type signature; should not type-check,
-- because we can't unify under the equalty... | holzensp/ghc | testsuite/tests/gadt/gadt7.hs | bsd-3-clause | 670 | 17 | 11 | 203 | 205 | 125 | 80 | 19 | 1 |
{-# LANGUAGE SafeLanguage #-}
-- | Basic test to see if Safe flags compiles
module SafeFlags04 where
f :: Int
f = 1
| urbanslug/ghc | testsuite/tests/safeHaskell/flags/SafeFlags04.hs | bsd-3-clause | 119 | 0 | 4 | 26 | 16 | 11 | 5 | 4 | 1 |
module QuantumSpec where
import Test.Hspec
import Quantum
import qualified Data.Set as Set
main :: IO ()
main = hspec spec
samplePackages :: [Package]
samplePackages = [1..5] ++ [7..11]
spec :: Spec
spec = do
describe "subsets" $
it "should return all non-empty subsets" $
subsets (Set.fromList "abc") `s... | corajr/adventofcode2015 | 24/test/QuantumSpec.hs | mit | 719 | 0 | 14 | 132 | 218 | 118 | 100 | 19 | 1 |
{-# LANGUAGE EmptyDataDecls, DeriveGeneric, OverloadedStrings, ScopedTypeVariables #-}
{-|
Module : Main
Description : The @minimalistic@ HAAP example
This module presents a minimalistic example of the usage of HAAP, consisting on testing an @HSpec@
specification, running several code analysis plugins, providing... | hpacheco/HAAP | examples/minimalistic/minimalistic.hs | mit | 7,458 | 75 | 26 | 1,921 | 1,553 | 855 | 698 | 115 | 1 |
{-# LANGUAGE QuasiQuotes, TemplateHaskell, TypeFamilies, RecordWildCards, OverloadedStrings, DeriveGeneric, GeneralizedNewtypeDeriving #-}
module Tach.Transformable.Types where
import Tach.Transformable.Types.Internal
import GHC.Generics
newtype WaveletTransform a = WaveletTransform { unWaveletTransform :: [[a]]} der... | smurphy8/tach | core-types/tach-transformable-types/src/Tach/Transformable/Types.hs | mit | 378 | 0 | 8 | 38 | 60 | 40 | 20 | 6 | 0 |
module P1 where
p1 :: [a] -> Maybe a
p1 [] = Nothing
p1 [x] = Just x
p1 (_:xs) = p1 xs
| nosoosso/nnh | src/P1.hs | mit | 88 | 0 | 7 | 24 | 61 | 32 | 29 | 5 | 1 |
-- Recursion
maximum' :: (Ord a) => [a] -> a
maximum' [] = error "empty"
maximum' [x] = x
maximum' (x:xs) = max x (maximum' xs)
replicate' :: (Num i, Ord i) => i -> a -> [a]
replicate' n x
| n <= 0 = []
| otherwise = x : replicate' (n-1) x
-- pattern matching for different forms of input, and guards for
--... | autocorr/lyah | chap5.hs | mit | 1,744 | 0 | 12 | 427 | 644 | 343 | 301 | 33 | 1 |
{-# LANGUAGE DeriveGeneric #-}
-- entry point of the LSP server
module Server
( run
) where
import qualified Agda
import Control.Concurrent ( writeChan )
import Control.Monad.Reader ( MonadIO(liftIO)
, void
... | banacorn/agda-language-server | src/Server.hs | mit | 4,698 | 0 | 19 | 1,719 | 826 | 450 | 376 | 76 | 3 |
{-# LANGUAGE BangPatterns #-}
module LINreg2 (mmlLinearRegLP, diagl, rowM, colM,(<+>), (<->), foldl'Rnf
, mkZ,realignedNpieces,lineFun, mmlCorr-- ,vmean,vvar,vstDiv,vvarM,vunStdNorm,vstNorm, corrRoundCentre
, standardizedFit,relFit, corr,nCorrV,logg
) where
import ... | rawlep/MML | sourceCode/LINreg2.hs | mit | 7,984 | 0 | 16 | 2,943 | 2,697 | 1,429 | 1,268 | 116 | 2 |
{-
This is my xmonad configuration file.
There are many like it, but this one is mine.
If you want to customize this file, the easiest workflow goes
something like this:
1. Make a small change.
2. Hit "super-q", which recompiles and restarts xmonad
3. If there is an error, undo your change and hit ... | evan886/myxmonad | 4linux/xmonad.hs | mit | 14,235 | 0 | 18 | 2,945 | 1,535 | 914 | 621 | 135 | 1 |
import Control.Monad (guard)
doubleAndAdd x y = 2 * x + y
-- FEEL FREE TO KILL THE OTHER EXAMPLES I LIKE THE BOOK EXAMPLE THAT YOU USED, I JUST CREATED THE EXTRAS INITIALLY FOR FUN, BUT FIBONACCI MIGHT BE NICE TO USE ELSEWHERE SO IM GOING TO LEAVE EVERYTHING HERE
fibonacci n
| n == 0 = 0 -- handles the fir... | rtoal/ple | haskell/custom_operators.hs | mit | 2,378 | 0 | 11 | 630 | 633 | 304 | 329 | 40 | 1 |
module Control.Map where
-- some common map utilities
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Maybe (mapMaybe)
import Data.Set (Set)
import qualified Data.Set as Set
snarf :: (Ord c, Ord d) => (a -> Maybe (c,d)) -> [a] -> Map c (Set d)
snarf f = foldr inserter Map.empty . mapMaybe f
ins... | geophf/1HaskellADay | exercises/HAD/Control/Map.hs | mit | 1,218 | 0 | 10 | 245 | 415 | 223 | 192 | 15 | 1 |
module Y2020.M06.D29.Exercise where
import Data.Time
{--
Okay! So, howdy!
Today's haskell exercise, we're going to ... wait for it ... EXERCISE!
Let's say we've got this person exercising and tracking their steps, AND
setting goals, because that's what some exercisers do: set goals.
1. write a function that, given... | geophf/1HaskellADay | exercises/HAD/Y2020/M06/D29/Exercise.hs | mit | 1,094 | 0 | 7 | 213 | 93 | 53 | 40 | 8 | 1 |
module FuzzyTimings.FuzzyTiming (FuzzyTiming(..),
ftPlayCount,
cropFuzzyTiming,
TimesToPlay) where
import FuzzyTimings.SlicedTime
import FuzzyTimings.TimeSlice
type TimesToPlay = Double
-- | "Fuzzily" timed object that is to be sche... | tlaitinen/fuzzy-timings | FuzzyTimings/FuzzyTiming.hs | mit | 1,393 | 0 | 14 | 405 | 364 | 191 | 173 | 27 | 1 |
{-# LANGUAGE TypeOperators #-}
module Data.LabeledTree(
Tree(..), Forest,
-- * Building trees
flattenTreeL, flattenForestL,
unfoldTree, unfoldForest,
reduceTree
) where
import Data.Traversable
import Data.Foldable()
import Control.Monad()
import Control.Applicative()
import Control.DeepSeq (NFD... | Roxxik/pwbWS15 | hs/Data/LabeledTree.hs | mit | 2,322 | 0 | 12 | 548 | 783 | 437 | 346 | 39 | 1 |
------------------------------------------------------------------------------
module Network.HTTP.Media.Encoding.Tests (tests) where
import qualified Data.ByteString.Char8 as BS
import Control.Monad (join)
import Data.String (fromString)
import ... | zmthy/http-media | test/Network/HTTP/Media/Encoding/Tests.hs | mit | 3,028 | 0 | 14 | 692 | 562 | 297 | 265 | 60 | 1 |
{-# LANGUAGE OverloadedStrings,
RecordWildCards,
LambdaCase,
ViewPatterns,
ScopedTypeVariables,
NoMonomorphismRestriction #-}
module Network.AWS.Core (
module Codec.Utils
, module Control.Applicative
, module Control.Monad
, module Control.Monad... | thinkpad20/s3-streams | src/Network/AWS/Core.hs | mit | 4,942 | 0 | 12 | 997 | 1,403 | 853 | 550 | 98 | 2 |
{-# OPTIONS -Wall #-}
import qualified Data.List as List
import qualified Data.Maybe as Maybe
main :: IO ()
main = do
code <- lines <$> getContents
let scores = map score $ Maybe.mapMaybe complete code
let middle = length scores `div` 2
let answer = List.sort scores !! middle
print answer
score :: [Char] -... | SamirTalwar/advent-of-code | 2021/AOC_10_2.hs | mit | 1,178 | 0 | 12 | 303 | 516 | 264 | 252 | 35 | 10 |
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Haggcat.JSON.Decoder where
import qualified Data.Aeson as Aeson
import qualified Data.ByteString.Lazy as LBS
class (Aeson.FromJSON b) => DecodeContext a b | a -> b where
unwrap :: b -> [a]
decodeResponse :: LBS.By... | carymrobbins/haggcat | src/Haggcat/JSON/Decoder.hs | mit | 404 | 0 | 9 | 76 | 99 | 59 | 40 | 9 | 0 |
module Networkie.Server.Common where
import qualified Data.Text as T
import ClassyPrelude
import Prelude()
type PlayerName = T.Text
type World = Int
{-| Input in the "game is running stage" from a client -}
type GameClientInput = T.Text
type Client = Chan ClientCommand
{-| (Parsed) Mess... | pmiddend/networkie | src/Networkie/Server/Common.hs | gpl-2.0 | 783 | 0 | 6 | 220 | 106 | 67 | 39 | 15 | 0 |
module Roller.Parse
(
parse,
naturalNumber,
dieTerm
) where
import Roller.Types
import Text.Regex.Applicative
import Data.Char (isDigit, isSpace)
import Data.Word
naturalNumber :: RE Char Word8
naturalNumber = read <$> some (psym isDigit)
dieTerm :: RE Char DiceExpression
dieTerm = constructDieTerm <$> natura... | PiotrJustyna/roller | Roller/Parse.hs | gpl-2.0 | 1,473 | 0 | 10 | 192 | 369 | 196 | 173 | 31 | 1 |
{- Piffle, Copyright (C) 2007, Jaap Weel. 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 program is distribut... | jaapweel/piffle | src/PiffleParse.hs | gpl-2.0 | 10,160 | 0 | 19 | 3,623 | 2,356 | 1,229 | 1,127 | 202 | 2 |
-- A simplification of Berry's ABRO example from the Esterel Language Primer (p15).
module T where
import Tests.KesterelBasis
half_abro a r o =
proc () ->
(| (loop_eachE r)
( do await_immediateE a -< ()
sustainE o -< () ) |)
-- | Circuit interface.
top =
bool2sig $ \a ->
bool2s... | peteg/ADHOC | Tests/08_Kesterel/119_simplified_ABRO.hs | gpl-2.0 | 601 | 3 | 12 | 158 | 142 | 74 | 68 | -1 | -1 |
{-# language MultiParamTypeClasses #-}
{-# language TypeSynonymInstances #-}
{-# language FlexibleInstances #-}
module Geo.Domain where
import qualified Prelude
import Prelude (Int)
import Polynomial.Class
import Prelude (succ, ($), (++), show)
import Polynomial.Type
import Autolib.TES.Identifier
import System.Rando... | marcellussiegburg/autotool | collection/src/Geo/Domain.hs | gpl-2.0 | 775 | 0 | 12 | 189 | 268 | 148 | 120 | 23 | 0 |
import Language.Dockerfile
main = do
c <- readFile "./Dockerfile"
print (parseString c)
| beijaflor-io/haskell-language-dockerfile | examples/parse-string.hs | gpl-3.0 | 96 | 0 | 9 | 20 | 33 | 15 | 18 | 4 | 1 |
{-# LANGUAGE NamedFieldPuns, NoImplicitPrelude, OverloadedStrings, ExtendedDefaultRules, RecordWildCards, NoMonomorphismRestriction, TemplateHaskell, QuasiQuotes, RecordWildCards #-}
module Nix.Commands where
import BasicPrelude hiding (try, (</>), (<.>), FilePath, rem, takeWhile)
import Shelly hiding (path)
import q... | lu-fennell/nix-env-rebuild | src/Nix/Commands.hs | gpl-3.0 | 4,938 | 0 | 12 | 1,411 | 1,041 | 588 | 453 | 82 | 3 |
{-# LANGUAGE CPP #-}
-- | This module provides rate-limiting facilities built on top of the lazy bucket algorithm heavily inspired by
-- <http://ksdlck.com/post/17418037348/rate-limiting-at-webscale-lazy-leaky-buckets "Rate Limiting at Webscale: Lazy Leaky Buckets">
--
-- See also Wikipedia's <http://en.wikipedia.org/... | hvr/token-bucket | src/Control/Concurrent/TokenBucket.hs | gpl-3.0 | 6,157 | 0 | 12 | 1,547 | 849 | 481 | 368 | 77 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-|
Module : Link
Description : A link!
Copyright : (c) Frédéric BISSON, 2016
License : GPL-3
Maintainer : zigazou@free.fr
Stability : experimental
Portability : POSIX
A link!
-}
module Data.Link
( Link ( UncheckedLink, ucURI
, CheckedLink, chURI, chHTTPCode, chC... | Zigazou/deadlink | src/Data/Link.hs | gpl-3.0 | 3,823 | 0 | 11 | 1,159 | 1,067 | 556 | 511 | 86 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-firebasehosting/gen/Network/Google/Resource/FirebaseHosting/Sites/GetConfig.hs | mpl-2.0 | 4,691 | 0 | 15 | 1,114 | 704 | 412 | 292 | 102 | 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/Addresses/Insert.hs | mpl-2.0 | 4,590 | 0 | 17 | 1,069 | 559 | 335 | 224 | 84 | 1 |
{-# LANGUAGE GADTs, RankNTypes #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE ScopedTypeVariables #-}
module HQueries.SqlUtils(
hqio2Sql
, sqlValue2QueryRawRes
, entity2migration
, initSqlVarsTable
, getSessionSql
, freeSession
)where
import HQue... | premium-minds/h-queries | HQueries/SqlUtils.hs | lgpl-3.0 | 9,052 | 0 | 17 | 2,411 | 2,959 | 1,540 | 1,419 | 199 | 3 |
module HackerRank.Utilities.Manager.Edit where
import Control.Exception
import System.Environment
import System.Process
import System.FilePath.Posix
import HackerRank.Utilities.Manager.IOError
getEditor :: IO String
getEditor = catch (getEnv "EDITOR") ((\e -> return "vim") :: IOException -> IO String)
editSource ::... | oopsno/hrank | src/HackerRank/Utilities/Manager/Edit.hs | unlicense | 645 | 0 | 10 | 90 | 195 | 106 | 89 | 17 | 1 |
module Runner where
import AbsHaskal
import Interpreter
import Memory
import Types
import Utils
-- EVALUATING, EXECUTING AND RUNNING PARSED SYNTAX TREE
evalInt :: Exp -> Env -> Interpreter Value
evalInt e env = do v <- eval e env
case v of
(VInt _) -> return v
... | dplewa/haskal-interpreter | Runner.hs | apache-2.0 | 8,569 | 0 | 15 | 4,586 | 2,727 | 1,277 | 1,450 | 146 | 12 |
calc x h =
let x' = sqrt(2*x*x) / 2.0
y = sqrt(x'*x' + h*h)
y' = sqrt(y*y - x*x/4.0)
in
x*x + 4*x*y'/2
ans (0:0:_) = []
ans (x:h:xs) =
((calc x h):(ans xs))
main = do
c <- getContents
let i = map read $ lines c :: [Double]
o = ans i
mapM_ print o
| a143753/AOJ | 0073.hs | apache-2.0 | 287 | 0 | 14 | 98 | 224 | 112 | 112 | 13 | 1 |
--
-- Minio Haskell SDK, (C) 2017 Minio, Inc.
--
-- 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 ... | donatello/minio-hs | test/Network/Minio/XmlGenerator/Test.hs | apache-2.0 | 3,595 | 0 | 15 | 908 | 402 | 223 | 179 | 53 | 1 |
{-# LANGUAGE PackageImports #-}
import "yesog" Application (getApplicationDev)
import Network.Wai.Handler.Warp
(runSettings, defaultSettings, settingsPort)
import Control.Concurrent (forkIO)
import System.Directory (doesFileExist, removeFile)
import System.Exit (exitSuccess)
import Control.Concurrent (threadDelay)
... | trescenzi/Yesog | devel.hs | bsd-2-clause | 699 | 0 | 10 | 123 | 186 | 101 | 85 | 23 | 2 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.HP
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : portable
--
-- A convenience module, combin... | haskell-opengl/OpenGLRaw | src/Graphics/GL/HP.hs | bsd-3-clause | 807 | 0 | 5 | 98 | 82 | 63 | 19 | 9 | 0 |
module Light where
import BasePrelude
import Foreign (Storable(..), castPtr, nullPtr, plusPtr)
import Foreign.C (CFloat)
import Graphics.GL
import Linear as L
import Material
import Util
data LightShape
= Omni
| Spotlight (V3 CFloat) -- direction
CFloat -- full radius
CFloat ... | ocharles/hadoom | hadoom/Light.hs | bsd-3-clause | 3,281 | 0 | 19 | 1,178 | 782 | 401 | 381 | 91 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
------------------------------------------------------------------------------
module Snap.Internal.Http.Server.TLS
( TLSException(..)
, withTLS
, bindHttps
, http... | snapframework/snap-server | src/Snap/Internal/Http/Server/TLS.hs | bsd-3-clause | 6,261 | 0 | 11 | 1,706 | 518 | 325 | 193 | 38 | 1 |
-- | A little parser and pretty printer generator.
module AutoAST
( version12
) where
import Data.Char
import Data.List
import Text.Printf
data Term
= NonTerminal String [(String, Expr)]
| Terminal String
deriving Eq
data Expr
= One Term
| Many Term
| Sequence [Expr]
| Token String Stri... | tomahawkins/smt-lib | attic/AutoAST.hs | bsd-3-clause | 3,563 | 0 | 20 | 847 | 1,211 | 620 | 591 | 78 | 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.