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 Trustworthy #-}
{-# LANGUAGE CPP, NoImplicitPrelude, CApiFFI #-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
-- Module : System.Posix.Internals
-- Copyright : (c) The University of Glasgow, 1992-2002
-- License : see librari... | alexander-at-github/eta | libraries/base/System/Posix/Internals.hs | bsd-3-clause | 22,117 | 31 | 20 | 4,362 | 3,521 | 1,865 | 1,656 | -1 | -1 |
-- |
-- Module: Language.KURE
-- Copyright: (c) 2006-2008 Andy Gill
-- License: BSD3
--
-- Maintainer: Andy Gill <andygill@ku.edu>
-- Stability: unstable
-- Portability: ghc
--
-- This is the main import module for KURE, which exports all the major components.
--
--
module Language.KURE
( module Language.KURE.Rewrit... | andygill/kure | Language/KURE.hs | bsd-3-clause | 621 | 4 | 5 | 82 | 89 | 64 | 25 | 11 | 0 |
module Text.Phidoc
( relink
, walk
, FileContent (..)
) where
import Text.Phidoc.Paths (relink)
import Text.Phidoc.Walk (FileContent (..), walk)
| Alxandr/Phidoc | src/Text/Phidoc.hs | bsd-3-clause | 175 | 0 | 6 | 49 | 50 | 33 | 17 | 6 | 0 |
{-# LANGUAGE OverloadedStrings,TemplateHaskell, QuasiQuotes #-}
module Text.Shakespeare.TemplateSpec (main, spec) where
import Text.Shakespeare.Template
import Test.Hspec
import Text.Hamlet
import Text.Blaze.Html.Renderer.Pretty
-- toStrict.renderHtml $ [shamlet|
main :: IO ()
main = hspec spec
spec :: Spec
spec = d... | plow-technologies/shakespeare-template | test/Text/Shakespeare/TemplateSpec.hs | bsd-3-clause | 979 | 0 | 16 | 184 | 203 | 114 | 89 | 21 | 1 |
-- {-# LANGUAGE FlexibleContexts #-}
module Main where
import qualified PatternRecogn.LinearRegression as LinearReg
import qualified AbstractTest as Test
import qualified LoadTestData as Load
import Utils( allPairs )
import Types
import PatternRecogn.Types
import Control.Monad.Random()
import Data.List( intercalate ... | EsGeh/pattern-recognition | test/LinearRegressionTest.hs | bsd-3-clause | 1,354 | 24 | 13 | 231 | 389 | 208 | 181 | 36 | 1 |
--This prime algorithm was taken from stack overflow. It's basically a sieve that is of O(1.5)
primes :: [Integer]
primes = 2: 3: sieve (tail primes) [5,7..]
where
sieve (p:ps) xs = h ++ sieve ps [x | x <- t, x `rem` p /= 0]
-- or: filter ((/=0).(`rem`p)) t
where (... | thomas-oo/projectEulerHaskell | src/Problem10.hs | bsd-3-clause | 397 | 0 | 12 | 121 | 149 | 81 | 68 | 5 | 1 |
{-# LANGUAGE InstanceTemplates, RebindableSyntax, MultiParamTypeClasses #-}
-- This is a sketch of what this code would look like with -XInstanceTemplates
import Prelude ( ($), (.), (>>), (>=) )
import qualified Prelude as P
class Addable a where (+) :: a -> a -> a
class Multiplicable a where (*) ... | mgsloan/instance-templates | tests/numeric/WithExt.hs | bsd-3-clause | 3,186 | 32 | 12 | 938 | 1,063 | 567 | 496 | -1 | -1 |
module PolyPaver.Subterms
(
addHashesInForm,
addHashesInTerm,
TermHash
)
where
import PolyPaver.Form
import qualified Data.IntMap as IMap
import Data.Hashable
--import Data.Data (Data, Typeable)
--import Data.List (intercalate, sortBy)
type TermHash = Int
addHashesInForm ::
(Hashable l, Eq l) =>... | michalkonecny/polypaver | src/PolyPaver/Subterms.hs | bsd-3-clause | 4,751 | 0 | 12 | 1,604 | 1,634 | 778 | 856 | 104 | 37 |
{-# LANGUAGE RankNTypes, GADTs, TypeFamilies, TypeOperators, TemplateHaskell #-}
{-# LANGUAGE FlexibleInstances, FlexibleContexts, UndecidableInstances #-}
{-# LANGUAGE MultiParamTypeClasses, OverlappingInstances #-}
{-# LANGUAGE RecursiveDo #-}
-- {-# LANGUAGE NoMonomorphismRestriction #-}
module Hardware.HHDL.HHDL(
... | thesz/hhdl | src/Hardware/HHDL/HHDL.hs | bsd-3-clause | 44,643 | 1,391 | 48 | 9,006 | 17,192 | 9,001 | 8,191 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Main(main) where
import GHC.Driver.Session (getDynFlags)
import GHC.Driver.Monad (liftIO)
import GHC.Paths (libdir)
import GHC (runGhc, DynFlags)
import GHC.Utils.Outputable (Outputable)
import Test.Tasty
import Test.Tasty.HUnit
import GHC.SourceGen
import GhcVersion
data T... | google/ghc-source-gen | tests/pprint_test.hs | bsd-3-clause | 15,950 | 0 | 18 | 6,034 | 5,748 | 2,869 | 2,879 | 326 | 1 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE PartialTypeSignatures #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE ScopedTypeVari... | codygman/frames-diff | Frames/Time/Chicago/Columns.hs | bsd-3-clause | 6,043 | 1 | 15 | 1,407 | 1,240 | 692 | 548 | 91 | 1 |
-- |
-- Module : Data.Vector.Unboxed.Parallel
-- Copyright : [2011] Trevor L. McDonell
-- License : BSD3
--
-- Maintainer : Trevor L. McDonell <tmcdonell@cse.unsw.edu.au>
-- Stability : experimental
-- Portability : non-portable (GHC Extensions)
--
module Data.Vector.Unboxed.Parallel (
-- * Constructi... | tmcdonell/vector-parallel | Data/Vector/Unboxed/Parallel.hs | bsd-3-clause | 3,941 | 0 | 10 | 879 | 876 | 519 | 357 | 62 | 1 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Pact.Server.History.Persistence
( createDB
, insertCompletedCommand
, queryForExisting
, selectCompletedCommands
, selectAllCommands
, closeDB
) where
im... | kadena-io/pact | src-ghc/Pact/Server/History/Persistence.hs | bsd-3-clause | 5,800 | 0 | 16 | 1,165 | 1,583 | 803 | 780 | 119 | 3 |
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE RecordWildCards #-}
module Morra where
import Control.Monad.IO.Class
import Control.Monad.Trans.Class
import Control.Monad.Trans.State
import qualified Data.List as L
import Data.Mayb... | vasily-kirichenko/haskell-book | src/Transformers/Morra.hs | bsd-3-clause | 3,136 | 2 | 15 | 807 | 949 | 477 | 472 | 85 | 6 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
module Main where
import Data.Monoid ((<>))
import Data.Proxy (Proxy(..))
import qualified Data.ByteString.Lazy as BL
import SampleAPI (Shoppe1)
import Servant.StateGraph
import Servant.API
api :: Proxy Shoppe1
api = Proxy
m... | corajr/servant-state-graph | app/Main.hs | bsd-3-clause | 356 | 0 | 6 | 51 | 91 | 57 | 34 | 14 | 1 |
{-|
Module : Data.Algorithm.PPattern.Perm.Enumerate
Description : Short description
Copyright : (c) Laurent Bulteau, Romeo Rizzi, Stéphane Vialette, 2016-2017
License : MIT
Maintainer : vialette@gmaiList.com
Stability : experimental
Here is a longer description of this module, containing some
commentary ... | vialette/ppattern | src/Data/Algorithm/PPattern/Perm/Enumerate.hs | mit | 1,834 | 0 | 9 | 453 | 212 | 122 | 90 | 14 | 1 |
import Test.HUnit (Assertion, (@=?), runTestTT, Test(..), Counts(..))
import System.Exit (ExitCode(..), exitWith)
import BankAccount ( BankAccount, openAccount, closeAccount
, getBalance, incrementBalance )
import Control.Concurrent
import Control.Monad (void, replicateM)
{-
The BankAccount module s... | tfausak/exercism-solutions | haskell/bank-account/bank-account_test.hs | mit | 2,006 | 0 | 15 | 418 | 569 | 283 | 286 | 40 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Database.Persist.Sql.Util (
parseEntityValues
, entityColumnNames
, keyAndEntityColumnNames
, entityColumnCount
, isIdField
, hasCompositeKey
, dbIdColumns
, dbIdColumnsEsc
, dbColumns
, updateFieldDef
, updatePersistValue
, mkUpdateText
, mkUpdateTe... | plow-technologies/persistent | persistent/Database/Persist/Sql/Util.hs | mit | 4,682 | 0 | 17 | 1,019 | 1,382 | 722 | 660 | 101 | 7 |
{-# LANGUAGE TemplateHaskell #-}
--------------------------------------------------------------------------------
-- |
-- Module : Data.Comp.Multi.Derive.HFunctor
-- Copyright : (c) 2011 Patrick Bahr
-- License : BSD3
-- Maintainer : Patrick Bahr <paba@diku.dk>
-- Stability : experimental
-- Portabil... | spacekitteh/compdata | src/Data/Comp/Multi/Derive/HFunctor.hs | bsd-3-clause | 2,719 | 0 | 17 | 747 | 780 | 414 | 366 | -1 | -1 |
-- GSoC 2013 - Communicating with mobile devices.
{-# LANGUAGE OverloadedStrings #-}
-- | This Module define the main contants for sending Push Notifications through Apple Push Notification Service.
module Network.PushNotify.Apns.Constants where
import Data.Text
cLOCAL_URL :: String
cLOCAL_URL = "localhost"
cLOCA... | MarcosPividori/GSoC-Communicating-with-mobile-devices | push-notify/Network/PushNotify/Apns/Constants.hs | mit | 1,481 | 0 | 4 | 197 | 227 | 139 | 88 | 45 | 1 |
{-# LANGUAGE FlexibleContexts #-}
module CrawlPackage where
import Control.Arrow (second)
import Control.Monad.Except (MonadError, MonadIO, liftIO, throwError)
import qualified Data.Map as Map
import qualified Data.Maybe as Maybe
import System.Directory (doesFileExist, getCurrentDirectory, setCurrentDirectory)
import ... | JoeyEremondi/elm-make | src/CrawlPackage.hs | bsd-3-clause | 10,449 | 0 | 17 | 2,647 | 3,013 | 1,547 | 1,466 | 238 | 5 |
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
module InsertDuplicateUpdate where
import Data.List (... | gbwey/persistent | persistent-mysql/test/InsertDuplicateUpdate.hs | mit | 3,080 | 0 | 24 | 821 | 862 | 415 | 447 | 72 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.PrettyUtils
-- Copyright : (c) The University of Glasgow 2004
-- License : BSD3
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
-- Utilities for pretty printing.
{-# OPTIO... | mydaum/cabal | Cabal/Distribution/PrettyUtils.hs | bsd-3-clause | 1,973 | 0 | 12 | 541 | 448 | 249 | 199 | 36 | 2 |
import StackTest
main :: IO ()
main = do
stackErr ["build", "--stack-yaml", "as-extra-dep.yaml", "--dry-run"]
stack ["build", "--stack-yaml", "as-snapshot.yaml", "--dry-run"]
| juhp/stack | test/integration/tests/stackage-3185-ignore-bounds-in-snapshot/Main.hs | bsd-3-clause | 180 | 0 | 8 | 24 | 55 | 30 | 25 | 5 | 1 |
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
-- | Some fields spiced up with jQuery UI.
module Yesod.Form.Jquery
( YesodJquery (..)
, jqueryDayField
, jqueryDatePickerDayField
, jqueryAutocompleteField
, jqueryAutocom... | pikajude/yesod | yesod-form/Yesod/Form/Jquery.hs | mit | 5,752 | 0 | 12 | 1,401 | 1,134 | 605 | 529 | 104 | 3 |
{-# LANGUAGE GADTs, KindSignatures #-}
-- See Trac #301
-- This particular one doesn't use GADTs per se,
-- but it does use dictionaries in constructors
module Expr1 where
data Expr :: * -> * where -- Not a GADT at all
Const :: Show a => a -> Expr a
-- Note the Show constraint here
Var :: Var a ... | hferreiro/replay | testsuite/tests/gadt/karl1.hs | bsd-3-clause | 1,983 | 0 | 8 | 549 | 251 | 132 | 119 | 19 | 1 |
-- Crashed GHC 6.12
module T4165 where
import Language.Haskell.TH
class Numeric a where
fromIntegerNum :: a
fromIntegerNum = undefined
ast :: Q [Dec]
ast = [d|
instance Numeric Int
|]
| ezyang/ghc | testsuite/tests/quotes/T4169.hs | bsd-3-clause | 203 | 0 | 6 | 49 | 50 | 31 | 19 | -1 | -1 |
{-# LANGUAGE MultiParamTypeClasses #-}
module DB.Model.Internal.TypeCast where
import Data.Aeson
import Database.HDBC
import Data.Scientific as S (scientific, floatingOrInteger)
import Data.Text as T (pack, unpack)
import Data.ByteString.Char8 as B (pack, unpack)
sql2aeson :: SqlValue -> Value
sql2aeson (SqlString v... | YLiLarry/db-model | src/DB/Model/Internal/TypeCast.hs | mit | 953 | 0 | 9 | 223 | 333 | 175 | 158 | 24 | 2 |
-- Ben Eggers <ben.eggers36@gmail.com>
-- Problems 31-41
module Arithmetic where
import Data.Numbers.Primes (primes)
-- Problem 31
isPrime :: Int -> Bool
isPrime n = null [x | x <- [2..floor $ sqrt $ fromIntegral n], n `mod` x == 0]
-- Problem 32
gcd' :: Int -> Int -> Int
gcd' n m = if n == m then n else gcd (max n... | BenedictEggers/99problems | src/Arithmetic.hs | mit | 1,657 | 0 | 17 | 507 | 732 | 389 | 343 | 34 | 2 |
module Handler.BuildPlan where
import Import
--import Stackage.Types
--import Stackage.Database
getBuildPlanR :: SnapName -> Handler TypedContent
getBuildPlanR _slug = track "Handler.BuildPlan.getBuildPlanR" $ do
error "temporarily disabled, please open on issue on https://github.com/fpco/stackage-server/issues/ ... | fpco/stackage-server | src/Handler/BuildPlan.hs | mit | 997 | 0 | 8 | 215 | 45 | 24 | 21 | 5 | 1 |
-- | Tutorial01 from open-tutorials.org adapted ported to Haskell.
module Main where
import Common.Window (untilClosed)
import Graphics.Rendering.OpenGL
import qualified Graphics.UI.GLFW as GLFW
main :: IO ()
main = do
True <- GLFW.init
GLFW.windowHint $ GLFW.WindowHint'Samples 4
GLFW.windowHint $ GLFW.WindowHi... | kosmoskatten/opengl-tutorial | src/Tutorial01/Tutorial01.hs | mit | 996 | 0 | 13 | 157 | 233 | 115 | 118 | 20 | 1 |
{-# OPTIONS_GHC -freduction-depth=50 #-}
{- | This module defines the functions necessary to transform an 'AST'
into a 'String' containing output for the Coq proof assistant.
Definitions are encoded using a locally nameless representation. -}
module CoqLNOutput ( coqOfAST ) where
import Data.Graph ( SCC(..)... | plclub/lngen | src/CoqLNOutput.hs | mit | 5,275 | 0 | 67 | 2,047 | 800 | 404 | 396 | 83 | 4 |
-- | Basic conversions and conversionals. Just enough to embed a Sequent calculus.
module BootstrapConversions where
import Control.Monad
import Data.Maybe
import Bootstrap hiding (matchMP, matchMPInst)
import Utils
-- | Given ⊦ P → Q and ⊦ R, attempt to match P and R, and then apply MP using an
-- instantiation fo... | Chattered/proplcf | BootstrapConversions.hs | mit | 2,943 | 0 | 15 | 903 | 1,038 | 525 | 513 | 53 | 2 |
-- Persistent Bugger.
-- http://www.codewars.com/kata/55bf01e5a717a0d57e0000ec/
module Codewars.G.Persistence where
import Data.Char (digitToInt)
persistence :: Int -> Int
persistence n | 10 < n = 0
| otherwise = (+1) . persistence . product . map digitToInt . show $ n
| gafiatulin/codewars | src/6 kyu/Persistence.hs | mit | 287 | 0 | 11 | 56 | 82 | 44 | 38 | 5 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE UnicodeSyntax #-}
module Data.BEncode.Types
( Value (..)
, Dict
, Parser
, parse
, FromBEncode (..)
, (.:)
, (.:?)
, (.!=)
, ToBEncode (..)
)
where
import Control.Applicative (Alternative (..))
import Control.Monad (MonadP... | drdo/swarm-bencode | Data/BEncode/Types.hs | mit | 5,064 | 0 | 13 | 899 | 1,549 | 815 | 734 | 130 | 1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE QuasiQuotes #-}
module Graphics.Urho3D.UI.UIBatch(
UIBatch(..)
, PODVectorUIBatch
, HasElement(..)
, HasBlendMode(..)
, HasScissor(..)
, HasTexture(..)
, HasInvTextureSize(..)
, HasColor(..)
, HasVertexData(..)
, HasVertexStart(..)
, HasVertexEn... | Teaspot-Studio/Urho3D-Haskell | src/Graphics/Urho3D/UI/UIBatch.hs | mit | 15,719 | 0 | 36 | 3,233 | 2,840 | 1,564 | 1,276 | -1 | -1 |
module Y2020.M07.D28.Solution where
{--
Father: Once, long ago, there was a development environment called 'netbeans'
where you didn't write any code at all, ever, you dragged and dropped components
and connected the-...
Mother: Hush, dear! You're scaring the children!
So, that has nothing to do with anything ...
..... | geophf/1HaskellADay | exercises/HAD/Y2020/M07/D28/Solution.hs | mit | 2,365 | 0 | 13 | 484 | 234 | 126 | 108 | 20 | 2 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE PackageImports #-}
module Main
( main -- :: IO ()
) where
import Data.Int
import System.IO
import Control.Monad (liftM)
import Criterion.Main hiding (run)
import Data.ByteString.Char8 as S hiding (take, readFile)
import System.IO
import Data.LargeWord
import Co... | thoughtpolice/hs-cityhash | bench/sse.hs | mit | 819 | 2 | 11 | 156 | 251 | 140 | 111 | 24 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
import Actor
import ActorRef
import ActorRefFactory
import ActorSystem
import Control.Concurrent
import Control.Monad
import Control.Monad.Reader
import Control.Monad.State
import Control.Concurrent.STM
import Data.Dynamic
import qualified Data.Foldable as F
import qualified Data.... | crdueck/actors | Main.hs | mit | 1,493 | 0 | 14 | 322 | 444 | 241 | 203 | 40 | 2 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Graphics.Urho3D.Network.Connection(
Connection
, SharedConnection
, VectorSharedPtrConnection
, connectionContext
, connectionSendMessage
, connectionDisconnect
, connectionIsClient
, connectionIsConnected
, connectionIsConnectPending
, connectionIsScen... | Teaspot-Studio/Urho3D-Haskell | src/Graphics/Urho3D/Network/Connection.hs | mit | 11,491 | 0 | 13 | 1,848 | 1,804 | 1,001 | 803 | -1 | -1 |
{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.ApplePayPaymentAuthorizedEvent
(getPayment, ApplePayPaymentAuthorizedEvent(..),
gTypeApplePayPaymentAutho... | ghcjs/jsaddle-dom | src/JSDOM/Generated/ApplePayPaymentAuthorizedEvent.hs | mit | 1,409 | 0 | 10 | 164 | 345 | 224 | 121 | 23 | 1 |
{-# LANGUAGE Arrows, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses, OverloadedStrings, TemplateHaskell, UnicodeSyntax #-}
module Database.Types
(
Domain,
DomainColumns,
DomainPGR,
DomainPGW,
PolyDomain(..),
QueryDomain
) where
import GHC.Generics
import ... | xruzzz/axt-links-saver-haskell | src/Database/Types.hs | gpl-2.0 | 1,723 | 0 | 8 | 403 | 416 | 266 | 150 | 34 | 0 |
{-# LANGUAGE FlexibleInstances, ScopedTypeVariables #-}
-----------------------------------------------------------------------------
--
-- Module : IDE.Utils.Server
-- Copyright : 2007-2011 Juergen Nicklisch-Franken, Hamish Mackenzie
-- License : GPL
--
-- Maintainer : maintainer@leksah.org
-- Stabilit... | JPMoresmau/leksah-server | src/IDE/Utils/Server.hs | gpl-2.0 | 3,464 | 0 | 13 | 793 | 955 | 501 | 454 | 71 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module IDL.Printer
( typesFFI
, enumsFFI
, exportsFFI
, importsFFI
) where
import Data.Char (toLower, toUpper)
import Data.Maybe (isNothing)
import IDL.Cleaner (getEnums, getFuncs, getTypes)
import Text.PrettyPrint (Doc, ($+$), ($$), (<>), (<+>), char, empty,
hcat, int, integer, n... | Jonplussed/purescript-webgl-raw | generator/IDL/Printer.hs | gpl-2.0 | 7,588 | 0 | 14 | 2,153 | 2,137 | 1,130 | 1,007 | 205 | 4 |
module Data.PrefixZipper
( PrefixZipper (..)
, empty
, fromList, fromList', toList
, toParts
, cursor
, setPrefix
, right
) where
import Data.String.Utils
import Data.Monoid
data PrefixZipper a = PrefixZipper
{ prefix :: [a]
, backward :: [[a]]
, forward :: [[a]]
}
emp... | talanis85/mudblood | src/Data/PrefixZipper.hs | gpl-3.0 | 2,231 | 0 | 18 | 714 | 832 | 436 | 396 | 46 | 5 |
import System.IO (getLine)
import Control.Monad
main :: IO()
main = do
num_samples <- getLine
replicateM_ (read num_samples) read_input
maxsub :: [Int] -> Int -> [Int]
maxsub x y
| last(x) + y > head(x) = if last(x) + y > 0
then [last(x) + y, last(x) + y]
... | woodsjc/hackerrank-challenges | hackerrank_max_subway.hs | gpl-3.0 | 1,052 | 0 | 13 | 389 | 460 | 233 | 227 | 31 | 3 |
-- Bernsen algorithm for binarization
module Bernsen (binarize, mixedBinarize) where
import qualified Data.Array.Repa as R
import qualified Data.Map as Map
import Data.Array.Repa (U, D, Z (..), (:.)(..))
import qualified Data.Vector.Unboxed as V
import qualified Data.Vector.Unboxed.Mutable as Vm
import qualified Data... | mikolajsacha/HaskellPics | bernsen.hs | gpl-3.0 | 1,651 | 0 | 12 | 395 | 584 | 315 | 269 | 37 | 4 |
{- |
Module : Coords
Description : Manage coordinates in either polar or cartesian system
Copyright : (c) Frédéric BISSON, 2015
License : GPL-3
Maintainer : zigazou@free.fr
Stability : experimental
Portability : POSIX
-}
module Tank.Units.Coords
( Coords (XY, PL)
, toXY
, toPL
, toTuple
, center
, distanc... | Zigazou/Tank | src/Tank/Units/Coords.hs | gpl-3.0 | 2,936 | 0 | 16 | 789 | 1,386 | 730 | 656 | 58 | 1 |
module Main (main) where
import Data.List (genericLength)
import Data.Maybe (catMaybes)
import System.Exit (exitFailure, exitSuccess)
import System.Process (readProcess)
import Text.Regex (matchRegex, mkRegex)
average :: (Fractional a, Real b) => [b] -> a
average xs = realToFrac (sum xs) / genericLength xs
expected... | RomainGehrig/OhBool | tests/HPC.hs | gpl-3.0 | 715 | 0 | 11 | 138 | 254 | 136 | 118 | 19 | 2 |
{-
The Delve Programming Language
Copyright 2009 John Morrice
Distributed under the terms of the GNU General Public License v3, or ( at your option ) any later version.
This file is part of Delve.
Delve is free software: you can redistribute it and/or modify
it under the terms of the GNU Gene... | elginer/Delve | src/HsAST.hs | gpl-3.0 | 1,171 | 0 | 6 | 263 | 75 | 47 | 28 | 11 | 1 |
module Demo where
import Data.Function
sumFstFst = (+) `on` helper where helper pp = fst $ fst pp
sumFstFst' = (+) `on` (\pp -> fst $ fst pp)
sumFstFst'' = (+) `on` (fst . fst)
p1 = ((1,2),(3,4))
p2 = ((3,4),(5,6))
| devtype-blogspot-com/Haskell-Examples | SumFstFst/Demo.hs | gpl-3.0 | 220 | 0 | 9 | 46 | 133 | 83 | 50 | 7 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module WebParsing.ArtSciParser (parseArtSci, getDeptList, fasCalendarURL) where
import Network.HTTP
import Text.HTML.TagSoup
import Text.HTML.TagSoup.Match
import Database.Persist.Sqlite
import Database.JsonParser
import Data.List
import qualified Data.Text as T
import Database.Table... | cchens/courseography | hs/WebParsing/ArtSciParser.hs | gpl-3.0 | 3,579 | 0 | 16 | 907 | 831 | 427 | 404 | 73 | 4 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-prediction/gen/Network/Google/Resource/Prediction/TrainedModels/Delete.hs | mpl-2.0 | 3,189 | 0 | 14 | 744 | 388 | 233 | 155 | 62 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Cancel.hs | mpl-2.0 | 3,672 | 0 | 15 | 874 | 483 | 287 | 196 | 75 | 1 |
{-# Language CPP #-}
-- | Settings are centralized, as much as possible, into this file. This
-- includes database connection settings, static file locations, etc.
-- In addition, you can configure a number of different aspects of Yesod
-- by overriding methods in the Yesod typeclass. That instance is
-- declared in th... | enolan/emp-pl-site | Settings.hs | agpl-3.0 | 5,528 | 0 | 12 | 1,527 | 737 | 421 | 316 | -1 | -1 |
--------------------------------------------------------------------------------
-- $Id: ShowM.hs,v 1.1 2004/02/11 16:31:01 graham Exp $
--
-- Copyright (c) 2003, G. KLYNE. All rights reserved.
-- See end of this file for licence information.
--------------------------------------------------------------------... | amccausl/Swish | Swish/HaskellUtils/ShowM.hs | lgpl-2.1 | 3,892 | 0 | 8 | 812 | 182 | 135 | 47 | 7 | 1 |
{-|
Module : Reflex.WX.Class
Description : This module contains the basic type definitions used within a
reflex-wx program.
License : wxWindows Library License
Maintainer : joshuabrot@gmail.com
Stability : Experimental
-}
{-# LANGUAGE ExistentialQuantification, FlexibleInstances, FlexibleConte... | Pamelloes/reflex-wx | src/main/Reflex/WX/Class.hs | lgpl-2.1 | 4,634 | 0 | 18 | 1,536 | 1,912 | 987 | 925 | 107 | 3 |
module ViperVM.Library.FloatMatrixAdd (
builtin, function, metaKernel, kernels
) where
import Control.Applicative ( (<$>) )
import ViperVM.VirtualPlatform.FunctionalKernel hiding (metaKernel,proto)
import ViperVM.VirtualPlatform.MetaObject
import ViperVM.VirtualPlatform.Descriptor
import ViperVM.VirtualPlatform.Me... | hsyl20/HViperVM | lib/ViperVM/Library/FloatMatrixAdd.hs | lgpl-3.0 | 2,695 | 0 | 15 | 691 | 686 | 386 | 300 | 54 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE UnboxedTuples #-}
{-# LANGUAGE ForeignFunctionInterface #-}
-- NOTE: This file is a copy of System.Plugins.Load. It has been patched to
-- expose some internal functionality (loadObjectFile, which used t... | mzero/barley | src/Barley/AltLoad.hs | apache-2.0 | 26,870 | 0 | 22 | 7,541 | 4,547 | 2,428 | 2,119 | 294 | 5 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- :script test/Spark/Core/Internal/PathsSpec.hs
module Spark.Core.Internal.PathsSpec where
import Test.Hspec
import qualified Data.Map.Strict as M
import qualified Data.Set as S
import qualified Data.ByteString.Char8 ... | tjhunter/karps | haskell/test/Spark/Core/Internal/PathsSpec.hs | apache-2.0 | 6,509 | 0 | 22 | 1,861 | 2,726 | 1,444 | 1,282 | 173 | 1 |
data WhyNot a = Nah | Sure a
deriving Show
instance Functor WhyNot where
fmap f (Sure a) = Sure (f a)
fmap f Nah = Nah
instance Applicative WhyNot where
(<*>) (Sure f) (Sure a) = Sure (f a)
(<*>) Nah _ = Nah
(<*>) (Sure f) Nah = Nah
pure a = Sure a
instance Monad WhyNo... | cbare/Etudes | haskell/whynot.hs | apache-2.0 | 732 | 0 | 10 | 273 | 337 | 168 | 169 | 29 | 2 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
------------------------------------------------------------------------------
module OpenArms.Types.Session
( -- * Types
Session (..)
, columnOffsetsSession
, tableOfSessio... | dmjio/openarms | src/OpenArms/Types/Session.hs | bsd-2-clause | 761 | 0 | 7 | 170 | 74 | 49 | 25 | 20 | 0 |
import Test.Tasty (defaultMain, testGroup)
import qualified Ord
main :: IO ()
main = defaultMain $ testGroup "Tests"
[ Ord.tests
]
| kawu/dawg-ord | tests/test.hs | bsd-2-clause | 152 | 0 | 8 | 41 | 47 | 26 | 21 | 5 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
module Foundation
( BitloveEnv (..)
, UIApp (..)
, Route (..)
, UIAppMessage (..)
, resourcesUIApp
, Handler
, Widget
, Form
, getFullUrlRender
, isMiro
, withDB, withDBPool, DBPool, HasDB (..), Transaction
, Period (..)
--, maybeA... | jannschu/bitlove-ui | Foundation.hs | bsd-2-clause | 8,447 | 0 | 17 | 2,054 | 1,553 | 834 | 719 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE UnicodeSyntax #-}
{-| This module contains functions that let one easily implement the worker side
o... | gcross/LogicGrowsOnTrees | LogicGrowsOnTrees/sources/LogicGrowsOnTrees/Parallel/Common/Process.hs | bsd-2-clause | 7,826 | 0 | 31 | 2,377 | 1,062 | 576 | 486 | 119 | 12 |
{-# LANGUAGE TemplateHaskell, StandaloneDeriving #-}
{-| Implementation of the Ganeti config objects.
-}
{-
Copyright (C) 2011, 2012, 2013, 2014 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are... | ganeti-github-testing/ganeti-test-1 | src/Ganeti/Objects.hs | bsd-2-clause | 34,660 | 0 | 19 | 9,151 | 7,173 | 4,069 | 3,104 | 668 | 17 |
module DetectPangram where
import Data.Char (toLower)
-- | Check if string is a pangram, i.e. contains every letter (6 kyu)
-- | Link: https://biturl.io/Pangram
-- | Refactored solution I came up with after completition of this kata
-- originally the solution was almost the same
isPangram :: String -> Bool
isPangram... | Eugleo/Code-Wars | src/string-kata/DetectPangram.hs | bsd-3-clause | 365 | 0 | 7 | 64 | 57 | 35 | 22 | 4 | 1 |
module Doukaku.Honeycomb (solve) where
type Point = (Double, Double)
type Direction = (Double, Double)
solve :: String -> String
solve = map snd . scanl (\ (p, _) d -> moveOn p d) ((0, 0), 'A') . map direct
direct :: Char -> Direction
direct '0' = (0, 1)
direct '1' = (cos (pi / 6), sin (pi / 6))
direct '2' = (cos (p... | hiratara/doukaku-past-questions-advent-2013 | src/Doukaku/Honeycomb.hs | bsd-3-clause | 1,436 | 4 | 13 | 406 | 787 | 427 | 360 | 35 | 2 |
-- Copyright (c) 2006-2011
-- The President and Fellows of Harvard College.
--
-- 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... | HIPERFIT/language-c-quote | Language/C/Quote/OpenCL.hs | bsd-3-clause | 3,145 | 0 | 8 | 555 | 426 | 264 | 162 | 37 | 1 |
module Day20 where
import Data.List
import Data.List.Split
import Data.Ord
parse :: [String] -> [(Int, Int)]
parse = map (head . (\a -> zip a (drop 1 a)) . map read . splitOn "-")
reduce :: [(Int, Int)] -> [(Int, Int)]
reduce (a:[]) = [a]
reduce ((a, b):(a',b'):as) =
case (a' < b) of
True -> reduc... | ulyssesp/AoC | src/day20.hs | bsd-3-clause | 669 | 0 | 14 | 164 | 404 | 224 | 180 | 19 | 2 |
-- Copyright 2019 Google LLC
--
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file or at
-- https://developers.google.com/open-source/licenses/bsd
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANG... | google-research/dex-lang | src/lib/Util.hs | bsd-3-clause | 9,252 | 0 | 15 | 2,551 | 4,605 | 2,418 | 2,187 | -1 | -1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Test.ArbitraryInstances where
import qualified Data.ByteString as B
import Data.Word (Word8, Word32)
import System.Random
import Test.QuickCheck
instance Arbitrary B.ByteString where
arbitrary = fmap B.pack arbitrary
shrink s = case B.splitAt (B.length s `div` 2) s... | enolan/whiteout | src/Test/ArbitraryInstances.hs | bsd-3-clause | 950 | 0 | 11 | 208 | 321 | 178 | 143 | 24 | 0 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ConstraintKinds #-}
module Bound.Unwrap ( Fresh (fresh, uname)
, name
, freshify
, erase
, nameF
, Counter
, UnwrapT
, Unwrap
... | julmue/UntypedLambda | src/Bound/Unwrap.hs | bsd-3-clause | 2,887 | 0 | 13 | 862 | 647 | 354 | 293 | 56 | 1 |
{-# LANGUAGE GADTs, NoMonomorphismRestriction, ScopedTypeVariables,
KindSignatures, RecordWildCards, FlexibleContexts #-}
----------------------------
-- | This module provides main object of cmd executor
----------------------------
module CmdExec where
import Control.Applicative hiding (empty)
impor... | wavewave/cmdmanager | src/CmdExec.hs | bsd-3-clause | 2,371 | 0 | 14 | 602 | 563 | 303 | 260 | 47 | 2 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE MagicHash #-}
-- |
-- Module: Data.StrictPut
-- Author: Andreas Voellmy <andreas.voellmy@yale.edu>
-- Alexander Vershilov <alexander.vershilov@gmail.com>
-- License: BSD-3
-- Stability: unstable
--
-- This module is improved version of Nettle.Open... | qnikst/strictput | Data/StrictPut.hs | bsd-3-clause | 2,084 | 0 | 10 | 319 | 187 | 128 | 59 | 23 | 1 |
-- |
-- Copyright : Anders Claesson 2017
-- Maintainer : Anders Claesson <anders.claesson@gmail.com>
--
-- Common permutation statistics. Most of these are "set" versions of
-- those in Sym.Perm.Stat
--
module Sym.Perm.STAT
(
asc -- list of ascent
, ascIx -- ascent indices
, ascTops ... | akc/sym | Sym/Perm/STAT.hs | bsd-3-clause | 3,429 | 0 | 10 | 1,096 | 944 | 569 | 375 | 60 | 1 |
{-# LANGUAGE FlexibleInstances, StandaloneDeriving, TypeSynonymInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-- | We define lots of orphan Show instances here, for debugging and learning
-- purposes.
--
-- Most of the time while trying to figure out when a constructor is used or how
-- is a term compiled, it's ... | osa1/CoreDump | src/CoreDump/Show.hs | bsd-3-clause | 4,871 | 0 | 9 | 952 | 964 | 506 | 458 | 113 | 1 |
module P003 where
import Primes (primeFactors)
run :: IO ()
run = print result
where
n = 600851475143
result = last . primeFactors $ n
| tyehle/euler-haskell | src/P003.hs | bsd-3-clause | 147 | 0 | 8 | 37 | 50 | 28 | 22 | 6 | 1 |
{-# LANGUAGE RecordWildCards #-}
{- | [Haskell OpenFlow]
This is an implementation of OpenFlow in Haskell.
-}
module Network.OpenFlow (
OfpFrame(..)
, OfpHeader(..)
, OfpMsg(..)
, OfpError(..)
, OfpHelloFailedCode(..)
, OfpBadRequestCode(..)
, OfpBadActionCode(..)
, OfpFlowModFailedCode(..)
, Ofp... | brooksbp/haskell-openflow | Network/OpenFlow.hs | bsd-3-clause | 33,143 | 0 | 17 | 11,304 | 8,561 | 4,257 | 4,304 | 965 | 20 |
-- Copyright 2013 Kevin Backhouse.
{-|
The 'TopKnot' instrument is used for knot tying across passes. It
allows a value to be written during the epilogue of one pass and read
during the prologue of a later pass. Knot tying is a technique
sometimes used in lazy functional programming, in which the definition
of a vari... | kevinbackhouse/Control-Monad-MultiPass | src/Control/Monad/MultiPass/Instrument/TopKnot.hs | bsd-3-clause | 3,318 | 0 | 16 | 823 | 815 | 421 | 394 | -1 | -1 |
{-# LANGUAGE FlexibleInstances, TypeOperators #-}
module Value.Number where
import Core.Val
instance ToText Number where
text = prim Fun "id" "$(function(x){return x})"
instance Num (Val Number) where
(+) = prim2 Fun "+" "$(function(a,b){return a+b})"
(*) = prim2 Fun "*" "$(function(a,b){return a*b})"
(-) = ... | sebastiaanvisser/frp-js | src/Value/Number.hs | bsd-3-clause | 1,506 | 0 | 8 | 271 | 483 | 262 | 221 | 38 | 1 |
module Widgets
( noteContainer
) where
import qualified Brick.Types as T
import Brick.Widgets.Core
( hLimit
, str
, viewport
, withAttr
)
import Lens.Micro ((^.))
import Widgets.Internal (fitInWidth)
-- |Given a viewport and note content generates Brick Widget containing the con... | klausweiss/linotes | src/Widgets.hs | bsd-3-clause | 750 | 0 | 12 | 259 | 181 | 99 | 82 | 22 | 1 |
module Physics.Falling3d.UnitSphere3d
(
)
where
import System.Random
import Data.Random.Normal
import Data.Vect.Double.Base
import Physics.Falling.Math.UnitSphere
instance UnitSphere Normal3 where
unitSphereSamples = _randomSpherePoints
-- FIXME: implement uniform sampling for nUnitSphereSamples
_randomSpher... | sebcrozet/falling3d | Physics/Falling3d/UnitSphere3d.hs | bsd-3-clause | 570 | 0 | 9 | 79 | 142 | 80 | 62 | 13 | 1 |
module Abstract.Impl.Memcache.Counter (
module Abstract.Interfaces.Counter,
counterMemcache'Int,
defaultCounterMemcache'Int,
mkCounter'Memcache'Int,
mkCounter'Memcache'Int'Inc,
mkCounter'Memcache'Int'Dec,
mkCounter'Memcache'Int'Get
) where
import Abstract.Interfaces.Counter
import Abstract.Impl.Memcache.Counter... | adarqui/Abstract-Impl-Memcache | src/Abstract/Impl/Memcache/Counter.hs | bsd-3-clause | 618 | 0 | 5 | 38 | 99 | 68 | 31 | 14 | 0 |
module Main where
import Ivory.Artifact
import Control.Monad
import Gidl.Types
import Gidl.Interface
import Gidl.Parse
import Gidl.Schema
import Gidl.Backend.Cabal
import Gidl.Backend.Haskell.Types
import Gidl.Backend.Haskell.Interface
import Gidl.Backend.Haskell
main :: IO ()
main = do
test "tests/testtypes.sexpr"... | GaloisInc/gidl | tests/Test.hs | bsd-3-clause | 1,116 | 0 | 19 | 330 | 236 | 124 | 112 | 27 | 2 |
{-# LANGUAGE ScopedTypeVariables, FlexibleContexts, CPP #-}
module Main where
import Control.Monad.Error (runErrorT)
import Control.Monad.State (runStateT)
import Data.IORef (newIORef)
import Data.List (intersperse)
import System.IO (hFlush, stdout)
import Core (scheme)
import Initial (initialEnv, initialLoad)
impor... | amutake/psg-scheme | src/main.hs | bsd-3-clause | 1,039 | 0 | 12 | 231 | 387 | 199 | 188 | 30 | 4 |
class Composable a where
compose :: a -> a -> a
newtype Add = Add Integer deriving Show
instance Composable Add where
compose (Add x) (Add y) = Add $ x + y
newtype Mul = Mul Integer deriving Show
instance Composable Mul where
compose (Mul x) (Mul y) = Mul $ x * y
| YoshikuniJujo/funpaala | samples/26_type_class/composable1.hs | bsd-3-clause | 271 | 0 | 8 | 62 | 121 | 63 | 58 | 8 | 0 |
{-# LANGUAGE FlexibleContexts #-}
module Webcrank.Internal.Halt where
import Control.Monad.Trans.Either
import qualified Data.ByteString.Lazy as LB
import Network.HTTP.Types
import Webcrank.Internal.Types
runHaltT :: HaltT m a -> m (Either Halt a)
runHaltT = runEitherT . unHaltT
{-# INLINE runHaltT #-}
-- | Immedi... | webcrank/webcrank.hs | src/Webcrank/Internal/Halt.hs | bsd-3-clause | 1,178 | 0 | 8 | 198 | 194 | 110 | 84 | 18 | 1 |
{-# LANGUAGE RecordWildCards #-}
module UnitTests.Distribution.Client.Dependency.Modular.Solver (tests)
where
-- base
import Control.Monad
import Data.Maybe (isNothing)
import qualified Data.Version as V
import qualified Distribution.Version as V
-- test-framework
import Test.Tasty as TF
import Test.T... | gbaz/cabal | cabal-install/tests/UnitTests/Distribution/Client/Dependency/Modular/Solver.hs | bsd-3-clause | 26,482 | 0 | 17 | 7,065 | 7,555 | 4,184 | 3,371 | 365 | 2 |
-- |
-- Module : Network.Pcap.Conduit
-- Copyright : (c) Austin Seipp 2012
-- License : BSD3
--
-- Maintainer : mad.one@gmail.com
-- Stability : experimental
-- Portability : GHC probably
--
-- This package provides conduit 'Sources' for pcap data ( captured by
-- wireshark, tcpdump, etc.) You can enumera... | thoughtpolice/pcap-conduit | Network/Pcap/Conduit.hs | bsd-3-clause | 1,593 | 0 | 10 | 380 | 308 | 176 | 132 | 25 | 2 |
{-# LANGUAGE LambdaCase #-}
--
-- | Primitive argument safe copy propagation.
--
-- Copy propagation that doesn't touch the names of arguments to primitives.
-- This is useful because it can be applied after register allocation.
--
module River.Core.Transform.Copy (
copyOfProgram
, copyOfTerm
) where
impor... | jystic/river | src/River/Core/Transform/Copy.hs | bsd-3-clause | 3,421 | 0 | 19 | 1,121 | 1,175 | 569 | 606 | -1 | -1 |
{-# LANGUAGE DeriveAnyClass, DeriveGeneric #-}
module Stan.AST.Pretty where
import Stan.AST
import Text.PrettyPrint.HughesPJClass
instance Pretty Stan where
pPrint (Model ds) = text "model {"
$$ nest 2 (ppDecls ds)
$$ char '}'
pPrint (Parameters ds)
... | filopodia/open | stanhs/lib/Stan/AST/Pretty.hs | mit | 3,372 | 0 | 16 | 1,111 | 1,340 | 652 | 688 | 77 | 1 |
{-
emacs2nix - Generate Nix expressions for Emacs packages
Copyright (C) 2016 Thomas Tuegel
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 l... | mdorman/emacs2nix | src/Distribution/Elpa.hs | gpl-3.0 | 1,157 | 0 | 12 | 210 | 151 | 90 | 61 | 15 | 0 |
{-# LANGUAGE OverloadedStrings #-}
-- Module : Test.AWS.ElastiCache
-- 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-elasticache/test/Test/AWS/ElastiCache.hs | mpl-2.0 | 756 | 0 | 5 | 201 | 73 | 50 | 23 | 11 | 1 |
{-# 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-codedeploy/gen/Network/AWS/CodeDeploy/ListApplications.hs | mpl-2.0 | 4,966 | 0 | 13 | 1,100 | 679 | 407 | 272 | 85 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-ec2/gen/Network/AWS/EC2/DescribeRegions.hs | mpl-2.0 | 4,290 | 0 | 10 | 916 | 580 | 354 | 226 | 64 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-| Implementation of the Ganeti LUXI interface.
-}
{-
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 permitted provided that the following conditions are
met:
1. Redi... | onponomarev/ganeti | src/Ganeti/Luxi.hs | bsd-2-clause | 15,089 | 0 | 23 | 4,556 | 3,477 | 1,902 | 1,575 | 307 | 29 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Dependency
-- Copyright : (c) David Himmelstrup 2005,
-- Bjorn Bringert 2007
-- Duncan Coutts 2008
-- License : BSD-like
--
-- Maintainer : cabal-devel... | randen/cabal | cabal-install/Distribution/Client/Dependency.hs | bsd-3-clause | 33,977 | 1 | 19 | 8,570 | 5,871 | 3,197 | 2,674 | 587 | 4 |
module GHC.Utils.Outputable (module Outputable) where
import Outputable
| google/ghc-source-gen | compat/GHC/Utils/Outputable.hs | bsd-3-clause | 72 | 0 | 4 | 7 | 16 | 11 | 5 | 2 | 0 |
module HLearn.Models.Classifiers.HTree
where
import Debug.Trace
import qualified Data.Map as Map
import HLearn.Algebra
import HLearn.Models.Distributions
import HLearn.Models.Classification
import HLearn.Models.Classifiers.Bayes
newtype HTreeParams distparams = HTreeParams (BayesParams distparams)
deriving (... | iamkingmaker/HLearn | src/HLearn/Models/Classifiers/HTree.hs | bsd-3-clause | 1,726 | 0 | 11 | 392 | 475 | 268 | 207 | -1 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.