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 : $Header$
Description : sublogic analysis for CoCASL
Copyright : (c) Till Mossakowski, C.Maeder and Uni Bremen 2002-2006
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : experimental
Portability : portable
This module provides the sublogic f... | nevrenato/Hets_Fork | CoCASL/Sublogic.hs | gpl-2.0 | 2,234 | 0 | 12 | 442 | 456 | 233 | 223 | 41 | 2 |
-- A collection of Themes.
module Yi.Style.Library where
import Yi.Style
import Data.Prototype
import Data.Monoid
type Theme = Proto UIStyle
-- | Abstract theme that provides useful defaults.
defaultTheme :: Theme
defaultTheme = Proto $ const $ UIStyle
{ modelineAttributes = error "modeline attributes must be rede... | codemac/yi-editor | src/Yi/Style/Library.hs | gpl-2.0 | 4,647 | 0 | 11 | 1,169 | 1,103 | 632 | 471 | 84 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE DeriveDataTypeable, OverloadedStrings #-}
module Lib.FSHook
( getLdPreloadPath
, FSHook
, with
, OutputEffect(..), OutputBehavior(..)
, Input(..)
, DelayedOutput(..), UndelayedOutput
, Protocol.OutFilePath(..), Protocol.OutEffect(..)
, FSAccessHandlers(..... | da-x/buildsome | src/Lib/FSHook.hs | gpl-2.0 | 16,102 | 0 | 24 | 3,443 | 4,154 | 2,174 | 1,980 | 326 | 24 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE RecursiveDo #-}
{-# LANGUAGE TemplateHaskell #-}
import Control.Lens
import Control.Monad.Free
import Data.List
import qualified GHC.Generics as GHC
import Reflex
import Reflex.Dom
--------... | artuuge/free-running | helloFreeReflex.hs | gpl-2.0 | 2,090 | 0 | 17 | 525 | 891 | 452 | 439 | 64 | 3 |
{- |
Module : Engine
Description : The engine playing a game on a `Playfield`
Copyright : (c) Frédéric BISSON, 2015
License : GPL-3
Maintainer : zigazou@free.fr
Stability : experimental
Portability : POSIX
The engine handles the rules of the game:
- apply `Action`
- manage out of bounds elements
- desig... | Zigazou/Tank | src/Tank/Game/Engine.hs | gpl-3.0 | 2,565 | 0 | 13 | 567 | 655 | 330 | 325 | -1 | -1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
module Git
( module Git
, Text
) where
import Control.DeepSeq
import Control.Monad
import Data.Function
import Data.List
import Data.Maybe
import Data.Monoid
import Data.T... | bgamari/git-haskell-org-hooks | src/Git.hs | gpl-3.0 | 6,276 | 0 | 18 | 1,888 | 1,899 | 1,004 | 895 | 160 | 11 |
import qualified Data.ByteString.Char8 as B
import System.Fuse
import System.Environment
import System.Posix.Types
import Shiny.FS.Internal
import Shiny.Hardware (Hardware)
--import Shiny.Hardware.Dummy (mkDummyHardware)
import Shiny.Hardware.Serial (mkSerialHardware)
import Control.Applicative
import Control.Monad... | dhrosa/shinyfs | Shiny/FS.hs | gpl-3.0 | 3,500 | 0 | 13 | 949 | 1,138 | 576 | 562 | 75 | 2 |
module EightPuzzle
(
) where
import EightPuzzle.Internal
| cdepillabout/coursera | algorithms1/week4/src/EightPuzzle.hs | gpl-3.0 | 66 | 0 | 4 | 16 | 12 | 8 | 4 | 3 | 0 |
{-
Pandoc filter that cleans up internal references to figures and tables (tables soon!).
Compile with:
ghc --make pandoc-internalref.hs
and use in pandoc with
--filter [PATH]/pandoc-internalref
-}
module Main where
import System.Environment
import Text.Pandoc.JSON
import Text.Pandoc.Walk (walk, walkM)
... | balachia/pandoc-filters | pandoc-internalref.hs | gpl-3.0 | 2,808 | 0 | 18 | 613 | 970 | 504 | 466 | 43 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-servicenetworking/gen/Network/Google/Resource/ServiceNetworking/Services/DNSZones/Add.hs | mpl-2.0 | 5,643 | 0 | 17 | 1,257 | 789 | 463 | 326 | 116 | 1 |
-- | ECDSA Signatures
module Network.Haskoin.Crypto.ECDSA
( SecretT
, Signature(..)
, withSource
, getEntropy
, signMsg
, verifySig
, genPrvKey
, isCanonicalHalfOrder
, decodeDerSig
, decodeStrictSig
) where
import Control.DeepSeq (NFData, rnf)
import Control.Monad (guard,... | plaprade/haskoin | haskoin-core/src/Network/Haskoin/Crypto/ECDSA.hs | unlicense | 4,958 | 0 | 17 | 1,418 | 1,182 | 624 | 558 | 97 | 3 |
{-# LANGUAGE OverloadedStrings, CPP #-}
module FormStructure.Chapter7 (ch7Roles) where
#ifndef __HASTE__
--import Data.Text.Lazy (pack)
#endif
import FormEngine.FormItem
import FormStructure.Common
ch7Roles :: FormItem
ch7Roles = Chapter
{ chDescriptor = defaultFIDescriptor { iLabel ... | DataStewardshipPortal/ds-elixir-cz | FormStructure/Chapter7.hs | apache-2.0 | 3,323 | 0 | 15 | 1,567 | 549 | 327 | 222 | 56 | 1 |
import Data.Matrix (matrix, inverse, nrows, multStd, toList)
import Data.Ratio ((%))
recursionMatrix n integerSequence = matrix n n (\(i,j) -> integerSequence !! (i + j - 2) % 1)
solutionMatrix n integerSequence = matrix n 1 (\(i,_) -> integerSequence !! (i + n - 1) % 1)
targetInverse integerSequence = (case biggestI... | peterokagey/haskellOEIS | src/Sandbox/RecursionFinder.hs | apache-2.0 | 984 | 0 | 13 | 159 | 300 | 163 | 137 | 13 | 1 |
import Data.Char (toUpper)
main :: IO Bool
main =
putStrLn "Is green your favorite color?" >>
getLine >>=
(\input -> return ((toUpper . head $ input) == 'Y'))
| EricYT/Haskell | src/real_haskell/chapter-7/return1.hs | apache-2.0 | 174 | 0 | 13 | 43 | 64 | 34 | 30 | 6 | 1 |
module Data.GitParser
(module Data.GitParser.Parser
,module Data.GitParser.Types
,module Data.GitParser.Repo) where
import Data.GitParser.Repo
import Data.GitParser.Types
import Data.GitParser.Parser | jamessanders/gitparser | src/Data/GitParser.hs | bsd-2-clause | 212 | 0 | 5 | 27 | 47 | 32 | 15 | 7 | 0 |
--
-- Copyright (c) 2013, Carl Joachim Svenn
-- 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 source code must retain the above copyright notice... | karamellpelle/MEnv | source/Game/Run/Iteration.hs | bsd-2-clause | 3,701 | 0 | 17 | 880 | 599 | 317 | 282 | 49 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.Text (pack, strip)
import STC
main :: IO ()
main = do
token <- readFile "telegram.token"
telegramBotServer . strip $ pack token
| EleDiaz/StoryTellerChat | app/Main.hs | bsd-3-clause | 220 | 0 | 8 | 57 | 60 | 32 | 28 | 8 | 1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.Antialiasing
-- Copyright : (c) Sven Panne 2002-2005
-- License : BSD-style (see the file libraries/OpenGL/LICENSE)
--
-- Maintainer : sven.panne@aedion.de
-- Stability : pr... | FranklinChen/hugs98-plus-Sep2006 | packages/OpenGL/Graphics/Rendering/OpenGL/GL/Antialiasing.hs | bsd-3-clause | 1,563 | 0 | 6 | 172 | 205 | 131 | 74 | 19 | 1 |
{-# LANGUAGE TypeOperators #-}
-- |
-- Module : Data.OI.IO
-- Copyright : (c) Nobuo Yamashita 2011-2016
-- License : BSD3
-- Author : Nobuo Yamashita
-- Maintainer : nobsun@sampou.org
-- Stability : experimental
--
module Data.OI.IO
(
-- * Interaction enable to handle I/O error
(:~>)
-- * I/... | nobsun/oi | src/Data/OI/IO.hs | bsd-3-clause | 1,278 | 0 | 8 | 260 | 373 | 219 | 154 | 38 | 1 |
{-# LANGUAGE UnicodeSyntax #-}
module DB.Create where
import Database.HDBC (run, commit)
import DB.Base
createDb ∷ FilePath → IO ()
createDb dbName = do
conn ← connect dbName
run conn ("CREATE TABLE IF NOT EXISTS tags " ++
"(id INTEGER PRIMARY KEY," ++
... | marklar/TagFS | src/DB/Create.hs | bsd-3-clause | 1,115 | 0 | 12 | 344 | 154 | 78 | 76 | 21 | 1 |
{-# LANGUAGE FlexibleContexts #-}
module DataAnalysis04 where
import Data.Convertible (Convertible)
import Data.List (genericIndex, genericLength, genericTake)
import Database.HDBC (SqlValue, disconnect, fromSql, quickQuery')
import Database.HDBC.Sqlite3 (connectSqlite3)
import DataAnalysis02 (average)
readSqlColum... | mrordinaire/data-analysis | src/DataAnalysis04.hs | bsd-3-clause | 2,145 | 0 | 11 | 381 | 664 | 350 | 314 | 41 | 1 |
module Graphics.UI.Font
( module Graphics.UI.Font.TextureAtlas
, module Graphics.UI.Font.TextureFont
, module Graphics.UI.Font.TextureGlyph
, module Graphics.UI.Font.Markup
, module Graphics.UI.Font.FontManager
)
where
import Graphics.UI.Font.TextureAtlas
import Graphics.UI.Font.TextureFont
impo... | christiaanb/glfont | src/Graphics/UI/Font.hs | bsd-3-clause | 423 | 0 | 5 | 56 | 84 | 61 | 23 | 11 | 0 |
{-# LANGUAGE ForeignFunctionInterface, CPP #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.EXT.DirectStateAccess
-- Copyright : (c) Sven Panne 2013
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
--... | mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/EXT/DirectStateAccess.hs | bsd-3-clause | 34,735 | 0 | 21 | 2,903 | 7,903 | 4,341 | 3,562 | -1 | -1 |
module Plots
( -- * Core Library
-- | Definitions of bounds, axis scale, orientation,
-- legend, generic plot ,plot spec and so on.
module Plots.Types
-- | Definitions of theme, plots style, common themes,
-- marker shapes, colour maps and sample maps.
, module Plots.Themes
-- * API
... | bergey/plots | src/Plots.hs | bsd-3-clause | 2,909 | 0 | 5 | 836 | 315 | 229 | 86 | 44 | 0 |
module Diag.Util.Timer
where
import System.CPUTime
import Text.Printf
timeItMsg :: String -> IO a -> IO a
timeItMsg msg ioa = do
t1 <- getCPUTime
a <- ioa
t2 <- getCPUTime
let t :: Double
t = fromIntegral (t2-t1) * 1e-12
printf "CPU time for %s: %6.5fs\n" msg t
return a
| marcmo/hsDiagnosis | src/Diag/Util/Timer.hs | bsd-3-clause | 293 | 0 | 13 | 72 | 111 | 54 | 57 | 12 | 1 |
module Ivory.Language.Sint where
import Ivory.Language.BoundedInteger
import Ivory.Language.Type
import qualified Ivory.Language.Syntax as I
import Data.Int (Int8,Int16,Int32,Int64)
-- Signed Types ----------------------------------------------------------------
-- | 8-bit integers.
newtype Sint8 = Sint8 { getSint8... | GaloisInc/ivory | ivory/src/Ivory/Language/Sint.hs | bsd-3-clause | 2,936 | 0 | 9 | 698 | 836 | 473 | 363 | 85 | 0 |
{-# LANGUAGE FlexibleContexts, NoMonomorphismRestriction,
ViewPatterns, FlexibleInstances #-}
module Language.Lisk.Parser where
import Data.List
import Data.Either
import Control.Monad.Reader
import Control.Monad.Error
import Control.Arrow
import Control.Applicative
import Control.Monad.Identity
import Da... | aculich/lisk | src/Language/Lisk/Parser.hs | bsd-3-clause | 6,812 | 0 | 18 | 1,569 | 2,211 | 1,097 | 1,114 | 191 | 2 |
module Chap7Arith4 where
--id :: a -> a
--id x = x
roundTrip :: (Show a, Read a) => a -> a
roundTrip a = read (show a)
-- 5.
roundTrip' :: (Show a, Read a) => a -> a
roundTrip' = read . show
-- 6.
-- Probably not be what the exercise is looking for
roundTrip'' :: (Show a, Read b, Integral b) => a -> b
roundTrip'... | tkasu/haskellbook-adventure | app/Chap7Arith4.hs | bsd-3-clause | 431 | 0 | 9 | 105 | 175 | 91 | 84 | 12 | 1 |
import Test.Hspec
import System.Directory
import Lib
main :: IO ()
main = hspec $ do
describe "Foo" $ do
it "Return a foo file" $ do
m
res <- doesFileExist "foo"
res `shouldBe` True
| lpaulmp/shake-ansible | test/Spec.hs | bsd-3-clause | 208 | 0 | 15 | 60 | 75 | 36 | 39 | 10 | 1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
-}
{-# LANGUAGE CPP #-}
module VarSet (
-- * Var, Id and TyVar set types
VarSet, IdSet, TyVarSet, CoVarSet, TyCoVarSet,
-- ** Manipulating these sets
emptyVarSet, unitVarSet, mkVarSet,
... | vikraman/ghc | compiler/basicTypes/VarSet.hs | bsd-3-clause | 11,246 | 0 | 10 | 2,517 | 1,959 | 1,139 | 820 | 188 | 1 |
module System.Win32.DHCP.SUBNET_ELEMENT_INFO_ARRAY_V4
( SUBNET_ELEMENT_INFO_ARRAY_V4 (..)
, infoArray
) where
import System.Win32.DHCP.DhcpStructure
import System.Win32.DHCP.LengthBuffer
import System.Win32.DHCP.SUBNET_ELEMENT_DATA_V4
-- typedef struct _DHCP_SUBNET_ELEMENT_INFO_ARRAY_V4 {
-- DWORD ... | mikesteele81/Win32-dhcp-server | src/System/Win32/DHCP/SUBNET_ELEMENT_INFO_ARRAY_V4.hs | bsd-3-clause | 883 | 0 | 8 | 106 | 116 | 69 | 47 | 13 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE RankNTypes #-}
module Text.Markdown
( -- * Functions
markdown
-- * Settings
, MarkdownSettings
, msXssProtect
, msStandaloneHtml
, msFencedHandlers
, msBlockCodeRenderer
, msLinkNewTab
... | thefalconfeat/markdown | Text/Markdown.hs | bsd-3-clause | 6,541 | 0 | 19 | 1,806 | 2,232 | 1,141 | 1,091 | 147 | 21 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Monad
import Data.ByteString.Char8 (ByteString)
import Foreign.C.Types
import HROOT
main :: IO ()
main = do
tcanvas <- newTCanvas ("Test" :: ByteString) ("Test" :: ByteString) 640 480
h1 <- newTH1F ("test" :: ByteString) ("test" :: ByteString... | wavewave/HROOT-generate | HROOT-generate/template/HROOT/example/random1d.hs | gpl-3.0 | 910 | 0 | 15 | 225 | 343 | 170 | 173 | 28 | 1 |
{-# OPTIONS_GHC -funbox-strict-fields #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeSynonymInstances #-}
module SimpleTest.Interact
( -- * TestInteraction type and commands
TestInter... | bbangert/push-tester | spTester/SimpleTest/Interact.hs | mpl-2.0 | 14,577 | 0 | 15 | 3,731 | 3,441 | 1,844 | 1,597 | 295 | 2 |
{-# LANGUAGE OverloadedStrings #-}
-- Module : Test.AWS.CodeCommit
-- Copyright : (c) 2013-2015 Brendan Hay
-- License : This Source Code Form is subject to the terms of
-- the Mozilla Public License, v. 2.0.
-- A copy of the MPL can be found in the LICENSE file or
-- ... | fmapfmapfmap/amazonka | amazonka-codecommit/test/Test/AWS/CodeCommit.hs | mpl-2.0 | 752 | 0 | 5 | 201 | 73 | 50 | 23 | 11 | 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="ko-KR">
<title>Tips and Tricks | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<ma... | veggiespam/zap-extensions | addOns/tips/src/main/javahelp/org/zaproxy/zap/extension/tips/resources/help_ko_KR/helpset_ko_KR.hs | apache-2.0 | 977 | 80 | 66 | 161 | 417 | 211 | 206 | -1 | -1 |
{-# OPTIONS_GHC -fno-implicit-prelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Dotnet
-- Copyright : (c) sof, 2003
-- License : see libraries/base/LICENSE
--
-- Maintainer : cvs-ghc@haskell.org
-- Stability : internal
-- Portability : no... | FranklinChen/hugs98-plus-Sep2006 | packages/base/GHC/Dotnet.hs | bsd-3-clause | 1,819 | 10 | 15 | 366 | 441 | 237 | 204 | -1 | -1 |
-- |
-- Module : Crypto.ConstructHash.MiyaguchiPreneel
-- License : BSD-style
-- Maintainer : Kei Hibino <ex8k.hibino@gmail.com>
-- Stability : experimental
-- Portability : unknown
--
-- Provide the hash function construction method from block cipher
-- <https://en.wikipedia.org/wiki/One-way_compression_fu... | vincenthz/cryptonite | Crypto/ConstructHash/MiyaguchiPreneel.hs | bsd-3-clause | 2,286 | 0 | 12 | 576 | 487 | 273 | 214 | 38 | 1 |
module Control.Concurrent.Timer.Types
( Timer(..)
, TimerImmutable(..)
) where
------------------------------------------------------------------------------
import Control.Concurrent (ThreadId)
import Control.Concurrent.MVar (MVar)
import Control.Concurrent.Suspend (Delay)
---... | Palmik/timers | src/Control/Concurrent/Timer/Types.hs | bsd-3-clause | 938 | 0 | 13 | 170 | 126 | 80 | 46 | 12 | 0 |
-- |
-- Module: Network.FastIRC.Users
-- Copyright: (c) 2010 Ertugrul Soeylemez
-- License: BSD3
-- Maintainer: Ertugrul Soeylemez <es@ertes.de>
-- Stability: alpha
--
-- This module includes parsers for IRC users.
module Network.FastIRC.Users
( UserSpec(..),
userIsServer,
showUserSpec,
userPars... | chrisdone/hulk | fastirc-0.2.0/Network/FastIRC/Users.hs | bsd-3-clause | 1,522 | 0 | 13 | 316 | 334 | 187 | 147 | 31 | 1 |
{-# LANGUAGE DeriveFunctor #-}
module Distribution.Solver.Modular.Flag
( FInfo(..)
, Flag
, FlagInfo
, FN(..)
, QFN
, QSN
, SN(..)
, WeakOrTrivial(..)
, mkFlag
, showFBool
, showQFN
, showQFNBool
, showQSN
, showQSNBool
) where
import Data.Map as M
import Pre... | kolmodin/cabal | cabal-install/Distribution/Solver/Modular/Flag.hs | bsd-3-clause | 2,796 | 0 | 8 | 577 | 695 | 391 | 304 | 55 | 1 |
{-# LANGUAGE CPP, MagicHash, UnboxedTuples #-}
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -O -funbox-strict-fields #-}
-- We always optimise this, otherwise performance of a non-optimised
-- compiler is severely affected
--
-- (c) The University of Glasgow 2002-2006
--
-- Binary I/O library, with special twea... | AlexanderPankiv/ghc | compiler/utils/Binary.hs | bsd-3-clause | 29,290 | 0 | 19 | 9,690 | 9,152 | 4,421 | 4,731 | 657 | 2 |
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__
{-# LANGUAGE MagicHash #-}
#endif
#if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703
{-# LANGUAGE Trustworthy #-}
#endif
-----------------------------------------------------------------------------
-- |
-- Module : Data.BitUtil
-- Copyright : (c) Clark Gaebel 2012... | ariep/psqueues | src/Data/BitUtil.hs | bsd-3-clause | 2,071 | 0 | 10 | 464 | 269 | 173 | 96 | 17 | 1 |
yes = mapMaybe id | mpickering/hlint-refactor | tests/examples/Default72.hs | bsd-3-clause | 17 | 0 | 5 | 3 | 9 | 4 | 5 | 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="sr-CS">
<title>Encode/Decode/Hash Add-on</title>
<maps>
<homeID>encoder</homeID>
<mapre... | thc202/zap-extensions | addOns/encoder/src/main/javahelp/org/zaproxy/addon/encoder/resources/help_sr_CS/helpset_sr_CS.hs | apache-2.0 | 974 | 77 | 69 | 156 | 419 | 212 | 207 | -1 | -1 |
module Options.Phases where
import Types
phaseOptions :: [Flag]
phaseOptions =
[ flag { flagName = "-F"
, flagDescription =
"Enable the use of a :ref:`pre-processor <pre-processor>` "++
"(set with ``-pgmF``)"
, flagType = DynamicFlag
}
, flag { flagName = "-E"
... | ml9951/ghc | utils/mkUserGuidePart/Options/Phases.hs | bsd-3-clause | 1,021 | 0 | 8 | 335 | 164 | 106 | 58 | 24 | 1 |
{-# LANGUAGE Unsafe #-}
{-# LANGUAGE NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.ForeignPtr
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : ... | lukexi/ghc | libraries/base/Foreign/ForeignPtr.hs | bsd-3-clause | 1,306 | 0 | 4 | 327 | 83 | 62 | 21 | 20 | 0 |
{-# LANGUAGE FunctionalDependencies, PolyKinds, FlexibleInstances #-}
module T10570 where
import Data.Proxy
class ConsByIdx2 x a m cls | x -> m where
consByIdx2 :: x -> a -> m cls
instance ConsByIdx2 Int a Proxy cls where
consByIdx2 _ _ = Proxy
| urbanslug/ghc | testsuite/tests/polykinds/T10570.hs | bsd-3-clause | 257 | 0 | 9 | 54 | 71 | 38 | 33 | -1 | -1 |
{-# LANGUAGE NamedWildCards, ScopedTypeVariables #-}
module WildcardsInPatternAndExprSig where
bar (Just ([x :: _a] :: _) :: Maybe [_b]) (z :: _c) = [x, z] :: [_d]
| urbanslug/ghc | testsuite/tests/partial-sigs/should_fail/WildcardsInPatternAndExprSig.hs | bsd-3-clause | 165 | 0 | 12 | 27 | 64 | 37 | 27 | 3 | 1 |
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ScopedTypeVariables #-}
module TypeLits
(
-- * Types
Scalar,
Vector,
Matrix,
... | epsilonhalbe/accelerate-typelits | bench/Data/Array/Accelerate/TypeLits.hs | isc | 11,445 | 0 | 16 | 4,259 | 2,608 | 1,442 | 1,166 | 136 | 2 |
{-# LANGUAGE UnicodeSyntax #-}
module Pixs.Operations.PointOperations where
import Pixs.Information.Histogram (colorCount)
import Codec.Picture (Image, PixelRGBA8(..),
pixelAt, generateImage,
... | ayberkt/pixs | src/Pixs/Operations/PointOperations.hs | mit | 2,041 | 0 | 20 | 638 | 316 | 184 | 132 | 19 | 2 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module LDAP.Classy.Types where
import Control... | benkolera/haskell-ldap-classy | LDAP/Classy/Types.hs | mit | 689 | 0 | 6 | 169 | 148 | 85 | 63 | 17 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE CPP #-}
-- | Various utilities used in the scaffolded site.
module Yesod.Default.Util
( addStaticContentExternal
, globFile
, widgetFileNoReload
, widgetFileReload
, TemplateLanguage (..)
, defaultTemplateLanguages
... | tolysz/yesod | yesod/Yesod/Default/Util.hs | mit | 5,460 | 0 | 19 | 1,274 | 1,293 | 693 | 600 | 110 | 3 |
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, CPP, DeriveDataTypeable, FlexibleContexts, GeneralizedNewtypeDeriving, MultiParamTypeClasses, TemplateHaskell, TypeFamilies, RecordWildCards #-}
import Control.Applicative ((<$>), optional)
import Control.Exception ( bracket )
import Control.Monad ( msum, forM_, map... | jpschaumloeffel/sr5gm | sr5gm/sr5gm.hs | mit | 4,167 | 37 | 21 | 819 | 1,395 | 757 | 638 | 100 | 1 |
{-# LANGUAGE OverloadedStrings #-}
import Data.Hash.MD5
import qualified Database.Redis as R
import qualified Data.ByteString.Char8 as B
import qualified Data.ByteString.Lazy.Char8 as BL
import Web.Scotty
import Network.HTTP.Types
import Control.Monad.Trans (liftIO)
import qualified Data.Text.Lazy.Encoding as TL
import... | EDmitry/shortener-hs | shortener.hs | mit | 2,150 | 0 | 19 | 669 | 707 | 363 | 344 | 45 | 4 |
import Control.Monad.Reader
data Expr
= Val Int
| Add Expr Expr
| Var String
deriving (Show)
type Env = [(String, Int)]
type Eval a = ReaderT Env Maybe a
eval :: Expr -> Eval Int
eval (Val n) = return n
eval (Add x y) = liftM2 (+) (eval x) (eval y)
eval (Var x) = do
env <- ask
val <- lift (lookup x env)
... | riwsky/wiwinwlh | src/transformer.hs | mit | 527 | 4 | 11 | 128 | 300 | 152 | 148 | 22 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Data.Time.Calendar.BankHolidaySpec (spec) where
import Data.Time
import Data.Time.Calendar.BankHoliday (isWeekday, isWeekend)
import Test.Hspec
spec :: Spec
spec = do
describe "isWeekday" $ do
it "is accurate" $ do
all (\d -> isWeekday d) [
(fromGregori... | tippenein/BankHoliday | test/Data/Time/Calendar/BankHolidaySpec.hs | mit | 911 | 0 | 16 | 282 | 309 | 164 | 145 | 27 | 1 |
module Aldus.Types where
| lgastako/aldus | src/Aldus/Types.hs | mit | 26 | 0 | 3 | 4 | 6 | 4 | 2 | 1 | 0 |
module Net.TFTP_Client(tftpGet,tftpPut) where
-- TFTP Client, protocol described in RFC 1350
-- See http://www.networksorcery.com/enp/rfc/rfc1350.txt
import Net.Concurrent
import Net.UDP_Client as UDP(Packet(..),template,listenAny,unlisten)
import qualified Net.PortNumber as Port
import Net.TFTP
import qualified Net... | nh2/network-house | Net/TFTP_Client.hs | gpl-2.0 | 4,050 | 67 | 20 | 1,208 | 1,072 | 591 | 481 | 95 | 8 |
{-# LANGUAGE TypeSynonymInstances #-}
{- |
Module : $Header$
Description : Abstract syntax for common logic
Copyright : (c) Karl Luc, DFKI Bremen 2010, Eugen Kuksa and Uni Bremen 2011
License : GPLv2 or higher, see LICENSE.txt
Maintainer : eugenk@informatik.uni-bremen.de
Stability : provisional
Por... | nevrenato/Hets_Fork | CommonLogic/AS_CommonLogic.hs | gpl-2.0 | 13,154 | 0 | 13 | 3,451 | 4,044 | 2,024 | 2,020 | 307 | 5 |
{-# LANGUAGE OverloadedStrings, CPP, ScopedTypeVariables #-}
{-
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 Lice... | Twinside/pandoc | src/Text/Pandoc/PDF.hs | gpl-2.0 | 9,647 | 0 | 24 | 2,623 | 2,358 | 1,222 | 1,136 | 179 | 6 |
module GRPSafety
( isSafe
, getSafeLines
, getSafetyPrefix
, dropSafetyPrefix
) where
import Data.List (isInfixOf)
import Data.Maybe
import Debug.Trace
--This Module deals with the safety prefix of genomes
-- (The source code up to "safeLines = n", designed to prevent careless change to the Genome's boil... | vektordev/GP | src/GRPSafety.hs | gpl-2.0 | 2,467 | 2 | 17 | 471 | 531 | 290 | 241 | 37 | 4 |
module Main where
import System.Environment
import System.Exit
import Text.EditDistance
main :: IO ()
main = do
args <- getArgs
(fn1, fn2) <- case args of
[fn1,fn2] -> return (fn1, fn2)
_ -> putStrLn "Usage: textdist file1 file2" >> exitFailure
f1 <- readFrom fn1
f2 <- read... | alanfalloon/textdist | Main.hs | gpl-3.0 | 478 | 0 | 12 | 122 | 165 | 82 | 83 | 17 | 2 |
import Test.QuickCheck
import Data.List
myPack' :: Eq a => [[a]] -> [a] -> [[a]]
myPack' p [] = p
myPack' [] x = myPack' [[head x]] (tail x)
myPack' p x =
case (head x) == (last . last $ p) of
True -> myPack' (init p ++ [last p ++ [head x]]) (tail x)
False -> myPack' (p ++ [[head x]]) (tail x)
myPack :: Eq a => ... | CmdrMoozy/haskell99 | 009.hs | gpl-3.0 | 452 | 2 | 14 | 104 | 281 | 145 | 136 | 14 | 2 |
module Control.Concurrent.Utils
( forkIOUnmasked, runAfter, asyncThrowTo, forwardExceptions, withForkedIO
) where
import Control.Concurrent (ThreadId, forkIOWithUnmask, threadDelay, myThreadId)
import qualified Control.Exception as E
import Control.Lens.Operators
import Control.Mo... | da-x/lamdu | bottlelib/Control/Concurrent/Utils.hs | gpl-3.0 | 1,100 | 0 | 12 | 266 | 342 | 177 | 165 | 27 | 1 |
{-
Copyright (C) 2008 John Goerzen <jgoerzen@complete.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
... | jgoerzen/tarfilter | Commands/Cat.hs | gpl-3.0 | 3,884 | 0 | 15 | 1,027 | 829 | 412 | 417 | 63 | 4 |
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Nirum.TypeInstance.BoundModuleSpec where
import Data.Proxy
import Test.Hspec.Meta
import Text.InterpolatedString.Perl6 (qq)
import Nirum.Constructs.Annotation hiding (docs)
import Nirum.Constructs.Declaration
im... | spoqa/nirum | test/Nirum/TypeInstance/BoundModuleSpec.hs | gpl-3.0 | 2,920 | 0 | 17 | 736 | 812 | 415 | 397 | 61 | 1 |
import Data.Binary
import qualified Data.ByteString.Lazy as BS
makeInterval :: (Integer, Integer) -> IO ()
makeInterval (a, b) = do
let x = encode (a, b)
BS.writeFile (show a ++ "_" ++ show b ++ ".raw") x
makeMany :: [Integer] -> IO ()
makeMany (x:(y:xs)) = do
makeInterval (x+1, y)
makeMany (y:xs)
ma... | GDCN/GDCN | GDCN_proj/dGDCN/jobs/Job1/resources/GeneratePrimeIndata.hs | gpl-3.0 | 341 | 0 | 12 | 75 | 179 | 93 | 86 | 11 | 1 |
import Colouring
import Control.Monad(liftM)
main = do
putStrLn "Means of 100 runs each"
putStr "G(100,0.4) : "
print =<< (liftM mean $ sampleIndSetColour 100 $ randomGraph 100 0.4)
putStr "G(100,0.5) : "
print =<< (liftM mean $ sampleIndSetColour 100 $ randomGraph 100 0.5)
putStr "G(100,0.6) : "
print =<< (lif... | jamii/homework | 17-1/Main.hs | gpl-3.0 | 714 | 1 | 13 | 125 | 269 | 118 | 151 | 16 | 1 |
{-# LANGUAGE DeriveDataTypeable, TypeFamilies, TypeOperators,
FlexibleContexts #-}
module Main where
import Control.Monad
import Data.List
import Data.Yaml
import Flow
import Flow.Builder ( rule )
import Flow.Kernel
import Kernel.Binning
import Kernel.Cleaning
import Kernel.Data
import Kernel.Degrid
i... | SKA-ScienceDataProcessor/RC | MS6/programs/continuum.hs | apache-2.0 | 12,331 | 0 | 28 | 2,846 | 3,360 | 1,623 | 1,737 | 194 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Openshift.Unversioned.ListMeta where
import GHC.Generics
import Data.Text
import qualified Data.Aeson
-- | ListMeta describes metadata that sy... | minhdoboi/deprecated-openshift-haskell-api | openshift/lib/Openshift/Unversioned/ListMeta.hs | apache-2.0 | 1,103 | 0 | 9 | 159 | 93 | 56 | 37 | 15 | 0 |
{- MathHmatrix.hs
- Mapping of Linear algebra routines via the hMatrix library.
- hMatrix uses GSL and a BLAS implementation such as ATLAS.
-
- Timothy A. Chagnon
- CS 636 - Spring 2009
-}
module MathHmatrix where
import Numeric.LinearAlgebra
deg2rad :: RealT -> RealT
deg2rad d = d * pi / 180
type RealT = Doub... | tchagnon/cs636-raytracer | a1/MathHmatrix.hs | apache-2.0 | 1,933 | 0 | 13 | 465 | 846 | 460 | 386 | 58 | 2 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE UnboxedTuples #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable #-}... | markus1189/discrimination | src/Data/Discrimination/Internal/WordMap.hs | bsd-2-clause | 7,597 | 0 | 18 | 1,749 | 2,851 | 1,394 | 1,457 | 202 | 4 |
{-| Module describing an instance.
The instance data type holds very few fields, the algorithm
intelligence is in the "Node" and "Cluster" modules.
-}
{-
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are ... | apyrgio/snf-ganeti | src/Ganeti/HTools/Instance.hs | bsd-2-clause | 13,964 | 0 | 20 | 3,572 | 2,755 | 1,541 | 1,214 | 236 | 7 |
{-# LANGUAGE BangPatterns #-}
{-|
Convenience 'Pipe's, analogous to those in "Control.Pipe.List", for 'Pipe's
containing binary data.
-}
module Control.Pipe.Binary
( -- * Producers
produce
-- ** Infinite streams
, iterate
, iterateM
, repeat
, repeatM
-- ** Bounded streams
... | duairc/pipes | src/Control/Pipe/Binary.hs | bsd-3-clause | 11,736 | 0 | 17 | 2,403 | 2,635 | 1,384 | 1,251 | 177 | 2 |
{-# LANGUAGE TemplateHaskell #-}
module Database.Sqroll.TH (
initializeAllTablesDec
) where
import Database.Sqroll.Internal (Sqroll, HasTable, sqrollInitializeTable)
import Data.Maybe
import Language.Haskell.TH
-- | create a function 'initializeAllTables :: Sqroll -> IO ()' that, when run,
-- will initialize table... | pacak/sqroll | src/Database/Sqroll/TH.hs | bsd-3-clause | 1,364 | 0 | 12 | 260 | 268 | 148 | 120 | 19 | 1 |
{-# LANGUAGE RankNTypes, GADTs,
MultiParamTypeClasses, FlexibleInstances, FlexibleContexts, AllowAmbiguousTypes #-}
module HLib61
where
import Control.Category ((>>>))
import Control.Monad ((>=>))
import Data.Dynamic
type UserInput = String
class (Read n, Show n) => Serializable n
instance forall n. (Read n, Show n... | homam/fsm-conversational-ui | src/HLib61.hs | bsd-3-clause | 4,576 | 0 | 12 | 982 | 1,429 | 777 | 652 | -1 | -1 |
module Evolution.Internal
( EvolutionRules
( EvolutionRules
, mutation
, breeding
, selection
, deaths
, expression
, optimumForGeneration
)
, evolution
) where
import Data.Random
import Data.Functor ()
import In... | satai/FrozenBeagle | Simulation/Lib/src/Evolution/Internal.hs | bsd-3-clause | 1,805 | 0 | 14 | 596 | 468 | 244 | 224 | 57 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{- |
Module : Verifier.SAW.Cryptol.Monadify
Cop... | GaloisInc/saw-script | cryptol-saw-core/src/Verifier/SAW/Cryptol/Monadify.hs | bsd-3-clause | 48,330 | 0 | 19 | 9,597 | 10,733 | 5,490 | 5,243 | -1 | -1 |
module HEP.Data.LHEF.Type where
import Data.IntMap (IntMap)
import HEP.Kinematics (HasFourMomentum (..))
import HEP.Kinematics.Vector.LorentzVector (setXYZT)
data EventInfo = EventInfo
{ nup :: Int -- ^ Number of partic... | cbpark/lhef-tools | src/HEP/Data/LHEF/Type.hs | bsd-3-clause | 2,679 | 0 | 10 | 1,016 | 594 | 373 | 221 | 43 | 0 |
{-# LANGUAGE QuasiQuotes, TypeFamilies #-}
import Prelude hiding (product, sum)
import Text.Papillon
import Data.Char
import System.Environment
main :: IO ()
main = do
arg : _ <- getArgs
case expr $ parse arg of
Right (r, _) -> print r
Left _ -> putStrLn "parse error"
[papillon|
value :: Int
= ds:(d:[isDigit... | YoshikuniJujo/papillon | examples/arith_old.hs | bsd-3-clause | 618 | 0 | 11 | 149 | 106 | 56 | 50 | 12 | 2 |
{-# LANGUAGE TypeFamilies #-}
module Network.EasyBitcoin.Internal.Transaction
where
import Network.EasyBitcoin.Internal.Words
import Network.EasyBitcoin.Internal.Base58 ( encodeBase58
, decodeBase58
, addRedundancy
... | vwwv/easy-bitcoin | Network/EasyBitcoin/Internal/Transaction.hs | bsd-3-clause | 12,007 | 0 | 15 | 4,634 | 2,461 | 1,283 | 1,178 | 208 | 2 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Numeric.Units.Dimensional.DK.HaTeX
where
import Text.LaTeX.Base
import Numeric.Units.Dimensional.DK
instance (Texy v, KnownDimension d, Fractional v) => Texy (Quantity d v) where
texy val = texy (val... | bjornbm/dimensional-dk-experimental | src/Numeric/Units/Dimensional/DK/HaTeX.hs | bsd-3-clause | 332 | 0 | 8 | 46 | 80 | 47 | 33 | 8 | 0 |
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
module FunPtr where
import Ivory.Compile.C.CmdlineFrontend
import Ivory.Language
f :: Def ('[Sint32] :-> Sint32)
f = proc "f" (\ n -> body (ret (n + 1)))
invoke :: Def ('[ ProcPtr ('[Sint32] :-> Sint32), Sint32] :-> Sint32)
invoke = proc "invoke" (\ k n ->... | Hodapp87/ivory | ivory-examples/examples/FunPtr.hs | bsd-3-clause | 628 | 0 | 14 | 122 | 270 | 143 | 127 | 18 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
-- |
-- Module: $HEADER$
-- Description: Type alias for case insensitive strict text.
-- Copyright: (c) 2014 Peter Trsko
-- License: BSD3
--
-- Maintainer: peter.trsko@gmail.com
-- Stability: experimental
-- Portability: NoImplicitPrelude
--
-- Type alias for case... | trskop/skeletos | src/Skeletos/Type/CIText.hs | bsd-3-clause | 544 | 0 | 6 | 96 | 59 | 42 | 17 | 5 | 0 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.SGIX.BlendAlphaMinmax
-- Copyright : (c) Sven Panne 2015
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : portab... | phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/SGIX/BlendAlphaMinmax.hs | bsd-3-clause | 689 | 0 | 4 | 81 | 40 | 33 | 7 | 4 | 0 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, DeriveFunctor,
DeriveDataTypeable, TypeSynonymInstances, PatternGuards #-}
module Idris.AbsSyntaxTree where
import Idris.Core.TT
import Idris.Core.Evaluate
import Idris.Core.Elaborate hiding (Tactic(..))
import Idris.Core.Typecheck
import Idris.Docst... | athanclark/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | 95,914 | 728 | 49 | 30,789 | 31,057 | 16,368 | 14,689 | 1,708 | 94 |
module MainSpec (main, spec) where
import Test.Hspec
import Test.HUnit (assertEqual, Assertion)
import Control.Exception
import System.Directory (getCurrentDirectory, setCurrentDirectory)
import System.FilePath
import Runner (Summary(..))
import Ru... | ekmett/doctest | test/MainSpec.hs | mit | 4,830 | 0 | 16 | 1,269 | 1,268 | 610 | 658 | 122 | 1 |
module Lamdu.Data.Db
( withDB, ImplicitFreshDb(..)
) where
import Control.Exception (onException)
import qualified Lamdu.Data.Db.Init as DbInit
import Lamdu.Data.Db.Layout (DbM(..), ViewM, curDbSchemaVersion)
import Lamdu.Data.Export.JSON (fileImportAll)
import qualified Lamdu.Pat... | lamdu/lamdu | src/Lamdu/Data/Db.hs | gpl-3.0 | 1,851 | 0 | 16 | 481 | 455 | 249 | 206 | 39 | 1 |
class GeenWhere a
| roberth/uu-helium | test/typeClassesParse/ClassEmptyWhere.hs | gpl-3.0 | 26 | 0 | 5 | 11 | 8 | 3 | 5 | -1 | -1 |
{-
Copyright 2012-2013 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed t... | kustomzone/plush | src/Plush/Job.hs | apache-2.0 | 10,433 | 0 | 22 | 2,727 | 2,679 | 1,348 | 1,331 | 181 | 9 |
{-# OPTIONS -Wall #-}
module Examples.HMM where
import Prelude hiding (Real)
import Language.Hakaru.Syntax
import Language.Hakaru.Expect (Expect(..))
import Language.Hakaru.Sample (Sample(..))
import System.Random.MWC (withSystemRandom)
import Control.Monad (replicateM)
import Data.Number.LogFloat (LogFloat)
-- Cond... | bitemyapp/hakaru | Examples/HMM.hs | bsd-3-clause | 4,483 | 0 | 19 | 1,281 | 1,216 | 641 | 575 | 67 | 1 |
module HLearn.Models.Classifiers.Perceptron
where
import qualified Data.Map as Map
import qualified Data.Vector.Unboxed as VU
import HLearn.Algebra
import HLearn.Models.Distributions
import HLearn.Models.Classifiers.Common
import HLearn.Models.Classifiers.Centroid
import HLearn.Models.Classifiers.NaiveNN
-------... | iamkingmaker/HLearn | src/HLearn/Models/Classifiers/Perceptron.hs | bsd-3-clause | 2,296 | 0 | 11 | 497 | 378 | 225 | 153 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
-- | Likes handling
-- <http://instagram.com/developer/endpoints/likes/#>
module Instagram.Likes (
getLikes
,like
,unlike
)where
import Instagram.Monad
import Instagram.Types
import qualified Network.HTTP.Types as HT
-- | Get a list of users who have liked this media.
getLike... | potomak/ig | src/Instagram/Likes.hs | bsd-3-clause | 1,068 | 0 | 11 | 171 | 279 | 156 | 123 | 20 | 1 |
-------------------------------------------------------------------------------
-- |
-- Module : OpenAI.Gym.Data
-- License : BSD3
-- Stability : experimental
-- Portability: non-portable
-------------------------------------------------------------------------------
module Data.Gym
where
{-
( GymEnv (..)
... | stites/reinforce | reinforce-environments/src/Data/Gym.hs | bsd-3-clause | 3,572 | 0 | 3 | 913 | 14 | 12 | 2 | 1 | 0 |
-- | Interface to the management event bus.
module Control.Distributed.Process.Management.Internal.Bus
( publishEvent
) where
import Control.Distributed.Process.Internal.CQueue
( enqueue
)
import Control.Distributed.Process.Internal.Types
( MxEventBus(..)
, Message
)
import Data.Foldable (forM_)
import S... | qnikst/distributed-process | src/Control/Distributed/Process/Management/Internal/Bus.hs | bsd-3-clause | 571 | 0 | 9 | 93 | 155 | 88 | 67 | 14 | 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="sr-SP">
<title>Groovy Support</title>
<maps>
<homeID>top</homeID>
<mapref location="map... | thc202/zap-extensions | addOns/groovy/src/main/javahelp/org/zaproxy/zap/extension/groovy/resources/help_sr_SP/helpset_sr_SP.hs | apache-2.0 | 959 | 82 | 52 | 156 | 390 | 206 | 184 | -1 | -1 |
-- Refactoring: move myFringe to module D3. This example aims to test the change of qualifiers,
-- and the import/exports.
module C3(Tree(..), SameOrNot(..)) where
data Tree a = Leaf a | Branch (Tree a) (Tree a)
sumTree:: (Num a) => Tree a -> a
sumTree (Leaf x ) = x
sumTree (Branch left right) = sumTree left + su... | SAdams601/HaRe | old/testing/moveDefBtwMods/C3_TokOut.hs | bsd-3-clause | 500 | 0 | 8 | 120 | 183 | 98 | 85 | 11 | 1 |
import Control.Concurrent
import Control.Exception
-- Test blocking of async exceptions in an exception handler.
-- The exception raised in the main thread should not be delivered
-- until the first exception handler finishes.
main = do
main_thread <- myThreadId
m <- newEmptyMVar
forkIO (do { takeMVar m; throwT... | tjakway/ghcjvm | testsuite/tests/concurrent/should_run/conc014.hs | bsd-3-clause | 864 | 4 | 21 | 185 | 243 | 122 | 121 | 17 | 1 |
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies,
FlexibleInstances, UndecidableInstances #-}
-- UndecidableInstances now needed because the Coverage Condition fails
module ShouldFail where
-- A stripped down functional-dependency
-- example that causes GHC 4.08.1 to crash with:
-- "basicTypes... | lukexi/ghc-7.8-arm64 | testsuite/tests/typecheck/should_fail/tcfail093.hs | bsd-3-clause | 1,075 | 0 | 7 | 227 | 121 | 71 | 50 | 10 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.